TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
Public Member Functions | Public Attributes | List of all members
cherrypi::ABBOzvp6hatchhydra Class Reference

Inherits cherrypi::ABBOBase.

Public Member Functions

virtual void preBuild2 (autobuild::BuildState &bst) override
 
void lateGame (BuildState &bst)
 
void opening (BuildState &bst)
 
virtual void buildStep2 (BuildState &bst) override
 
- Public Member Functions inherited from cherrypi::ABBOBase
 ABBOBase (UpcId upcId, State *state, Module *module)
 
void findNaturalDefencePos (State *)
 
Position getStaticDefencePos (State *, const BuildType *type)
 
void buildSunkens (autobuild::BuildState &st, int n, Position={}, bool morphFirst=false)
 
void buildSpores (autobuild::BuildState &st, int n, Position={}, bool morphFirst=false)
 
void morphSunkens (autobuild::BuildState &, int n=1000)
 
void morphSpores (autobuild::BuildState &, int n=1000)
 
void takeNBases (autobuild::BuildState &, int n)
 
void expand (autobuild::BuildState &st)
 
void calculateArmySupply (const autobuild::BuildState &st)
 
Position findHatcheryPosNear (Position seedPos)
 
Position findSunkenPosNear (const BuildType *type, Position seedPos, bool coverMineralsOnly=false)
 
Position findSunkenPos (const BuildType *type, bool mainBaseOnly=false, bool coverMineralsOnly=false)
 
virtual void preBuild (autobuild::BuildState &st) overridefinal
 One of the three steps of processing a build order. More...
 
virtual void postBuild2 (autobuild::BuildState &st)
 
virtual void postBuild (autobuild::BuildState &st) overridefinal
 The final step of processing a build order. More...
 
virtual void buildStep (autobuild::BuildState &) overridefinal
 The meat of a build order lives in buildStep(). More...
 
- Public Member Functions inherited from cherrypi::AutoBuildTask
void postBlackboardKey (std::string const &key, Blackboard::Data const &data)
 
bool cancelGas ()
 
 AutoBuildTask (int upcId, State *state, Module *module)
 
virtual ~AutoBuildTask () override
 
virtual void update (State *state) override
 
void evaluate (State *state, Module *module)
 
void simEvaluateFor (autobuild::BuildState &st, FrameNum frames)
 
void build (const BuildType *type, Position pos, std::function< void()> builtCallback)
 Builds a building at a specific position. More...
 
void build (const BuildType *type, std::function< void()> builtCallback)
 Builds a unit/building, upgrade, or technology. More...
 
void build (const BuildType *type, Position pos)
 Builds a building at a specific position. More...
 
void build (const BuildType *type)
 Builds a unit/building, upgrade, or technology. More...
 
bool buildN (const BuildType *type, int n)
 Builds up to N of a unit/building. More...
 
bool buildN (const BuildType *type, int n, int simultaneous)
 Builds up to N of a unit/building, with an optional limit on how many to build consecutively. More...
 
bool buildN (const BuildType *type, int n, Position positionIfWeBuildMore)
 Builds up to N of a building, specifying a position for the next new building. More...
 
bool upgrade (const BuildType *type)
 Researches an Upgrade or Tech Enqueues any required but missing prerequisites (like adding a Lair if you request Lurker Aspect). More...
 
autobuild::BuildStatelastEvaluateCurrentState ()
 
autobuild::BuildStatelastEvaluateTargetState ()
 
- Public Member Functions inherited from cherrypi::MultiProxyTask
 MultiProxyTask (std::vector< UpcId > targetUpcIds, UpcId upcId)
 
virtual ~MultiProxyTask ()=default
 
void setPolicyForStatus (TaskStatus status, ProxyPolicy policy)
 
virtual void cancel (State *state) override
 
virtual std::unordered_set< Unit * > const & proxiedUnits () const override
 A set of units occupied performing this task. More...
 
std::vector< std::shared_ptr< Task > > targets () const
 
- Public Member Functions inherited from cherrypi::Task
 Task (UpcId upcId, std::unordered_set< Unit * > units={})
 
virtual ~Task ()
 
TaskStatus status () const
 
void setStatus (TaskStatus status)
 
bool finished () const
 
UpcId upcId () const
 UPC id in Blackboard that caused this Task to be spawned. More...
 
std::unordered_set< Unit * > const & units () const
 A set of units occupied performing this task. More...
 
void removeUnit (Unit *unit)
 
virtual const char * getName () const
 A name for this task, for debugging purposes. More...
 

Public Attributes

bool transitionToSpeedlings = false
 
- Public Attributes inherited from cherrypi::ABBOBase
Position nextBase
 
bool canExpand = false
 
bool shouldExpand = false
 
bool forceExpand = false
 
bool preferSafeExpansions = true
 
int enemyWorkerCount = 0
 
int enemyGasCount = 0
 
int enemyZealotCount = 0
 
int enemyDragoonCount = 0
 
int enemyDarkTemplarCount = 0
 
int enemyHighTemplarCount = 0
 
int enemyArchonCount = 0
 
int enemyReaverCount = 0
 
int enemyVultureCount = 0
 
int enemyGoliathCount = 0
 
int enemyTankCount = 0
 
int enemyMissileTurretCount = 0
 
int enemyCorsairCount = 0
 
int enemyScoutCount = 0
 
int enemyObserverCount = 0
 
int enemyWraithCount = 0
 
int enemyValkyrieCount = 0
 
int enemyBattlecruiserCount = 0
 
int enemyStaticDefenceCount = 0
 
int enemyBarracksCount = 0
 
int enemyRefineryCount = 0
 
int enemyAcademyCount = 0
 
int enemyGatewayCount = 0
 
int enemyCyberneticsCoreCount = 0
 
int enemyStargateCount = 0
 
int enemyForgeCount = 0
 
int enemyZerglingCount = 0
 
int enemyHydraliskCount = 0
 
int enemyMutaliskCount = 0
 
int enemyScourgeCount = 0
 
int enemySunkenCount = 0
 
int enemySporeCount = 0
 
int enemyMarineCount = 0
 
int enemyMedicCount = 0
 
int enemyFirebatCount = 0
 
int enemyFactoryCount = 0
 
int enemyLairCount = 0
 
int enemySpireCount = 0
 
int enemyCloakedUnitCount = 0
 
bool enemyHasExpanded = false
 
bool enemyIsRushing = false
 
int enemyBuildingCount = 0
 
int enemyScienceVesselCount = 0
 
int enemyArbiterCount = 0
 
int enemyShuttleCount = 0
 
int enemyResourceDepots = 0
 
int enemyGasUnits = 0
 
int enemyTemplarArchivesCount = 0
 
int myCompletedHatchCount = 0
 
int myLarvaCount = 0
 
int mySunkenCount = 0
 
int mySporeCount = 0
 
int myDroneCount = 0
 
int myZerglingCount = 0
 
int myHydraliskCount = 0
 
int myMutaliskCount = 0
 
int myScourgeCount = 0
 
int myLurkerCount = 0
 
int myGuardianCount = 0
 
int myUltraliskCount = 0
 
int myDefilerCount = 0
 
int mineralFields = 0
 
int geysers = 0
 
Position homePosition
 
Position naturalPos
 
Position naturalDefencePos
 
Position mainNaturalChoke
 
Position enemyBasePos
 
bool hasFoundEnemyBase = false
 
Position nextStaticDefencePos
 
bool weArePlanningExpansion = false
 
int currentFrame = 0
 
int bases = 0
 
bool isLosingAnOverlord = false
 
Position lastFindNaturalDefencePosEnemyPos {-1, -1}
 
std::vector< uint8_t > inBaseArea
 
FrameNum lastUpdateInBaseArea = 0
 
double armySupply = 0.0
 
double groundArmySupply = 0.0
 
double airArmySupply = 0.0
 
double enemySupplyInOurBase = 0.0
 
double enemyArmySupplyInOurBase = 0.0
 
double enemyArmySupply = 0.0
 
double enemyGroundArmySupply = 0.0
 
double enemyAirArmySupply = 0.0
 
double enemyAntiAirArmySupply = 0.0
 
double enemyAttackingArmySupply = 0.0
 
double enemyAttackingGroundArmySupply = 0.0
 
double enemyAttackingAirArmySupply = 0.0
 
int enemyAttackingWorkerCount = 0
 
double enemyLargeArmySupply = 0.0
 
double enemySmallArmySupply = 0.0
 
double enemyBiologicalArmySupply = 0.0
 
double enemyProximity = 0.0
 
int enemyProxyBuildingCount = 0
 
int enemyProxyGatewayCount = 0
 
int enemyProxyBarracksCount = 0
 
int enemyProxyForgeCount = 0
 
int enemyProxyCannonCount = 0
 
bool enemyForgeIsSpinning = false
 
tc::BW::Race enemyRace = tc::BW::Race::Unknown
 
bool autoExpand = true
 
bool autoUpgrade = true
 
bool expandNearest = false
 
bool buildExtraOverlordsIfLosingThem = true
 
- Public Attributes inherited from cherrypi::AutoBuildTask
int lastEvaluate = 0
 
autobuild::BuildState initialBuildState
 
autobuild::BuildState currentBuildState
 
Statestate_ = nullptr
 
bool isSimulation = false
 
std::unordered_map< UpcId, std::tuple< autobuild::BuildEntry, float > > scheduledUpcs
 Each of these UPCs is being proxied by this task. More...
 
std::function< bool(autobuild::BuildState &)> queue
 

Additional Inherited Members

- Protected Member Functions inherited from cherrypi::ABBOBase
virtual void draw (State *state) override
 Draws any debugging information to the screen. More...
 
- Protected Member Functions inherited from cherrypi::MultiProxyTask
bool matchStatus (TaskStatus status)
 
- Protected Member Functions inherited from cherrypi::Task
std::unordered_set< Unit * > & units ()
 
virtual void removeDeadOrReassignedUnits (State *state)
 Remove units that have been assigned to another task and units that have died. More...
 
- Protected Attributes inherited from cherrypi::MultiProxyTask
std::vector< UpcIdtargetUpcIds_
 
std::vector< std::shared_ptr< Task > > targets_
 
std::unordered_set< Unit * > proxiedUnits_
 
std::map< TaskStatus, ProxyPolicypolicy_
 
TaskStatus defaultTargetStatus_ = TaskStatus::Unknown
 

Member Function Documentation

virtual void cherrypi::ABBOzvp6hatchhydra::buildStep2 ( BuildState bst)
inlineoverridevirtual

Reimplemented from cherrypi::ABBOBase.

void cherrypi::ABBOzvp6hatchhydra::lateGame ( BuildState bst)
inline
void cherrypi::ABBOzvp6hatchhydra::opening ( BuildState bst)
inline
virtual void cherrypi::ABBOzvp6hatchhydra::preBuild2 ( autobuild::BuildState bst)
inlineoverridevirtual

Reimplemented from cherrypi::ABBOBase.

Member Data Documentation

bool cherrypi::ABBOzvp6hatchhydra::transitionToSpeedlings = false

The documentation for this class was generated from the following file: