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

From The Battle for Wesnoth Wiki
m (AI Configuration)
m
Line 10: Line 10:
 
--
 
--
  
return back to [[SummerOfCodeProposal_AI_Improvement_Crab|Summer Of Code Proposal of Crab]]
+
return back to [[SummerOfCodeProposal_AI_Improvement_Crab#AI_Module|Summer Of Code Proposal of Crab]]

Revision as of 22:03, 2 April 2009

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 them from a single config or from a file.

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.


--

return back to Summer Of Code Proposal of Crab