31 #define DBG_AI_TESTING LOG_STREAM(debug, log_ai_testing)
32 #define LOG_AI_TESTING LOG_STREAM(info, log_ai_testing)
33 #define ERR_AI_TESTING LOG_STREAM(err, log_ai_testing)
48 team& current_team = (*resources::teams)[side-1];
53 int _gold = current_team.
gold();
54 int _villages = current_team.
villages().size();
57 DBG_AI_TESTING << msg << side <<
": " << _turn_number << std::endl;
58 DBG_AI_TESTING << msg <<
"_UNITS" << side <<
": " << _units << std::endl;
59 DBG_AI_TESTING << msg <<
"_UNITS_COST" << side <<
": " << _units_cost << std::endl;
60 DBG_AI_TESTING << msg <<
"_GOLD" << side <<
": " << _gold << std::endl;
61 DBG_AI_TESTING << msg <<
"_VILLAGES" << side <<
": " << _villages << std::endl;
62 DBG_AI_TESTING << msg <<
"_INCOME" << side <<
": " << _income << std::endl;
65 c[
"side"] =
int(side);
66 c[
"turn"] = _turn_number;
69 c[
"units_cost"] = _units_cost;
71 c[
"villages"] = _villages;
84 for(std::set<unsigned int>::const_iterator
w = winners.begin();
w != winners.end(); ++
w) {
int side_units(int side_num) const
Returns the number of units of the side side_num.
static void log_turn_start(unsigned int side)
static void log_turn_end(unsigned int side)
::tod_manager * tod_manager
static void log_turn(const char *msg, unsigned int side)
void add_log_data(const std::string &key, const std::string &var)
static void log_victory(std::set< unsigned int > teams)
Gather statistics important for AI testing and output them.
static void log_game_end()
This class stores all the data for a single 'side' (in game nomenclature).
std::vector< team > * teams
GLubyte GLubyte GLubyte GLubyte w
Managing the AIs lifecycle - headers.
const std::set< map_location > & villages() const
typedef int(WINAPI *PFNWGLRELEASEPBUFFERDCARBPROC)(HPBUFFERARB hPbuffer
static void log_game_start()
Templates and utility-routines for strings and numbers.
const std::string revision
static std::string get_active_ai_identifier_for_side(side_number side)
Gets AI algorithm identifier for active AI of the given side.
static void msg(const char *act, debug_info &i, const char *to="", const char *result="")
static lg::log_domain log_ai_testing("ai/testing")
int side_units_cost(int side_num) const
Returns the total cost of units of side side_num.
Standard logging facilities (interface).
A config object defines a single node in a WML file, with access to child nodes.