[Freeciv-Dev] [patch #4643] Check goto sanity with pathfinding

2014-04-15 Thread pepeto
Update of patch #4643 (project freeciv): Status: Ready For Test = Done Open/Closed:Open = Closed ___ Reply to this item at:

[Freeciv-Dev] [patch #4643] Check goto sanity with pathfinding

2014-04-05 Thread Emmet Hikory
Follow-up Comment #5, patch #4643 (project freeciv): The code is full of function pointers, so I'm sure I'm missing something, but how and where is PF_IMPOSSIBLE_MOVE checked? I'm happy to remove it, I just don't understand why I may. Looking for pf_map_move_cost(), I could only find two

[Freeciv-Dev] [patch #4643] Check goto sanity with pathfinding

2014-04-05 Thread pepeto
Follow-up Comment #6, patch #4643 (project freeciv): The code is full of function pointers, so I'm sure I'm missing something, but how and where is PF_IMPOSSIBLE_MOVE checked? I'm happy to remove it, I just don't understand why I may. pf_map_move_cost(), pf_map_position() and pf_map_path() do

[Freeciv-Dev] [patch #4643] Check goto sanity with pathfinding

2014-04-05 Thread Emmet Hikory
Follow-up Comment #7, patch #4643 (project freeciv): Thanks. I'll review, and update the patch to be less redundant. For find_beachhead, there's that problem. Also, if the first tile *is* reachable, but the next tile in the iteration isn't, then the unreachable tile will be selected.

[Freeciv-Dev] [patch #4643] Check goto sanity with pathfinding

2014-04-05 Thread Emmet Hikory
Follow-up Comment #8, patch #4643 (project freeciv): Digging through, I think I like the pf_map_move_cost() based solution best. Updated patch attached. (file #20485) ___ Additional Item Attachment: File name:

[Freeciv-Dev] [patch #4643] Check goto sanity with pathfinding

2014-04-05 Thread pepeto
Update of patch #4643 (project freeciv): Status:None = Ready For Test Assigned to:None = pepeto Planned Release: = 2.6.0

[Freeciv-Dev] [patch #4643] Check goto sanity with pathfinding

2014-04-04 Thread Emmet Hikory
URL: http://gna.org/patch/?4643 Summary: Check goto sanity with pathfinding Project: Freeciv Submitted by: persia Submitted on: Fri 04 Apr 2014 10:08:44 PM JST Category: ai Priority: 5 - Normal

[Freeciv-Dev] [patch #4643] Check goto sanity with pathfinding

2014-04-04 Thread pepeto
Follow-up Comment #1, patch #4643 (project freeciv): in goto_is_sane(): I would suggest the usage of pf_map_position() instead of pf_map_path() because we don't need to fill all positions of the path. Checking the returned value of pf_map_position() should be faster.

[Freeciv-Dev] [patch #4643] Check goto sanity with pathfinding

2014-04-04 Thread pepeto
Follow-up Comment #2, patch #4643 (project freeciv): pf_map_move_cost() != PF_IMPOSSIBLE_MC should also do the stuff... ___ Reply to this item at: http://gna.org/patch/?4643 ___ Message

[Freeciv-Dev] [patch #4643] Check goto sanity with pathfinding

2014-04-04 Thread Emmet Hikory
Follow-up Comment #3, patch #4643 (project freeciv): Thanks for the hints. Indeed, pf_map_position() seems better. I used pos.total_MC, rather than pf_map_move_cost(), because that matches the examples I could find in the code, but I'm happy to switch that if it could be done better. Are there