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::DefoggerFeaturizer Class Reference

Copypasted from defoggerFeaturizer on the defogger branch. More...

#include <defoggerfeatures.h>

Public Member Functions

 DefoggerFeaturizer (size_t resX, size_t resY, int32_t strideX, int32_t strideY, bool fullVision=false)
 
torch::Tensor featurize (tc::Frame *frame, int mapX, int mapY, int playerId, at::Device device)
 
void featurize_unit (torch::Tensor &feats, tc::Unit &u, int, int)
 
void inc_feature (torch::Tensor &feature, int32_t c, int32_t x, int32_t y) const
 

Static Public Member Functions

static tc::Frame combine (const std::deque< tc::Frame > &frames, int playerId)
 

Public Attributes

std::array< int, 234 > typemapper
 
std::array< int, 234 > itypemapper
 
size_t feature_size
 
size_t resX
 
size_t resY
 
int32_t strideX
 
int32_t strideY
 
bool fullVision
 

Detailed Description

Copypasted from defoggerFeaturizer on the defogger branch.

Constructor & Destructor Documentation

cherrypi::DefoggerFeaturizer::DefoggerFeaturizer ( size_t  resX,
size_t  resY,
int32_t  strideX,
int32_t  strideY,
bool  fullVision = false 
)
inline

Member Function Documentation

tc::Frame cherrypi::DefoggerFeaturizer::combine ( const std::deque< tc::Frame > &  frames,
int  playerId 
)
static
torch::Tensor cherrypi::DefoggerFeaturizer::featurize ( tc::Frame frame,
int  mapX,
int  mapY,
int  playerId,
at::Device  device 
)
void cherrypi::DefoggerFeaturizer::featurize_unit ( torch::Tensor &  feats,
tc::Unit u,
int  perspective,
int  playerId 
)
void cherrypi::DefoggerFeaturizer::inc_feature ( torch::Tensor &  feature,
int32_t  c,
int32_t  x,
int32_t  y 
) const

Member Data Documentation

size_t cherrypi::DefoggerFeaturizer::feature_size
bool cherrypi::DefoggerFeaturizer::fullVision
std::array<int, 234> cherrypi::DefoggerFeaturizer::itypemapper
size_t cherrypi::DefoggerFeaturizer::resX
size_t cherrypi::DefoggerFeaturizer::resY
int32_t cherrypi::DefoggerFeaturizer::strideX
int32_t cherrypi::DefoggerFeaturizer::strideY
std::array<int, 234> cherrypi::DefoggerFeaturizer::typemapper

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