|
ProtoBot
|
A ResourceRequest is a way to be able to keep an detailed decsription of what ProtoBot is wanting to make and is currently making.
A resource request goes through 4 states and changes based on the type of ResourceRequest we are dealing with.
The creation of units and upgrades is something that happenes almost instantly in StarCraft's game engine and doesnt require any other information expect the trainer that will service the ResourceRequest.
However the construction of a building is more complicated. Due to the possibility of a worker being destroyed on its way to construct a building or the tiles where a building is going to be placed is already occupied. You can compare this type of request as something that is more asynchronous.
This requires more information and fault tollerance from ProtoBot to be able to full service a ResourceRequest for buildings.
More...
#include <ProtoBotCommander.h>
Public Types | |
| enum | Type { Unit , Building , Upgrade , Tech } |
| enum | State { Accepted_Completed , Approved_BeingBuilt , Approved_InProgress , PendingApproval } |
Public Attributes | |
| Type | type |
| int | priority = 1 |
| State | state = PendingApproval |
| BWAPI::UnitType | unit = BWAPI::UnitTypes::None |
| BWAPI::UpgradeType | upgrade = BWAPI::UpgradeTypes::None |
| BWAPI::TechType | tech = BWAPI::TechTypes::None |
| BWAPI::Unit | scoutToPlaceBuilding = nullptr |
| bool | isCheese = false |
| int | frameToStartBuilding = -1 |
| BWAPI::Unit | requestedBuilding = nullptr |
| BWAPI::Position | nexusPositionRef = BWAPI::Positions::Invalid |
| const BWEM::Base * | base = nullptr |
| int | frameRequestCreated = -1 |
| int | frameRequestApproved = -1 |
| int | frameRequestServiced = -1 |
| int | framesSinceLastCheck = 0 |
| int | attempts = 0 |
| bool | fromBuildOrder = false |
| bool | isWall = false |
| bool | isRampPlacement = false |
| bool | gotPositionToBuild = false |
| BWAPI::Position | placementPos = BWAPI::Positions::Invalid |
| BWAPI::TilePosition | tileToPlace = BWAPI::TilePositions::Invalid |
| PlacementInfo | placementInfo |
| size_t | requestNumber = -1 |
A ResourceRequest is a way to be able to keep an detailed decsription of what ProtoBot is wanting to make and is currently making.
A resource request goes through 4 states and changes based on the type of ResourceRequest we are dealing with.
The creation of units and upgrades is something that happenes almost instantly in StarCraft's game engine and doesnt require any other information expect the trainer that will service the ResourceRequest.
However the construction of a building is more complicated. Due to the possibility of a worker being destroyed on its way to construct a building or the tiles where a building is going to be placed is already occupied. You can compare this type of request as something that is more asynchronous.
This requires more information and fault tollerance from ProtoBot to be able to full service a ResourceRequest for buildings.
Definition at line 47 of file ProtoBotCommander.h.
| enum ResourceRequest::State |
Definition at line 56 of file ProtoBotCommander.h.
| enum ResourceRequest::Type |
Definition at line 49 of file ProtoBotCommander.h.
| int ResourceRequest::attempts = 0 |
Definition at line 83 of file ProtoBotCommander.h.
| const BWEM::Base* ResourceRequest::base = nullptr |
Definition at line 74 of file ProtoBotCommander.h.
| int ResourceRequest::frameRequestApproved = -1 |
Definition at line 78 of file ProtoBotCommander.h.
| int ResourceRequest::frameRequestCreated = -1 |
Definition at line 77 of file ProtoBotCommander.h.
| int ResourceRequest::frameRequestServiced = -1 |
Definition at line 79 of file ProtoBotCommander.h.
| int ResourceRequest::framesSinceLastCheck = 0 |
Definition at line 82 of file ProtoBotCommander.h.
| int ResourceRequest::frameToStartBuilding = -1 |
Definition at line 67 of file ProtoBotCommander.h.
| bool ResourceRequest::fromBuildOrder = false |
Definition at line 86 of file ProtoBotCommander.h.
| bool ResourceRequest::gotPositionToBuild = false |
Definition at line 89 of file ProtoBotCommander.h.
| bool ResourceRequest::isCheese = false |
Definition at line 64 of file ProtoBotCommander.h.
| bool ResourceRequest::isRampPlacement = false |
Definition at line 88 of file ProtoBotCommander.h.
| bool ResourceRequest::isWall = false |
Definition at line 87 of file ProtoBotCommander.h.
| BWAPI::Position ResourceRequest::nexusPositionRef = BWAPI::Positions::Invalid |
Definition at line 73 of file ProtoBotCommander.h.
| PlacementInfo ResourceRequest::placementInfo |
Definition at line 92 of file ProtoBotCommander.h.
| BWAPI::Position ResourceRequest::placementPos = BWAPI::Positions::Invalid |
Definition at line 90 of file ProtoBotCommander.h.
| int ResourceRequest::priority = 1 |
Definition at line 52 of file ProtoBotCommander.h.
| BWAPI::Unit ResourceRequest::requestedBuilding = nullptr |
Definition at line 70 of file ProtoBotCommander.h.
| size_t ResourceRequest::requestNumber = -1 |
Definition at line 94 of file ProtoBotCommander.h.
| BWAPI::Unit ResourceRequest::scoutToPlaceBuilding = nullptr |
Definition at line 63 of file ProtoBotCommander.h.
| State ResourceRequest::state = PendingApproval |
Definition at line 57 of file ProtoBotCommander.h.
| BWAPI::TechType ResourceRequest::tech = BWAPI::TechTypes::None |
Definition at line 61 of file ProtoBotCommander.h.
| BWAPI::TilePosition ResourceRequest::tileToPlace = BWAPI::TilePositions::Invalid |
Definition at line 91 of file ProtoBotCommander.h.
| Type ResourceRequest::type |
Definition at line 50 of file ProtoBotCommander.h.
| BWAPI::UnitType ResourceRequest::unit = BWAPI::UnitTypes::None |
Definition at line 59 of file ProtoBotCommander.h.
| BWAPI::UpgradeType ResourceRequest::upgrade = BWAPI::UpgradeTypes::None |
Definition at line 60 of file ProtoBotCommander.h.