TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
|
Scouts the enemy's base with a worker. More...
#include <harass.h>
Inherits cherrypi::Module.
Classes | |
struct | BuildPolicy |
struct | FleePolicy |
struct | TargetPolicy |
Public Member Functions | |
virtual | ~HarassModule ()=default |
virtual void | step (State *s) override |
void | postCommand (State *state, MasterHarassTask *htask) |
void | postCommand (State *state, HarassTask *htask) |
void | postCommand (State *state, BuildingHarassTask *htask) |
void | setTargetPolicy (TargetPolicy pol) |
void | setBuildPolicy (BuildPolicy pol) |
void | setFleePolicy (FleePolicy pol) |
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 | onGameStart (State *s) |
virtual void | onGameEnd (State *s) |
Protected Member Functions | |
bool | attack (State *state, HarassTask *htask) |
bool | attackResourceDepot (State *state, HarassTask *htask) |
bool | attackWorkers (State *state, HarassTask *htask) |
bool | dangerousAttack (State *state, HarassTask *task) |
bool | buildRefinery (State *state, HarassTask *task) |
bool | flee (State *state, HarassTask *task) |
bool | exploreEnemyBase (State *state, HarassTask *task) |
std::vector< Position > | getFleePositions (State *state, HarassTask *task) |
void | consumeUPC (State *state, UpcId upcId, std::shared_ptr< UPCTuple > upc) |
std::shared_ptr< MasterHarassTask > | createTask (State *, UpcId, std::shared_ptr< UPCTuple >) |
Unit * | enemyGeyser (Position const &pos) |
Unit * | enemyRefinery (Position const &pos) |
void | findClosestGeyser (State *state, Position const &nmyLoc) |
void | checkEnemyRefineryBuilt (State *state, Position const &nmyLoc) |
Protected Member Functions inherited from cherrypi::Module | |
Module () | |
Protected Attributes | |
TargetPolicy | targetPolicy_ |
BuildPolicy | buildPolicy_ |
FleePolicy | fleePolicy_ |
std::unordered_map< Position, Unit * > | enemyGeyser_ |
std::unordered_map< Position, Unit * > | enemyRefinery_ |
Protected Attributes inherited from cherrypi::Module | |
BasePlayer * | player_ |
std::string | name_ |
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) |
Scouts the enemy's base with a worker.
Harasses the enemy while scouting.
|
virtualdefault |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
inline |
void cherrypi::HarassModule::postCommand | ( | State * | state, |
HarassTask * | htask | ||
) |
void cherrypi::HarassModule::postCommand | ( | State * | state, |
BuildingHarassTask * | htask | ||
) |
|
inline |
|
inline |
|
inline |
|
overridevirtual |
Reimplemented from cherrypi::Module.
|
protected |
|
protected |
|
protected |