Difference between revisions of "SummerOfCodeProposal AI Improvement Crab AI Components"

From The Battle for Wesnoth Wiki
m (New page: = AI Configuration = First version of this class is already written and committed to Wesnoth. The purpose of this class is to encapsulate all AI configuration options and deserialize the...)
 
(AI Configuration)
Line 1: Line 1:
= AI Configuration =
+
= AI Components =
  
First version of this class is already written and committed to Wesnoth.
+
We need to extract those parts of the AIs which make decisions and manage turn flow control into separate functor-like objects, to allow us to experiment in configuring the AI using various compoments.
  
The purpose of this class is to encapsulate all AI configuration options and deserialize them from a single config or from a file.
+
<b>Possible roles of components:</b>
  
Current AI configuration options in team.cpp are a bit messy and inefficient (for example, set_time_of_day iterates through all parameters at the start of each turn and copies those parameters which are active to a new vector. Also, there is some duplication with some of the ai parameters. Also, current ai_memory implementation uses standard config class so it is inefficient to use it to work/modify a large amout of data). So, encapsulating all those details in a single class will allow to rework its internal details without changing all those pieces of code that depend on ai parameters.
+
Position evaluation:
 +
 
 +
Power Projection evaluation:
 +
 
 +
Single unit control components (manage specific scenario units, manage leader's moves, do recruitment)
 +
 
 +
Village grabbing components
 +
 
 +
Movement components
 +
 
 +
Turn Sequences (Sequences of Candidate moves evaluation)
 +
 
 +
Basically, each part of current AI which does a specific purpose should be available as component. This will allow us to construct the AI from those basic components (Turn Sequence components being the most important, for turn sequence is the core of the play_turn, which is a most important function in the AI )

Revision as of 20:53, 2 April 2009

AI Components

We need to extract those parts of the AIs which make decisions and manage turn flow control into separate functor-like objects, to allow us to experiment in configuring the AI using various compoments.

Possible roles of components:

Position evaluation:

Power Projection evaluation:

Single unit control components (manage specific scenario units, manage leader's moves, do recruitment)

Village grabbing components

Movement components

Turn Sequences (Sequences of Candidate moves evaluation)

Basically, each part of current AI which does a specific purpose should be available as component. This will allow us to construct the AI from those basic components (Turn Sequence components being the most important, for turn sequence is the core of the play_turn, which is a most important function in the AI )