TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
cherrypi::bos::Sample Struct Reference

#include <sample.h>

Public Member Functions

 Sample ()=default
 
 Sample (State *state, int res, int sride, std::shared_ptr< StaticData > sd=nullptr)
 
virtual ~Sample ()=default
 
template<class Archive >
void serialize (Archive &ar, uint32_t const version)
 
torch::Tensor featurize (BosFeature feature, torch::Tensor buffer=torch::Tensor()) const
 
ag::tensor_list featurize (std::vector< BosFeature > features) const
 
void renormV2Features ()
 

Static Public Member Functions

static std::map< int, autobuild::BuildStatesimulateAbbo (State *state, std::string const &buildOrder, std::vector< int > const &frameOffsets)
 

Public Attributes

std::shared_ptr< StaticDatastaticData
 
FeatureData units
 Defogger style unit types in spatial representation. More...
 
FrameNum frame
 Frame number of this sample. More...
 
tc::Resources resources
 Our resources. More...
 
std::string buildOrder
 Current build order. More...
 
std::string nextBuildOrder
 Build order until next sample. More...
 
bool switched = false
 Whether we've switched the build order after taking this sample. More...
 
uint64_t pendingUpgrades = 0
 Upgrades that are currently being researched. More...
 
uint64_t pendingUpgradesLevel = 0
 Levels for upgrades that are currently researched. More...
 
uint64_t pendingTechs = 0
 Techs that are currently being researched. More...
 
std::map< int, autobuild::BuildStatenextAbboStates
 Future autobuild states for given frame offsets. More...
 

Constructor & Destructor Documentation

cherrypi::bos::Sample::Sample ( )
default
cherrypi::bos::Sample::Sample ( State state,
int  res,
int  sride,
std::shared_ptr< StaticData sd = nullptr 
)
virtual cherrypi::bos::Sample::~Sample ( )
virtualdefault

Member Function Documentation

torch::Tensor cherrypi::bos::Sample::featurize ( BosFeature  feature,
torch::Tensor  buffer = torch::Tensor() 
) const
ag::tensor_list cherrypi::bos::Sample::featurize ( std::vector< BosFeature features) const
void cherrypi::bos::Sample::renormV2Features ( )
template<class Archive >
void cherrypi::bos::Sample::serialize ( Archive &  ar,
uint32_t const  version 
)
inline
std::map< int, autobuild::BuildState > cherrypi::bos::Sample::simulateAbbo ( State state,
std::string const &  buildOrder,
std::vector< int > const &  frameOffsets 
)
static

Member Data Documentation

std::string cherrypi::bos::Sample::buildOrder

Current build order.

FrameNum cherrypi::bos::Sample::frame

Frame number of this sample.

std::map<int, autobuild::BuildState> cherrypi::bos::Sample::nextAbboStates

Future autobuild states for given frame offsets.

std::string cherrypi::bos::Sample::nextBuildOrder

Build order until next sample.

uint64_t cherrypi::bos::Sample::pendingTechs = 0

Techs that are currently being researched.

uint64_t cherrypi::bos::Sample::pendingUpgrades = 0

Upgrades that are currently being researched.

uint64_t cherrypi::bos::Sample::pendingUpgradesLevel = 0

Levels for upgrades that are currently researched.

tc::Resources cherrypi::bos::Sample::resources

Our resources.

std::shared_ptr<StaticData> cherrypi::bos::Sample::staticData
bool cherrypi::bos::Sample::switched = false

Whether we've switched the build order after taking this sample.

FeatureData cherrypi::bos::Sample::units

Defogger style unit types in spatial representation.


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