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

#include <scouting.h>

Inherits cherrypi::Module.

Public Member Functions

virtual ~ScoutingModule ()=default
 
virtual void step (State *s) override
 
void setScoutingGoal (ScoutingGoal)
 
ScoutingGoal goal (State *state) const
 
- Public Member Functions inherited from cherrypi::Module
virtual ~Module ()=default
 
virtual void setPlayer (BasePlayer *p)
 
void setName (std::string name)
 
std::string name ()
 
virtual void onGameStart (State *s)
 
virtual void onGameEnd (State *s)
 

Protected Member Functions

UnitfindUnit (State *state, std::unordered_map< Unit *, float > const &, Position const &pos)
 
bool postTask (State *state, UpcId baseUpcId, Unit *unit, Position loc, ScoutingGoal goal)
 
bool postMoveUPC (State *state, UpcId baseUpcId, Unit *unit, const Position &loc, bool useSafeMove=true)
 
Position nextScoutingLocation (State *state, Unit *unit, std::unordered_map< Position, int > const &)
 
void updateLocations (State *state, std::unordered_map< Position, int > &, std::vector< Position > const &)
 
- Protected Member Functions inherited from cherrypi::Module
 Module ()
 

Protected Attributes

std::unordered_map< Position, int > startingLocations_
 
ScoutingGoal scoutingGoal_ = ScoutingGoal::Automatic
 
- Protected Attributes inherited from cherrypi::Module
BasePlayerplayer_
 
std::string name_
 

Additional Inherited Members

- Static Public Member Functions inherited from cherrypi::Module
template<typename T , typename... Args>
static std::shared_ptr< T > make (Args &&...args)
 
static std::shared_ptr< Modulemake (std::string const &typeName)
 
static std::string makeName (std::type_index const &type)
 

Constructor & Destructor Documentation

virtual cherrypi::ScoutingModule::~ScoutingModule ( )
virtualdefault

Member Function Documentation

Unit * cherrypi::ScoutingModule::findUnit ( State state,
std::unordered_map< Unit *, float > const &  candidates,
Position const &  pos 
)
protected
ScoutingGoal cherrypi::ScoutingModule::goal ( State state) const
Position cherrypi::ScoutingModule::nextScoutingLocation ( State state,
Unit unit,
std::unordered_map< Position, int > const &  locations 
)
protected
bool cherrypi::ScoutingModule::postMoveUPC ( State state,
UpcId  baseUpcId,
Unit unit,
const Position loc,
bool  useSafeMove = true 
)
protected
bool cherrypi::ScoutingModule::postTask ( State state,
UpcId  baseUpcId,
Unit unit,
Position  loc,
ScoutingGoal  goal 
)
protected
void cherrypi::ScoutingModule::setScoutingGoal ( ScoutingGoal  goal)
void cherrypi::ScoutingModule::step ( State s)
overridevirtual

Reimplemented from cherrypi::Module.

void cherrypi::ScoutingModule::updateLocations ( State state,
std::unordered_map< Position, int > &  locations,
std::vector< Position > const &  candidates 
)
protected

Member Data Documentation

ScoutingGoal cherrypi::ScoutingModule::scoutingGoal_ = ScoutingGoal::Automatic
protected
std::unordered_map<Position, int> cherrypi::ScoutingModule::startingLocations_
protected

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