29 namespace ai_default_rca {
79 void remove_goal(
const std::string &
id);
132 typedef std::vector<std::pair<map_location ,
139 void dispatch(treachmap& reachmap, tmoves& moves);
145 bool dispatch_unit_simple(treachmap& reachmap, tmoves& moves);
151 bool dispatch_village_simple(
152 treachmap& reachmap, tmoves& moves, std::size_t& village_count);
156 treachmap& reachmap, tmoves& moves,
const map_location& village);
163 void dispatch_complex(
164 treachmap& reachmap, tmoves& moves,
const std::size_t village_count);
167 void full_dispatch(treachmap& reachmap, tmoves& moves);
170 void dump_reachmap(treachmap& reachmap);
179 const std::multimap<map_location,map_location>& dstsrc,
180 const std::multimap<map_location,map_location>& enemy_dstsrc);
int dispatch(lua_State *L)
std::vector< std::pair< map_location, map_location > > tmoves
This class represents a single unit of a specific type.
goto_phase(rca_context &context, const config &cfg)
map_location best_leader_loc_
The best possible location for our leader if it can't reach a village.
map_location keep_loc_
Location of the keep the closest to our leader.
std::shared_ptr< move_result > move_result_ptr
std::multimap< map_location, map_location > move_map
The standard way in which a map of possible moves is recorded.
A small explanation about what's going on here: Each action has access to two game_info objects First...
Encapsulates the map of the game.
map_location leader_loc_
Locaton of our leader.
bool debug_
debug log level for AI enabled?
std::map< map_location, std::vector< map_location > > treachmap
virtual double evaluate()
Evaluate the candidate action, resetting the internal state of the action.
A config object defines a single node in a WML file, with access to child nodes.
virtual void execute()
Execute the candidate action.
std::string::const_iterator iterator
candidate action framework
attack_analysis best_analysis_