20 #ifndef AI_TESTING_CA_TESTING_MOVE_TO_TARGETS_HPP_INCLUDED
21 #define AI_TESTING_CA_TESTING_MOVE_TO_TARGETS_HPP_INCLUDED
30 #pragma warning(disable:4250)
41 namespace ai_default_rca {
59 double compare_groups(
const std::set<map_location>& our_group,
const std::set<map_location>& their_group,
const std::vector<map_location>& battlefield)
const;
67 double rate_group(
const std::set<map_location>&
group,
const std::vector<map_location>& battlefield)
const;
map_location form_group(const std::vector< map_location > &route, const move_map &dstsrc, std::set< map_location > &res)
move_to_targets_phase(rca_context &context, const config &cfg)
std::multimap< map_location, map_location > move_map
The standard way in which a map of possible moves is recorded.
std::pair< map_location, map_location > choose_move(std::vector< target > &targets, const move_map &srcdst, const move_map &dstsrc, const move_map &enemy_dstsrc)
A small explanation about what's going on here: Each action has access to two game_info objects First...
virtual double evaluate()
Evaluate the candidate action, resetting the internal state of the action.
Structure which holds a single route between one location and another.
double rate_group(const std::set< map_location > &group, const std::vector< map_location > &battlefield) const
Encapsulates the map of the game.
double rate_target(const target &tg, const unit_map::iterator &u, const move_map &dstsrc, const move_map &enemy_dstsrc, const pathfind::plain_route &rt)
rate a target, but can also return the maximal possible rating by passing a dummy route ...
void enemies_along_path(const std::vector< map_location > &route, const move_map &dstsrc, std::set< map_location > &res)
bool move_group(const map_location &dst, const std::vector< map_location > &route, const std::set< map_location > &units)
double compare_groups(const std::set< map_location > &our_group, const std::set< map_location > &their_group, const std::vector< map_location > &battlefield) const
A config object defines a single node in a WML file, with access to child nodes.
bool should_retreat(const map_location &loc, const unit_map::const_iterator &un, const move_map &srcdst, const move_map &dstsrc, const move_map &enemy_dstsrc, double caution)
void access_points(const move_map &srcdst, const map_location &u, const map_location &dst, std::vector< map_location > &out)
virtual ~move_to_targets_phase()
candidate action framework
virtual void execute()
Execute the candidate action.