#include <ai.hpp>


Public Member Functions | |
| ai_composite (default_ai_context &context, const config &cfg) | |
| Constructor. | |
| virtual | ~ai_composite () |
| Destructor. | |
| void | play_turn () |
| Play the turn. | |
| virtual std::string | evaluate (const std::string &str) |
| Evaluate command (using fai). | |
| virtual void | new_turn () |
| On new turn. | |
| std::string | describe_self () const |
| virtual config | to_config () const |
| serialize | |
| int | get_recursion_count () const |
| void | switch_side (side_number side) |
| virtual bool | add_goal (const config &cfg) |
| virtual bool | add_stage (const config &cfg) |
| void | create_stage (std::vector< stage_ptr > &stages, const config &cfg) |
| void | create_goal (std::vector< goal_ptr > &goals, const config &cfg) |
| void | create_engine (std::vector< engine_ptr > &engines, const config &cfg) |
| void | on_create () |
| virtual ai_context & | get_ai_context () |
| unwrap | |
| virtual std::string | get_id () const |
| virtual std::string | get_name () const |
| virtual std::string | get_engine () const |
Protected Attributes | |
| const config & | cfg_ |
| Config of the AI. | |
| std::vector< stage_ptr > | stages_ |
| Stages of the composite AI. | |
| recursion_counter | recursion_counter_ |
| Recursion counter. | |
Definition at line 37 of file ai.hpp.
| ai::ai_composite::ai_composite | ( | default_ai_context & | context, | |
| const config & | cfg | |||
| ) |
| ai::ai_composite::~ai_composite | ( | ) | [virtual] |
Destructor.
Definition at line 98 of file ai.cpp.
References ai::engine::parse_goal_from_config().

| bool ai::ai_composite::add_goal | ( | const config & | cfg | ) | [virtual] |
| bool ai::ai_composite::add_stage | ( | const config & | cfg | ) | [virtual] |
Definition at line 103 of file ai.cpp.
References ai::engine::parse_engine_from_config().

| void ai::ai_composite::create_engine | ( | std::vector< engine_ptr > & | engines, | |
| const config & | cfg | |||
| ) |
| std::string ai::ai_composite::describe_self | ( | ) | const |
Definition at line 36 of file ai.cpp.
References ai::log_ai_composite.
| std::string ai::ai_composite::evaluate | ( | const std::string & | str | ) | [virtual] |
| ai_context & ai::ai_composite::get_ai_context | ( | ) | [virtual] |
unwrap
Definition at line 188 of file ai.cpp.
References ai::recursion_counter::get_count(), and recursion_counter_.

| std::string ai::ai_composite::get_engine | ( | ) | const [virtual] |
Implements ai::component.
| std::string ai::ai_composite::get_id | ( | ) | const [virtual] |
Implements ai::component.
| std::string ai::ai_composite::get_name | ( | ) | const [virtual] |
Implements ai::component.
| int ai::ai_composite::get_recursion_count | ( | ) | const |
Definition at line 178 of file ai.cpp.
References ai::readonly_context_proxy::invalidate_defensive_position_cache(), ai::readonly_context_proxy::invalidate_keeps_cache(), and ai::readonly_context_proxy::recalculate_move_maps().

| void ai::ai_composite::new_turn | ( | ) | [virtual] |
| void ai::ai_composite::switch_side | ( | side_number | side | ) |
| config ai::ai_composite::to_config | ( | ) | const [virtual] |
serialize
Definition at line 194 of file ai.cpp.
References ai::side_context_proxy::set_side().

const config& ai::ai_composite::cfg_ [protected] |
std::vector< stage_ptr > ai::ai_composite::stages_ [protected] |
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:18:21 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |