URL: <http://gna.org/patch/?4864>
Summary: Distance-based calculation for meeting charges Project: Freeciv Submitted by: persia Submitted on: Sat 28 Jun 2014 07:01:38 PM JST Category: ai Priority: 5 - Normal Status: Ready For Test Privacy: Public Assigned to: persia Originator Email: Open/Closed: Open Discussion Lock: Any Planned Release: 2.5.0, 2.6.0 _______________________________________________________ Details: Currently, when assigned to guard a unit, sailing units attempt to meet their charge at the destination, and non-sailing units attempt to meet their charge at the charges current location. For S2_5, where only simple nativity matters, sailing units should verify the charge is actually headed somewhere, as otherwise they decide they are unable to meet the charge (even if they are initially on the same tile), and find another job to do. For trunk, I've replaced the decision tree for whether to go to the charge or meet the charge at the destination with some simple calculations related to relative distances and rough estimates of travel. I'm not convinced this is the best way to decide, but didn't want to invoke pathfinding to recreate the charge's potential route (which was discarded previously), and then use bodyguard pathfinding to determine the fastest rendezvous point from which the bodyguard can still reach the goal tile at the same time as the charge, as I thought this might be computationally expensive. A compromise solution currently eludes me. _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Sat 28 Jun 2014 07:01:38 PM JST Name: sailing-units-continue-guarding-stationary-charges.S2_5.patch Size: 880B By: persia <http://gna.org/patch/download.php?file_id=21177> ------------------------------------------------------- Date: Sat 28 Jun 2014 07:01:38 PM JST Name: distance-based-calculation-for-meeting-cahrges.patch Size: 2kB By: persia <http://gna.org/patch/download.php?file_id=21178> _______________________________________________________ Reply to this item at: <http://gna.org/patch/?4864> _______________________________________________ Message sent via/by Gna! http://gna.org/ _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev