32 #define DBG_AI_ENGINE_FAI LOG_STREAM(debug, log_ai_engine_fai)
33 #define LOG_AI_ENGINE_FAI LOG_STREAM(info, log_ai_engine_fai)
34 #define ERR_AI_ENGINE_FAI LOG_STREAM(err, log_ai_engine_fai)
68 :
engine(context,cfg), formula_ai_(new
formula_ai(context,cfg.child_or_empty(
"formula_ai")))
85 auto ca = std::make_shared<fai_candidate_action_wrapper>(context, cfg, fai_ca, *
formula_ai_);
93 const std::string &name = cfg[
"name"];
100 if (name==
"side_formulas") {
101 st_ptr = std::make_shared<stage_side_formulas>(context, cfg, *
formula_ai_);
102 }
else if (name==
"unit_formulas") {
103 st_ptr = std::make_shared<stage_unit_formulas>(context, cfg, *
formula_ai_);
120 if (context!=
nullptr) {
Defines formula ai candidate actions - headers.
virtual config to_config() const
serialize
virtual std::string evaluate(const std::string &str)
virtual void set_ai_context(ai_context *context)
std::shared_ptr< formula_ai > formula_ai_
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)
engine_fai(readonly_context &context, const config &cfg)
virtual config to_config() const
serialize
wfl::candidate_action_ptr fai_ca_
fai_candidate_action_wrapper(rca_context &context, const config &cfg, wfl::candidate_action_ptr fai_ca, formula_ai &_formula_ai)
virtual config to_config() const
serialize
virtual ~fai_candidate_action_wrapper()
virtual void execute()
Execute the candidate action.
virtual double evaluate()
Evaluate the candidate action, resetting the internal state of the action.
virtual side_number get_side() const =0
Get the side number.
A config object defines a single node in a WML file, with access to child nodes.
config & add_child(config_key_type key)
#define ERR_AI_ENGINE_FAI
#define DBG_AI_ENGINE_FAI
FAI 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< stage > stage_ptr
std::shared_ptr< candidate_action > candidate_action_ptr
static lg::log_domain log_ai_engine_fai("ai/engine/fai")
candidate action framework