TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
Public Member Functions | Public Attributes | List of all members
cherrypi::model::BuildOrderCount Class Reference

Handle on a vector of victory status for each game, giving easy access to relevant figures. More...

#include <bandit.h>

Public Member Functions

 BuildOrderCount ()
 
void addGame (bool won)
 Adds a value to the win history vector. More...
 
void updateLastGame (bool won)
 Updates the last value of the win history vector. More...
 
int numWins () const
 
int numGames () const
 
int numLosses () const
 
float winRate () const
 
const std::vector< bool > & wins () const
 
std::string statusString () const
 Returns a string of type "{numWins}/{numGames}" which is only useful for fast debugging and testing. More...
 
template<class Archive >
void serialize (Archive &ar)
 

Public Attributes

BuildOrderConfig config
 Configuration for the build, providing acceptable races and priors This is not serialized, because the configuration needs to be implemented in one and only one location (see buildOrderConfigurations). More...
 

Detailed Description

Handle on a vector of victory status for each game, giving easy access to relevant figures.

Constructor & Destructor Documentation

cherrypi::model::BuildOrderCount::BuildOrderCount ( )
inline

Member Function Documentation

void cherrypi::model::BuildOrderCount::addGame ( bool  won)
inline

Adds a value to the win history vector.

int cherrypi::model::BuildOrderCount::numGames ( ) const
inline
int cherrypi::model::BuildOrderCount::numLosses ( ) const
inline
int cherrypi::model::BuildOrderCount::numWins ( ) const
inline
template<class Archive >
void cherrypi::model::BuildOrderCount::serialize ( Archive &  ar)
inline
std::string cherrypi::model::BuildOrderCount::statusString ( ) const
inline

Returns a string of type "{numWins}/{numGames}" which is only useful for fast debugging and testing.

void cherrypi::model::BuildOrderCount::updateLastGame ( bool  won)

Updates the last value of the win history vector.

float cherrypi::model::BuildOrderCount::winRate ( ) const
inline
const std::vector<bool>& cherrypi::model::BuildOrderCount::wins ( ) const
inline

Member Data Documentation

BuildOrderConfig cherrypi::model::BuildOrderCount::config

Configuration for the build, providing acceptable races and priors This is not serialized, because the configuration needs to be implemented in one and only one location (see buildOrderConfigurations).

It must therefore be populated when required.


The documentation for this class was generated from the following files: