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
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Planned Release:
_______________________________________________________
Details:
The current goto sanity check uses move_type as part of the determination of
whether a unit can get from somewhere to somewhere else, along with some
internal information (e.g. continent identifiers). This fares poorly with
unit classes that have complex nativity (may be UMT_BOTH, but may not be able
to cross deep oceans, or may be UMT_LAND, but unable to traverse mountain
ranges).
The attached patch replaces the heuristic sanity check with a test of whether
there is a valid path according to the pathfinding algorithms. Attack moves
are selected because goto_is_sane() is sometimes used in situations where the
unit will want to attack at the destination.
Note that although this reduces the number of uses of UMT_LAND, UMT_SEA, and
UMT_BOTH in the code, it won't actually correctly test goto sanity for units
with complex nativity until patch #3901 lands, although this may be applied
independently, and the ordering of the patches is not important.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fri 04 Apr 2014 10:08:44 PM JST Name:
check-goto-sanity-with-pathfinding.patch Size: 9kB By: persia
<http://gna.org/patch/download.php?file_id=20470>
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?4643>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev