[Freeciv-Dev] [patch #3383] autosettler choose safe tile to work on
Follow-up Comment #15, patch #3383 (project freeciv): What is an EC callback ? Function returning Extra Cost for the move from tile to tile to path finding. This ticket is now about selection of the safe route to destination only. Avoiding dangerous destination tiles falls to patch #3384, at least with the version I'm just finishing. ___ Reply to this item at: http://gna.org/patch/?3383 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #3383] autosettler choose safe tile to work on
Follow-up Comment #14, patch #3383 (project freeciv): You raise a number of good points. What is an EC callback ? ___ Reply to this item at: http://gna.org/patch/?3383 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #3383] autosettler choose safe tile to work on
Follow-up Comment #12, patch #3383 (project freeciv): Any thinking results yet ? If you tell me about your preferred way I willing to implement test it. ___ Reply to this item at: http://gna.org/patch/?3383 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #3383] autosettler choose safe tile to work on
Follow-up Comment #13, patch #3383 (project freeciv): I'd like to have pathfinding part (tiles enroute) to have extra cost for dangerous tiles instead of being right off limits. So dangerous route would be taken only if there is no alternatives, but it would be taken when everything else fails (note that this path construction time dangerousness is anyway subject to change before settler actually enters tile - enemy movement can make tiles dangerous, or remove dangerousness) Does it have EC callback defined already? If no: simply add one. If yes: can we easily (without breaking other users) adjust it, or can we make new one with existing functionality and new functionality combined? ___ Reply to this item at: http://gna.org/patch/?3383 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #3383] autosettler choose safe tile to work on
Follow-up Comment #1, patch #3383 (project freeciv): Minor nitpick: In rulesets that introcude some kind of heavily armored unit with Settlers flag we may want that unit to work on a bit threatened tiles too (not so much when it's autosettler for human who can manually override anyway, but when used by AI) ___ Reply to this item at: http://gna.org/patch/?3383 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #3383] autosettler choose safe tile to work on
Follow-up Comment #2, patch #3383 (project freeciv): How can we check for that ? Looking at attack_strength / defense_strength ? Can you suggest sane thresholds ? ___ Reply to this item at: http://gna.org/patch/?3383 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #3383] autosettler choose safe tile to work on
Follow-up Comment #3, patch #3383 (project freeciv): Oh, is_square_threatened() checks only against land threats. This should also prevent autosettler from going to coastal tile which battleship is just about to sohrebombard. Maybe adv_danger_at() is the function you want to use? It also makes callback to AI code so settler armor check could be implemented there - autosettler for human players would consistently not to enter dangerous tiles (this is *good* thing; consistency for human players, who can anyway order settlers manually if they want). ___ Reply to this item at: http://gna.org/patch/?3383 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #3383] autosettler choose safe tile to work on
Follow-up Comment #4, patch #3383 (project freeciv): Where do I find adv_danger_at() ? Grepping through my tarball does not find anything. ___ Reply to this item at: http://gna.org/patch/?3383 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #3383] autosettler choose safe tile to work on
Follow-up Comment #5, patch #3383 (project freeciv): By the way, I did not consider protection against because they might be several tiles away (same as air units). Checking an enlarged radius does not seem to make sense. But you are right - the battleship could already be at the coast waiting for us. ___ Reply to this item at: http://gna.org/patch/?3383 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #3383] autosettler choose safe tile to work on
Follow-up Comment #6, patch #3383 (project freeciv): You're working against a release (of which 2.3.2 is latest)? Autosettlers code has been heavily rarranged to S2_4 (that will become 2.4 release series) and a bit more to current development version (TRUNK). You should provide feature patches against TRUNK. http://freeciv.wikia.com/wiki/Svn ___ Reply to this item at: http://gna.org/patch/?3383 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #3383] autosettler choose safe tile to work on
Follow-up Comment #7, patch #3383 (project freeciv): Yes, this patch was made against 2.3.2. Considered this to be a minor change that could go into the next small release. I'll check trunk and will provide a corresponding patch as well. ___ Reply to this item at: http://gna.org/patch/?3383 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #3383] autosettler choose safe tile to work on
Follow-up Comment #8, patch #3383 (project freeciv): Using adv_danger_at() won't work unless pf_parameter-can_invade_tile is extended to pass the unit struct as argument. A quick look into path_finding.c left me with the impression that this won't work because the calling functions also don't have the unit at hand. Feel free to correct me - I am a novice when it comes to the freeciv code base. ___ Reply to this item at: http://gna.org/patch/?3383 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #3383] autosettler choose safe tile to work on
Follow-up Comment #9, patch #3383 (project freeciv): Umh, was your modifications inside settler movement handling (goto)? It was not obvious by simply reading the patch. Anyway, attached is untested patch for settler not to even consider dangerous tiles (and to choose another place instead) (file #16027) ___ Additional Item Attachment: File name: AvoidDangrousSettlerTile.patch Size:0 KB ___ Reply to this item at: http://gna.org/patch/?3383 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #3383] autosettler choose safe tile to work on
Follow-up Comment #10, patch #3383 (project freeciv): No, the change was inside autosettler_enter_territory() since this functions seemed to be always called when the settler is moving. If I understand correctly the difference between our patches is that mine considers the full path while yours considers the destination only ? At least, that is what I was trying to achieve. :-) ___ Reply to this item at: http://gna.org/patch/?3383 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #3383] autosettler choose safe tile to work on
Follow-up Comment #11, patch #3383 (project freeciv): Ok, I now see how your patch works. I need to think this one a bit. I see at least five ways to proceed, each with pros and cons. ___ Reply to this item at: http://gna.org/patch/?3383 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #3383] autosettler choose safe tile to work on
URL: http://gna.org/patch/?3383 Summary: autosettler choose safe tile to work on Project: Freeciv Submitted by: None Submitted on: Sun 08 Jul 2012 01:24:52 AM UTC Category: ai Priority: 5 - Normal Status: None Privacy: Public Assigned to: None Originator Email: lindner_ma...@yahoo.de Open/Closed: Open Discussion Lock: Any Planned Release: ___ Details: When an autosettler is about to choose a tile to work on it does not care about neighboring enemy units, thus the autosettler often is killed as soon as the enemy unit can attack. This change makes the autosettler check for danger in the tile's vicinity before considering to move there. ___ File Attachments: --- Date: Sun 08 Jul 2012 01:24:52 AM UTC Name: freeciv-autosettler-choose-safe-tile.patch Size: 700B By: None http://gna.org/patch/download.php?file_id=16016 ___ Reply to this item at: http://gna.org/patch/?3383 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev