14 #include <torch/torch.h> 35 bool fullVision =
false)
40 fullVision(fullVision) {
41 this->feature_size = 118;
44 for (
auto t : tc::BW::UnitType::_values()) {
45 typemapper.at(t._to_integral()) = i;
46 itypemapper.at(i) = t._to_integral();
58 void inc_feature(torch::Tensor& feature, int32_t c, int32_t x, int32_t y)
size_t resY
Definition: defoggerfeatures.h:26
int32_t strideX
Definition: defoggerfeatures.h:27
int32_t strideY
Definition: defoggerfeatures.h:27
std::array< int, 234 > typemapper
Definition: defoggerfeatures.h:23
size_t resX
Definition: defoggerfeatures.h:26
DefoggerFeaturizer(size_t resX, size_t resY, int32_t strideX, int32_t strideY, bool fullVision=false)
Definition: defoggerfeatures.h:30
std::array< int, 234 > itypemapper
Definition: defoggerfeatures.h:24
torch::Tensor featurize(tc::Frame *frame, int mapX, int mapY, int playerId, at::Device device)
Definition: defoggerfeatures.cpp:85
Copypasted from defoggerFeaturizer on the defogger branch.
Definition: defoggerfeatures.h:21
static tc::Frame combine(const std::deque< tc::Frame > &frames, int playerId)
Definition: defoggerfeatures.cpp:12
size_t feature_size
Definition: defoggerfeatures.h:25
Main namespace for bot-related code.
Definition: areainfo.cpp:17
bool fullVision
Definition: defoggerfeatures.h:28
void featurize_unit(torch::Tensor &feats, tc::Unit &u, int, int)
Definition: defoggerfeatures.cpp:114
void inc_feature(torch::Tensor &feature, int32_t c, int32_t x, int32_t y) const
Definition: defoggerfeatures.cpp:126