SummerOfCodeProposal AI Improvement Crab AI Game Interface

From The Battle for Wesnoth Wiki
Revision as of 21:16, 2 April 2009 by Crab (talk | contribs) (New page: = Game Interface from the point of view of the AI = This class will handle two main tasks: - tell the AI about current game state (a task that is now done by ai_interface:info ) - allow t...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Game Interface from the point of view of the AI

This class will handle two main tasks: - tell the AI about current game state (a task that is now done by ai_interface:info ) - allow the AI to make gamestate-changing actions (movement, attacking ) and see their result. - don't allow the AI to crash the game if it tries to do anything stupid.

Encapsulating those 'state-changing' functions in one place (and making the rest of the ai implementation code strictly-readonly in regards to the game state) will allow us to make interface between the AI and the game simpler, thus preventing many bugs which are connected with the AI executing some forbidden maneuver (such as a 'move to occupied square).


--

return back to Summer Of Code Proposal of Crab