Blizzard / s2client-api

StarCraft II Client - C++ library supported on Windows, Linux and Mac designed for building scripted bots and research using the SC2API.
MIT License
1.66k stars 281 forks source link

How to get the feature maps #144

Closed breadbread1984 closed 7 years ago

breadbread1984 commented 7 years ago

How to get the 20 feature maps mentioned in the paper StarCraftII: A New Challenge for Reinforcement Learning?

KevinCalderone commented 7 years ago

See the "feature_layers" example.

const SC2APIProtocol::Observation* observation = Observation()->GetRawObservation();

// Map images
const SC2APIProtocol::FeatureLayers& m = observation->feature_layer_data().renders();
m.height_map();
m.visibility_Map();
m.creep();
...

// Minimap images
const SC2APIProtocol::FeatureLayersMinimap& mi = observation->feature_layer_data().minimap_renders();
mi.height_map();
mi.visibility_map();
mi.creep();
...