Wesnoth: Micro AI 'Patrol' - Occupied Waypoints
completed by: gh0st
mentors: Nils Kneuper, Alarantalara, mattsc
A number of Wesnoth AIs have recently been converted to Micro AIs, including the 'Patrol' AI. However, the behavior of the patrol unit is undesirable when the next waypoint is occupied and the unit on it is not on the list of units to be attacked. It effectively stalls the patroller. The goal of this task is two-fold:
First, implement a behavior that avoids this situation. There are several (fundamentally different) possible approaches to do this, and it is up to you which one you want to implement.
Second, add the same waypoint method to the Messenger Escort Micro AI as well. Currently, the Messenger only moves toward a final goal along approximately the shortest route. This should be changed so that intermediate waypoints are possible. If these waypoints are occupied, they should be dealt with in the same way as in the Patrol Micro AI.
The task is completed when both AIs have been changed to use the new waypoint method and this has been documented on the Wesnoth wiki.