|
TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
|
#include <tactics.h>
Inherits cherrypi::TacticsModule.
Additional Inherited Members | |
Public Member Functions inherited from cherrypi::TacticsModule | |
| virtual void | step (State *s) override |
| virtual void | onGameEnd (State *s) 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 | onGameStart (State *s) |
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::TacticsModule | |
| UpcId | findSourceUpc (State *s) |
| virtual void | process (State *state, int srcUpcId) |
| void | formGroups (State *state, TacticsState &tstate, std::vector< Unit * > &leftoverWorkers, std::unordered_set< Unit * > &wasInAGroup) |
| Create groups based on distance rules, useful for the scouting/worker/search and destroy functionality. More... | |
| void | distributeLeftoverWorkers (std::unordered_set< Unit * > &unitSet, std::vector< Unit * > &leftoverWorkers, std::unordered_set< Unit * > &wasInAGroup) |
| Return unused workers, doesn't rely on group creation, just on existance of leftoverWorkers which specifies the workers and wasInAGroup which specifies which will automatically be reassigned based on attachement to a previously existing task. More... | |
| void | processNonFightFleeGroup (State *state, TacticsState &tstate, TacticsGroup &g, std::vector< Unit * > &leftoverWorkers, std::unordered_set< Unit * > &wasInAGroup) |
| Takes the scouting & search and destroy groups created in formGroups and issues the commands, also returns leftoverWorkers. More... | |
| void | moveUnit (State *state, UpcId srcUpcId, Unit *u, Position target) |
| Creates a move upc for unit with given target. More... | |
| std::pair< double, double > | distributeFightFlee (State *state, TacticsState &tstate, TacticsGroup &g, std::vector< Unit * > &fightUnits, std::vector< Unit * > &fleeUnits) |
| Uses combat sim + rules to put each unit into a fight or flee vector. More... | |
| void | processOrders (State *state, TacticsGroup &g, int srcUpcId, double deleteScore, double moveScore, std::vector< Unit * > &fightUnits, std::vector< Unit * > &fleeUnits, std::vector< Unit * > &leftoverWorkers, std::unordered_set< Unit * > &wasInAGroup) |
| Takes a group and the fight/flee assignments and issues commands. More... | |
Protected Member Functions inherited from cherrypi::Module | |
| Module () | |
Protected Attributes inherited from cherrypi::TacticsModule | |
| FrameNum | lastProcess_ = 0 |
| std::vector< uint8_t > | inBaseArea_ |
| FrameNum | lastUpdateInBaseArea_ = 0 |
| std::vector< uint16_t > | fleeScore_ |
| FrameNum | lastUpdateFleeScore_ = 0 |
| std::unordered_map< Unit *, std::pair< int, Position > > | searchAndDestroyTarget_ |
| std::unordered_map< Unit *, std::pair< int, Position > > | scoutTarget_ |
| std::ranlux24 | rngEngine_ {42} |
| std::unordered_map< Unit *, int > | lastTargetInRange_ |
| std::unordered_map< Unit *, int > | lastMove_ |
Protected Attributes inherited from cherrypi::Module | |
| BasePlayer * | player_ |
| std::string | name_ |
1.8.11