33 #define DBG_AI_ENGINE_FAI LOG_STREAM(debug, log_ai_engine_fai)
34 #define LOG_AI_ENGINE_FAI LOG_STREAM(info, log_ai_engine_fai)
35 #define ERR_AI_ENGINE_FAI LOG_STREAM(err, log_ai_engine_fai)
40 #pragma warning(disable:4250)
77 :
engine(context,cfg), formula_ai_(new
formula_ai(context,cfg.child_or_empty(
"formula_ai")))
93 DBG_AI_ENGINE_FAI <<
"config snippet contains: " << std::endl << cfg << std::endl;
113 if (name==
"side_formulas") {
115 }
else if (name==
"unit_formulas") {
118 ERR_AI_ENGINE_FAI <<
"unknown type of formula_ai stage: ["<< name <<
"]"<<std::endl;
134 if (context!=
nullptr) {
boost::shared_ptr< stage > stage_ptr
Defines formula ai candidate actions - headers.
fai_candidate_action_wrapper(rca_context &context, const config &cfg, game_logic::candidate_action_ptr fai_ca, formula_ai &_formula_ai)
virtual void execute()
Execute the candidate action.
#define ERR_AI_ENGINE_FAI
FAI AI Support engine - creating specific ai components from config.
GLdouble GLdouble GLdouble b
virtual ~fai_candidate_action_wrapper()
A small explanation about what's going on here: Each action has access to two game_info objects First...
virtual std::string evaluate(const std::string &str)
virtual config to_config() const
serialize
virtual config to_config() const
serialize
game_logic::candidate_action_ptr fai_ca_
config & add_child(const std::string &key)
#define DBG_AI_ENGINE_FAI
virtual double evaluate()
Evaluate the candidate action, resetting the internal state of the action.
engine_fai(readonly_context &context, const config &cfg)
boost::shared_ptr< candidate_action > candidate_action_ptr
GLuint const GLchar * name
static lg::log_domain log_ai_engine_fai("ai/engine/fai")
virtual config to_config() const
serialize
Standard logging facilities (interface).
virtual side_number get_side() const =0
Get the side number.
boost::shared_ptr< formula_ai > formula_ai_
A config object defines a single node in a WML file, with access to child nodes.
virtual void do_parse_candidate_action_from_config(rca_context &context, const config &cfg, std::back_insert_iterator< std::vector< candidate_action_ptr > > b)
GLsizei const GLcharARB ** string
virtual void set_ai_context(ai_context *context)
candidate action framework
virtual void do_parse_stage_from_config(ai_context &context, const config &cfg, std::back_insert_iterator< std::vector< stage_ptr > > b)