58 virtual std::string
evaluate(
const std::string &str);
void apply_micro_ai(const config &cfg)
std::string get_engine_code(const config &) const
virtual void do_parse_stage_from_config(ai_context &context, const config &cfg, std::back_insert_iterator< std::vector< stage_ptr > > b)
Taka a config (with engine=lua in it) and parse several (usually, 1) stages out of it.
virtual void do_parse_aspect_from_config(const config &cfg, const std::string &id, std::back_insert_iterator< std::vector< aspect_ptr > > b)
Taka a config (with engine=lua in it) and parse several (usually, 1) aspects out of it.
virtual void do_parse_candidate_action_from_config(rca_context &context, const config &cfg, std::back_insert_iterator< std::vector< candidate_action_ptr > > b)
Taka a config (with engine=lua in it) and parse several (usually, 1) candidate actions out of it.
virtual config to_config() const
Serialize to config.
std::shared_ptr< lua_ai_context > lua_ai_context_
virtual std::string evaluate(const std::string &str)
engine_lua(readonly_context &context, const config &cfg)
Note that initially we get access only to readonly context (engine is created rather early,...
virtual void do_parse_goal_from_config(const config &cfg, std::back_insert_iterator< std::vector< goal_ptr > > b)
std::string code_
The underlying lua code.
virtual void push_ai_table()
Method that pushes the AI table of the lua_context on the stack for debugging purposes.
A config object defines a single node in a WML file, with access to child nodes.
AI Support engine - creating specific ai components from config.
A small explanation about what's going on here: Each action has access to two game_info objects First...