TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
|
Interface for bot modules. More...
#include <module.h>
Inherited by cherrypi::AutoBuildModule, cherrypi::BuilderModule, cherrypi::BuildingPlacerModule, cherrypi::CherryVisDumperModule, cherrypi::CombatMicroModule, cherrypi::CombatModule, cherrypi::CreateGatherAttackModule, cherrypi::DummyTacticsModule, cherrypi::GathererModule, cherrypi::HarassModule, cherrypi::LambdaModule, cherrypi::ScoutingModule, cherrypi::SquadCombatModule, cherrypi::StaticDefenceFocusFireModule, cherrypi::StrategyModule, cherrypi::TacticsModule, cherrypi::TopModule, and cherrypi::UPCToCommandModule.
Public Member Functions | |
virtual | ~Module ()=default |
virtual void | setPlayer (BasePlayer *p) |
void | setName (std::string name) |
std::string | name () |
virtual void | step (State *s) |
virtual void | onGameStart (State *s) |
virtual void | onGameEnd (State *s) |
Static Public Member Functions | |
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 | |
Module () | |
Protected Attributes | |
BasePlayer * | player_ |
std::string | name_ |
Interface for bot modules.
Use Module::make<T>(args) to construct a new module instance of a given type.
|
virtualdefault |
|
protected |
|
inlinestatic |
|
static |
|
static |
std::string cherrypi::Module::name | ( | ) |
|
inlinevirtual |
Reimplemented in cherrypi::TacticsModule, cherrypi::CherryVisDumperModule, cherrypi::SquadCombatModule, and cherrypi::StrategyModule.
|
inlinevirtual |
Reimplemented in cherrypi::CherryVisDumperModule, cherrypi::SquadCombatModule, cherrypi::BuildingPlacerModule, and cherrypi::StrategyModule.
void cherrypi::Module::setName | ( | std::string | name | ) |
|
inlinevirtual |
|
inlinevirtual |
Reimplemented in cherrypi::AutoBuildModule, cherrypi::TacticsModule, cherrypi::CherryVisDumperModule, cherrypi::BuilderModule, cherrypi::HarassModule, cherrypi::BuildingPlacerModule, cherrypi::StrategyModule, cherrypi::SquadCombatModule, cherrypi::OnceModule, cherrypi::GathererModule, cherrypi::ScoutingModule, cherrypi::CreateGatherAttackModule, cherrypi::DummyTacticsModule, cherrypi::LambdaModule, cherrypi::UPCToCommandModule, cherrypi::TopModule, cherrypi::CombatMicroModule, cherrypi::StaticDefenceFocusFireModule, and cherrypi::CombatModule.
|
protected |
|
protected |