TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
|
Determines positions for buildings. More...
#include <buildingplacer.h>
Inherits cherrypi::Module.
Public Member Functions | |
virtual | ~BuildingPlacerModule ()=default |
virtual void | step (State *s) override |
virtual void | onGameStart (State *state) override |
Public Member Functions inherited from cherrypi::Module | |
virtual | ~Module ()=default |
virtual void | setPlayer (BasePlayer *p) |
void | setName (std::string name) |
std::string | name () |
virtual void | onGameEnd (State *s) |
Additional Inherited Members | |
Static Public Member Functions inherited from cherrypi::Module | |
template<typename T , typename... Args> | |
static std::shared_ptr< T > | make (Args &&...args) |
static std::shared_ptr< Module > | make (std::string const &typeName) |
static std::string | makeName (std::type_index const &type) |
Protected Member Functions inherited from cherrypi::Module | |
Module () | |
Protected Attributes inherited from cherrypi::Module | |
BasePlayer * | player_ |
std::string | name_ |
Determines positions for buildings.
For buildings that require a worker to build them, BuilderModule requires the UPC to specify a Dirac position. This module's job is to determine suitable positions based on an existing distribution over positions and various heuristics (via builderhelpers).
Optionally, BuildingPlacerModel can be used for building placement. The model location is specified via the -bp_model command-line flag; if a valid model is found at the specified location, it will be loaded and used. If GPU support is available, the model will be run on the GPU.
ProxyTasks are used to track execution of the downstream production task. If the production task will fail (e.g. because the location became unbuildable), retries will be attempted until the ProxyTask is cancelled (e.g. from an upstream module).
This module will also reserve build tiles as unbuildable via TilesInfo.
|
virtualdefault |
|
overridevirtual |
Reimplemented from cherrypi::Module.
|
overridevirtual |
Reimplemented from cherrypi::Module.