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

#include <microscenarioproviderfixed.h>

Inherits cherrypi::MicroScenarioProvider.

Public Member Functions

 MicroScenarioProviderFixed ()
 
 MicroScenarioProviderFixed (FixedScenario const &)
 
 MicroScenarioProviderFixed (std::string const &scenarioName)
 
void loadScenario (std::string const &scenarioName)
 
void loadScenario (FixedScenario const &)
 
- Public Member Functions inherited from cherrypi::MicroScenarioProvider
virtual ~MicroScenarioProvider ()=default
 
void setReplay (std::string const &path)
 
std::pair< std::shared_ptr< BasePlayer >, std::shared_ptr< BasePlayer > > startNewScenario (const std::function< void(BasePlayer *)> &setup1, const std::function< void(BasePlayer *)> &setup2) override
 Spawns a scenario. More...
 
void endScenario ()
 
std::unique_ptr< Reward > getReward () const
 
void setMapPathPrefix (const std::string &)
 It's possible to run this from not the rootdir of the repository, in which case you can set the mapPathPrefix to where the maps should be found. More...
 
- Public Member Functions inherited from cherrypi::ScenarioProvider
virtual ~ScenarioProvider ()=default
 
ScenarioProvider & setMaxFrames (int value)
 The maximum number of steps to play before considering a scenario finished Defaults to -1, which indicates no maximum. More...
 
ScenarioProvider & setGui (bool value)
 Specifies whether to run OpenBW headfully. More...
 
virtual bool isFinished (int currentStep)
 Check whether the scenario is finished. More...
 

Static Public Member Functions

static std::vector< std::string > listScenarios ()
 

Protected Member Functions

FixedScenario getFixedScenario () override
 
- Protected Member Functions inherited from cherrypi::MicroScenarioProvider
void endGame ()
 
void killAllUnits ()
 
void createNewGame ()
 
void createNewPlayers ()
 
void setupScenario ()
 
bool launchedWithReplay ()
 
MicroPlayer & microPlayer1 ()
 
MicroPlayer & microPlayer2 ()
 
- Protected Member Functions inherited from cherrypi::ScenarioProvider
template<typename TPlayer >
void loadMap (std::string const &map, tc::BW::Race race1, tc::BW::Race race2, GameType gameType, std::string const &replayPath=std::string())
 

Additional Inherited Members

- Protected Attributes inherited from cherrypi::MicroScenarioProvider
std::shared_ptr< tc::Client > client1_
 
std::shared_ptr< tc::Client > client2_
 
std::string replay_
 
std::string mapPathPrefix_
 
FixedScenario scenarioNow_
 
int unitsThisGame_ = 0
 
int unitsTotal_ = 0
 
int unitsSeenTotal_ = 0
 
int scenarioCount_ = 0
 
int resetCount_ = 0
 
- Protected Attributes inherited from cherrypi::ScenarioProvider
int maxFrame_ = 24 * 60 * 60 * 2
 
bool gui_ = false
 
std::shared_ptr< BasePlayer > player1_
 
std::shared_ptr< BasePlayer > player2_
 
std::shared_ptr< GameMultiPlayer > game_
 

Constructor & Destructor Documentation

cherrypi::MicroScenarioProviderFixed::MicroScenarioProviderFixed ( )
inline
cherrypi::MicroScenarioProviderFixed::MicroScenarioProviderFixed ( FixedScenario const &  scenarioInfo)
cherrypi::MicroScenarioProviderFixed::MicroScenarioProviderFixed ( std::string const &  scenarioName)

Member Function Documentation

FixedScenario cherrypi::MicroScenarioProviderFixed::getFixedScenario ( )
overrideprotectedvirtual
std::vector< std::string > cherrypi::MicroScenarioProviderFixed::listScenarios ( )
static
void cherrypi::MicroScenarioProviderFixed::loadScenario ( std::string const &  scenarioName)
void cherrypi::MicroScenarioProviderFixed::loadScenario ( FixedScenario const &  scenarioInfo)

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