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

Launches a game series against a bot using StarCraft: Brood War(TM) via Wine. More...

#include <gamevsbot.h>

Public Member Functions

 GameVsBotInWine (std::vector< std::string > maps, std::string enemyBot, std::string outputPath="playoutput", std::vector< EnvVar > vars={})
 
 GameVsBotInWine (std::string map, std::string enemyBot, std::string outputPath="playoutput", std::vector< EnvVar > vars={})
 
 ~GameVsBotInWine ()
 
std::shared_ptr< torchcraft::ClientmakeClient (torchcraft::Client::Options opts=torchcraft::Client::Options())
 Construct a client to connect to a new game in the series. More...
 
void setAutoDelete (bool autoDelete)
 Whether to automatically delete the series path when destructing the instance. More...
 
size_t numGamesStarted () const
 The number of games that have been started in this series. More...
 
std::string path () const
 Path to playoutput directory for this series. More...
 
std::string enemyBot () const
 Enemy bot as specified in the constructor. More...
 

Detailed Description

Launches a game series against a bot using StarCraft: Brood War(TM) via Wine.

makeClient() can be called repeatedly to advance the series after each game.

This scenario is backed by /scripts/ladder/play.

Constructor & Destructor Documentation

cherrypi::GameVsBotInWine::GameVsBotInWine ( std::vector< std::string >  maps,
std::string  enemyBot,
std::string  outputPath = "playoutput",
std::vector< EnvVar vars = {} 
)
cherrypi::GameVsBotInWine::GameVsBotInWine ( std::string  map,
std::string  enemyBot,
std::string  outputPath = "playoutput",
std::vector< EnvVar vars = {} 
)
cherrypi::GameVsBotInWine::~GameVsBotInWine ( )

Member Function Documentation

std::string cherrypi::GameVsBotInWine::enemyBot ( ) const
inline

Enemy bot as specified in the constructor.

std::shared_ptr< tc::Client > cherrypi::GameVsBotInWine::makeClient ( torchcraft::Client::Options  opts = torchcraft::Client::Options())

Construct a client to connect to a new game in the series.

size_t cherrypi::GameVsBotInWine::numGamesStarted ( ) const
inline

The number of games that have been started in this series.

Calling makeClient() will increase this counter.

std::string cherrypi::GameVsBotInWine::path ( ) const
inline

Path to playoutput directory for this series.

void cherrypi::GameVsBotInWine::setAutoDelete ( bool  autoDelete)

Whether to automatically delete the series path when destructing the instance.


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