TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
|
A variant of UnitTypeDefoggerFeaturizer that stores the target type of morphing units. More...
#include <unitsfeatures.h>
Inherits cherrypi::UnitTypeDefoggerFeaturizer.
Public Member Functions | |
UnitTypeMDefoggerFeaturizer () | |
virtual Data | extract (State *state, UnitsInfo::Units const &units, Rect const &boundingBox=Rect()) |
Extract unit features for a given set of units. More... | |
Public Member Functions inherited from cherrypi::UnitTypeDefoggerFeaturizer | |
UnitTypeDefoggerFeaturizer () | |
int | mapType (int unitType) const |
int | unmapType (int mappedType) const |
FeatureData | toDefoggerFeature (Data const &data, int res, int stride) const |
Public Member Functions inherited from cherrypi::UnitAttributeFeaturizer | |
virtual | ~UnitAttributeFeaturizer ()=default |
Data | extract (State *state, Rect const &boundingBox=Rect()) |
Extract unit features for all live units. More... | |
Data | extract (State *state, UnitFilter filter, Rect const &boundingBox=Rect()) |
Extract unit features for all live units that pass the given filter. More... | |
FeatureData | toSpatialFeature (Data const &data, SubsampleMethod pooling=SubsampleMethod::Sum) const |
Embeds the unit attribute data into a spatial feature. More... | |
void | toSpatialFeature (FeatureData *dest, Data const &data, SubsampleMethod pooling=SubsampleMethod::Sum) const |
Embeds the unit attribute data into a spatial feature. More... | |
Static Public Attributes | |
static int constexpr | kNumUnitTypes = 118 * 2 |
Static Public Attributes inherited from cherrypi::UnitTypeDefoggerFeaturizer | |
static int constexpr | kNumUnitTypes = 118 * 2 |
Additional Inherited Members | |
Public Types inherited from cherrypi::UnitAttributeFeaturizer | |
using | UnitFilter = std::function< bool(Unit *)> |
using | TensorDest = torch::TensorAccessor< float, 1 > |
Public Attributes inherited from cherrypi::UnitAttributeFeaturizer | |
std::shared_ptr< BaseJitter > | jitter = std::make_shared<NoJitter>() |
Optional jittering of unit positions. More... | |
CustomFeatureType | type |
std::string | name |
int | numChannels |
Protected Member Functions inherited from cherrypi::UnitTypeDefoggerFeaturizer | |
virtual void | extractUnit (TensorDest acc, Unit *unit) override |
Reimplement this in actual featurizers. More... | |
Protected Attributes inherited from cherrypi::UnitTypeDefoggerFeaturizer | |
std::array< int, 234 > * | typemap_ |
std::array< int, 234 > * | itypemap_ |
A variant of UnitTypeDefoggerFeaturizer that stores the target type of morphing units.
Morphing Zerglings will be featurized as two units.
cherrypi::UnitTypeMDefoggerFeaturizer::UnitTypeMDefoggerFeaturizer | ( | ) |
|
virtual |
Extract unit features for a given set of units.
XXX copy-pasta from UnitAttributeFeaturizer...
Reimplemented from cherrypi::UnitAttributeFeaturizer.
|
static |