|
| UnitTypeFeaturizer () |
|
FeatureData | toOneHotSpatialFeature (Data const &data, int unitValueOffset, std::unordered_map< int, int > const &channelValues) const |
|
virtual | ~UnitAttributeFeaturizer ()=default |
|
virtual Data | extract (State *state, UnitsInfo::Units const &units, Rect const &boundingBox=Rect()) |
| Extract unit features for a given set of units. More...
|
|
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...
|
|
Sparse featurizer for numeric unit types.
This will produce a single-channel feature that contains a unit type ID for each unit. Unit IDs are mutually exclusive for allied (0-232), enemy (233-465) and neutral units (466-698).
The resulting sparse feature is suitable for embedding via lookup tables.