-
Notifications
You must be signed in to change notification settings - Fork 9
Percepts
andreasschmidtjensen edited this page Sep 19, 2014
·
4 revisions
Agents can perceive the following (depending in their type). Note that BWAPI distinguishes between different kinds of coordinates: build coordinates, walk coordinates and pixel coordinates. In the following, we specify when which kind is used.
- base(X, Y, Start, Region): (X,Y) indicates a good position for building a base. Start is true if this location is a starting position for a team. Region indicates the area this base is spanning.
- buildTilePosition(X, Y): The units current position in build coordinates.
- chokePoint(WalkX, WalkY): Specifies a choke point at (WalkX, WalkY).
- enemy(Type, Id, WalkX, WalkY, BuildX, BuildY): An enemy of Type and Id is perceived at (X,Y) given as both walk and build coordinates.
- friendly(Name, Type, Id, WalkX, WalkY, BuildX, BuildY): A friendly unit called Name is perceived at (X,Y) given as both walk and build coordinates.
- gameStart: Present once the games is started.
- id(Name): The units own Name.
- idle: Is present if the unit is not doing anything.
- isBeingConstructed: Present if the unit is being constructed.
- map(Width, Height): The dimensions of the map.
- mineralField(Id, Resources, Group, BuildX, BuildY): Location of a mineral field, its contents and the group it belongs to.
- position(X, Y): The units current position in walk coordinates.
- refinery(Id, Resources, Group): Identifies the refineries that have been built.
- unit(Type, Count): The number of controllable units of a specific Type.
- unitType(Type): The units Type.
- vespeneGeyser(Id, Resources, Group, BuildX, BuildY): Location of a vespene geyser, its contents and the group it belongs to.
- constructing: Is present if the unit is constructing something.
- gas(Quantity): Quantity is the amount of gas available (i.e. gathered but not used).
- minerals(Quantity): Quantity is the amount of minerals available (i.e. gathered but not used).
- queueSize(Size): Present on buildings that can construct units. Size indicates the number of units currently in queue for production.
- supply(Current, Max): The Current and Maximum supplies.
- totalRes(Minerals, TotalMinerals, Gas, TotalGas, SuppliesUsed, MaxSupplies): Contains both the current amount of minerals and gas, and the total cummulated amount, together with the amount of supplies available.
- attacking(AttackerId, TargetId): AttackerId is attacking TargetId.
- gas(Quantity): Quantity is the amount of gas available (i.e. gathered but not used).
- gathering(Type): Is present if the unit is gathering minerals or gas. Type indicates which.
- minerals(Quantity): Quantity is the amount of minerals available (i.e. gathered but not used).
- supply(Current, Max): The Current and Maximum supplies.
- idleWorker(Id): Is perceived by the command center. Indicates the Id of idle workers.
- constructionSite(BuildX, BuildY): Specifies coordinates where a building can be constructed. Useful for APLs that cannot access the BWAPI directly.
- accessibleVespeneGeyser(BuildX, BuildY): Location of vespene geysers that are visible.
- stimmed: Marines can perceive this, if they have used their stim ability.