TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
|
Functions | |
void | extractCandidateEnemyStartLocations (torch::Tensor t, State *state, Rect const &r) |
2D tensor representation of whether a tile is a start location. More... | |
void | noop (torch::Tensor, State *, Rect const &) |
void | extractGroundHeight (torch::Tensor t, State *state, Rect const &r) |
Extracts a 2D tensor of ground height, which impacts vision and the probability that a bullet attack will miss. More... | |
void | extractWalkability (torch::Tensor t, State *state, Rect const &r) |
Extracts a 2D tensor of whether the terrain on a walktile is walkable by ground units. More... | |
void | extractOneHotGroundHeight (torch::Tensor t, State *state, Rect const &r) |
Extracts a 3D tensor of ground height, where each of the 3 ground heights (plus "on the map") is a one-hot dimension. More... | |
void | extractBuildability (torch::Tensor, State *, Rect const &) |
void | extractTallDoodad (torch::Tensor t, State *state, Rect const &r) |
Extracts a 2D tensor of the presence of tall doodads, which impact vision and the probability that a bullet attack will miss. More... | |
void | extractStartLocations (torch::Tensor t, State *state, Rect const &r) |
Set tensor to '1' for every start location reported by TorchCraft. More... | |
void | extractXYGrid (torch::Tensor t, State *state, Rect const &r) |
Grid of X/Y coordinates. More... | |
void | extractResources (torch::Tensor t, State *state, Rect const &r) |
Set tensor to '1' for every walktile occupied by resources. More... | |
void | extractHasStructure (torch::Tensor t, State *state, Rect const &r) |
Set tensor to '1' for every walktile occupied by a structure. More... | |
void | extractFogOfWar (torch::Tensor t, State *state, Rect const &r) |
2D tensor representation of whether a tile is visible to the current player (as opposed to being in the fog of war). More... | |
void | extractCreep (torch::Tensor t, State *state, Rect const &r) |
2D tensor representation of whether a tile has creep More... | |
void | extractReservedAsUnbuildable (torch::Tensor t, State *state, Rect const &r) |
2D tensor representation of whether we have reserved this area for placing a building, rendering it unavailable for further buildings. More... | |
void cherrypi::featureimpl::extractCandidateEnemyStartLocations | ( | torch::Tensor | t, |
State * | state, | ||
Rect const & | r | ||
) |
2D tensor representation of whether a tile is a start location.
2D tensor representation of whether a tile has creep
2D tensor representation of whether a tile is visible to the current player (as opposed to being in the fog of war).
Extracts a 2D tensor of ground height, which impacts vision and the probability that a bullet attack will miss.
Ignores the presence of doodads.
See https://bwapi.github.io/class_b_w_a_p_i_1_1_game.html#a94eb3e3fe7850078c2086638a46214be
Set tensor to '1' for every walktile occupied by a structure.
void cherrypi::featureimpl::extractOneHotGroundHeight | ( | torch::Tensor | t, |
State * | state, | ||
Rect const & | r | ||
) |
Extracts a 3D tensor of ground height, where each of the 3 ground heights (plus "on the map") is a one-hot dimension.
Ignores the presence of doodads.
See https://bwapi.github.io/class_b_w_a_p_i_1_1_game.html#a94eb3e3fe7850078c2086638a46214be
void cherrypi::featureimpl::extractReservedAsUnbuildable | ( | torch::Tensor | t, |
State * | state, | ||
Rect const & | r | ||
) |
2D tensor representation of whether we have reserved this area for placing a building, rendering it unavailable for further buildings.
Set tensor to '1' for every walktile occupied by resources.
void cherrypi::featureimpl::extractStartLocations | ( | torch::Tensor | t, |
State * | state, | ||
Rect const & | r | ||
) |
Set tensor to '1' for every start location reported by TorchCraft.
Extracts a 2D tensor of the presence of tall doodads, which impact vision and the probability that a bullet attack will miss.
See https://bwapi.github.io/class_b_w_a_p_i_1_1_game.html#a94eb3e3fe7850078c2086638a46214be
Extracts a 2D tensor of whether the terrain on a walktile is walkable by ground units.
See https://bwapi.github.io/class_b_w_a_p_i_1_1_game.html#a91153ca71797617ce225adf28d508510
Grid of X/Y coordinates.
Channel 0 for Y, channel 1 for X. Uniform stepping with 1/512