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

Play back a Brood War replay using OpenBW. More...

#include <replayer.h>

Inherits cherrypi::TCReplayer.

Public Member Functions

 Replayer (std::string replayPath)
 
 Replayer (ReplayerConfiguration)
 
virtual ~Replayer () override
 
void setPerspective (PlayerId)
 Convenience wrapper for State::setPerspective() More...
 
Statestate ()
 
virtual void onStep () override
 
- Public Member Functions inherited from cherrypi::TCReplayer
 TCReplayer (std::string replayPath)
 
 TCReplayer (ReplayerConfiguration)
 
virtual ~TCReplayer ()
 
torchcraft::Statetcstate () const
 
void init ()
 
void step ()
 
void run ()
 
bool isComplete ()
 

Protected Attributes

std::unique_ptr< Statestate_
 
- Protected Attributes inherited from cherrypi::TCReplayer
ReplayerConfiguration configuration_
 
std::unique_ptr< OpenBwProcessopenbw_
 
std::shared_ptr< torchcraft::Clientclient_
 
bool initialized_ = false
 

Detailed Description

Play back a Brood War replay using OpenBW.

Runs the bot alongside the replay, and provides access to the bot's state.

Constructor & Destructor Documentation

cherrypi::Replayer::Replayer ( std::string  replayPath)
cherrypi::Replayer::Replayer ( ReplayerConfiguration  configuration)
virtual cherrypi::Replayer::~Replayer ( )
inlineoverridevirtual

Member Function Documentation

void cherrypi::Replayer::onStep ( )
overridevirtual

Reimplemented from cherrypi::TCReplayer.

void cherrypi::Replayer::setPerspective ( PlayerId  playerId)

Convenience wrapper for State::setPerspective()

State * cherrypi::Replayer::state ( )

Member Data Documentation

std::unique_ptr<State> cherrypi::Replayer::state_
protected

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