My Project
|
Public Member Functions | |
ObservationImp (ProtoInterface &proto, ObservationPtr &observation, ResponseObservationPtr &response) | |
void | ClearFlags () |
uint32_t | GetPlayerID () const |
Gets a unique ID that represents the player. | |
uint32_t | GetGameLoop () const final |
Get the current game loop indicated by the last observation. | |
const Units & | GetUnits () const final |
Get a list of all known units in the game. | |
Units | GetUnits (Unit::Alliance alliance, Filter filter={}) const final |
const Unit * | GetUnit (uint64_t tag) const final |
const Unit * | GetPreviousUnit (uint64_t tag) const final |
const Units & | GetUnitsAdded () const final |
const Units & | GetUnitsRemoved () const final |
const RawActions & | GetRawActions () const final |
const Score & | GetScore () const final |
const Abilities & | GetAbilityData (bool force_refresh=false) const final |
const UnitTypes & | GetUnitTypeData (bool force_refresh=false) const final |
const MapInfo & | GetMapInfo () const final |
int32_t | GetMinerals () const final |
The mineral count of the player. | |
int32_t | GetVespene () const final |
The vespene count of the player. | |
int32_t | GetFoodCap () const final |
int32_t | GetFoodUsed () const final |
int32_t | GetFoodArmy () const final |
int32_t | GetFoodWorkers () const final |
int32_t | GetIdleWorkerCount () const final |
The number of workers that currently have no orders. | |
int32_t | GetArmyCount () const final |
int32_t | GetWarpGateCount () const final |
Number of warp gates owned by the player. This value should only be nonzero for Protoss. | |
int32_t | GetLarvaCount () const final |
Number of available larva. This value should only be nonzer for zerg. | |
const GameStateProtocol::Observation * | GetRawObservation () const final |
A pointer to the last Observation obtained from GetObservation. While it's possible to extract most in game data from this pointer. More... | |
bool | UpdateObservation (ClientEvents *client_events) |
void | IssueCallbacks (ClientEvents *client_events) |
Public Attributes | |
ProtoInterface & | proto_ |
ObservationPtr & | observation_ |
ResponseObservationPtr & | response_ |
uint32_t | player_id_ |
Units | units_ |
Units | units_previous_ |
UnitIdxMap | units_previous_map_ |
Units | units_added_ |
Units | units_removed_ |
uint32_t | current_game_loop_ |
RawActions | raw_actions_ |
MapInfo | map_info_ |
bool | map_info_cached_ |
int32_t | minerals_ |
int32_t | vespene_ |
int32_t | food_cap_ |
int32_t | food_used_ |
int32_t | food_army_ |
int32_t | food_workers_ |
int32_t | idle_worker_count_ |
int32_t | army_count_ |
int32_t | warp_gate_count_ |
int32_t | larva_count_ |
Abilities | abilities_ |
UnitTypes | unit_types_ |
Score | score_ |
bool | abilities_cached_ |
bool | unit_types_cached |
|
inlinefinalvirtual |
The total supply consumed by army units alone.
Implements sc2::ObservationInterface.
|
inlinefinalvirtual |
The total supply cap given the players max possible supply.
Implements sc2::ObservationInterface.
|
inlinefinalvirtual |
he total supply used by the player as defined: GetFoodArmy() + GetFoodWorkers().
Implements sc2::ObservationInterface.
|
inlinefinalvirtual |
The total supply consumed by workers units alone.
Implements sc2::ObservationInterface.
|
finalvirtual |
Get the unit state as represented by the the call to GetObservation two steps ago. This is useful for calculating deltas between Unit states. It is unsafe to assume GetUnit and GetPreviousUnit will both necessarily return a Unit given the same tag. The Unit may have been created or destroyed in the last step.
tag | Unique tag of the unit. |
Implements sc2::ObservationInterface.
|
finalvirtual |
A pointer to the last Observation obtained from GetObservation. While it's possible to extract most in game data from this pointer.
<
Implements sc2::ObservationInterface.
|
finalvirtual |
Get the unit state as represented by the last call to GetObservation.
tag | Unique tag of the unit. |
Implements sc2::ObservationInterface.
|
finalvirtual |
Get all units belonging to a certain alliance and in regards to a filter. The Unit objects returned are simply copies of POD types. Therefore editing that data will not change any in game state. See the ActionInterface for changing Unit state.
alliance | The faction the units belong to. |
filter | A functor or lambda used to filter out any unneeded units in the list. |
Implements sc2::ObservationInterface.
|
finalvirtual |
Gets a list of units added in the previous step. You could also hook into the OnUnitCreated event for this data on a per Unit basis.
Implements sc2::ObservationInterface.
|
finalvirtual |
Gets a list of units added in the previous step. You could also hook into the OnUnitCreated event for this data on a per Unit basis.
Implements sc2::ObservationInterface.