31 #define DBG_AI_ENGINE_CPP LOG_STREAM(debug, log_ai_engine_cpp)
32 #define LOG_AI_ENGINE_CPP LOG_STREAM(info, log_ai_engine_cpp)
33 #define ERR_AI_ENGINE_CPP LOG_STREAM(err, log_ai_engine_cpp)
47 const std::string aspect_factory_key =
id +
"*" + cfg[
"name"].str();
71 if (!new_candidate_action) {
76 *
b = new_candidate_action;
88 stage_ptr new_stage =
f->second->get_new_instance(context,cfg);
105 goal_ptr new_goal =
f->second->get_new_instance(
ai_,cfg);
106 if (!new_goal || !new_goal->ok()) {
static factory_map & get_list()
static factory_map & get_list()
engine_cpp(readonly_context &context, const config &cfg)
virtual void do_parse_candidate_action_from_config(rca_context &context, const config &cfg, std::back_insert_iterator< std::vector< candidate_action_ptr >> b)
virtual void do_parse_stage_from_config(ai_context &context, const config &cfg, std::back_insert_iterator< std::vector< stage_ptr >> b)
virtual void do_parse_engine_from_config(const config &cfg, std::back_insert_iterator< std::vector< engine_ptr >> b)
virtual void do_parse_goal_from_config(const config &cfg, std::back_insert_iterator< std::vector< goal_ptr >> b)
void do_parse_aspect_from_config(const config &cfg, const std::string &id, std::back_insert_iterator< std::vector< aspect_ptr >> b)
static factory_map & get_list()
static factory_map & get_list()
virtual side_number get_side() const =0
Get the side number.
static factory_map & get_list()
A config object defines a single node in a WML file, with access to child nodes.
#define DBG_AI_ENGINE_CPP
#define ERR_AI_ENGINE_CPP
CPP AI Support engine - creating specific ai components from config.
Standard logging facilities (interface).
A small explanation about what's going on here: Each action has access to two game_info objects First...
std::shared_ptr< engine > engine_ptr
static lg::log_domain log_ai_engine_cpp("ai/engine/cpp")
std::shared_ptr< aspect > aspect_ptr
std::shared_ptr< goal > goal_ptr
std::shared_ptr< stage > stage_ptr
std::shared_ptr< candidate_action > candidate_action_ptr
std::string::const_iterator iterator
candidate action framework