Skip to main content

Game Observations

Observations are real-time inputs the AI agent receives while playing, forming the foundation for its decision-making.

  • Visual inputs capture the game’s visual state (e.g., screenshots of the board or environment).
  • Vector inputs provide numerical data like remaining moves or goals.
  • Goal or style inputs guide agents toward specific play-styles or objectives. These observations are processed to train agents that simulate gameplay. The resulting simulated sessions generate the metrics used for prediction and analysis.

Below are some example observations for a sample tower defense game called "Arena Masters":

State Space (Vector Observations) for "Arena Masters"

Player Resources

Observation NameType# of ValuesDescription
Player Collected GemsFloat1Number of collected in-game currency.
Player ShardsInteger1Total premium currency.
Player Power TokensInteger1Total power tokens for in-battle abilities.

Global Modifiers

Observation NameType# of ValuesDescription
Global Damage MultiplierFloat1The global damage multiplier (e.g., 1.17x).
Global Defense MultiplierFloat1The global defense multiplier (e.g., 1.11x).

Permanent Upgrades

Observation NameType# of ValuesDescription
Resource Generation RateFloat1The current rate of primary resource generation (e.g., 0.54).
Fortress Health MaxFloat1The current maximum health of the player's fortress (e.g., 21).
Current Era LevelInteger1The current era of the player (e.g., 1 for Ancient Era).

Unit-Specific Information

(Repeated for a fixed number of potential unit slots, e.g., 5)

Observation NameType# of ValuesDescription
Unit Defense StatFloat1 per UnitThe base defense of the unit.
Unit Offensive StatFloat1 per UnitThe base offensive power of the unit.
Enemy Unit Defense StatFloat1 per UnitThe base defense of the enemy unit.
Enemy Unit Offensive StatFloat1 per UnitThe base offensive power of the enemy unit.

Core Battle State

Observation NameType# of ValuesDescription
Player ResourcesFloat1Current amount of resources for deploying units.
Player Fortress Health %Float1Normalized health of the player's fortress (0.0 to 1.0).
Enemy Fortress Health %Float1Normalized health of the enemy's fortress (0.0 to 1.0).
Current Engagement NumberInteger1The current engagement phase (1, 2, 3, etc.). Can use a special value for "Final Engagement".

Deployable Unit Information

(Repeated for each of the 3 available unit slots)

Observation NameType# of ValuesDescription
Unit Deploy CostInteger1 per UnitThe resource cost for this unit (e.g., 3, 5, 7).

Special Abilities & Power-ups

Observation NameType# of ValuesDescription
Ability Is ReadyBoolean1 per Ability1 if the special ability (e.g., Shield, Rush, Strike) is off cooldown.
Power Tokens AvailableInteger1Current count of power tokens. A player knows if they can afford an ability.
Is Free Resource Ad AvailableBoolean11 if the button to watch an ad for resources is active.
Is Bonus Crate PresentBoolean11 if the falling bonus crate is currently on screen.
Bonus Crate Position (X, Y)Float2The normalized screen coordinates of the bonus crate if it's present.

Representing Units on the Battlefield

(Abstract the battlefield into a set of numbers)

Observation NameType# of ValuesDescription
Player Unit Type CountInteger1 per UnitThe number of this type of player unit currently on the field.
Enemy Unit Type CountInteger1 per UnitThe number of this type of enemy unit currently on the field.
Player Units EliminatedInteger1 per UnitAccumulative number of player's units eliminated in combat.
Enemy Units EliminatedInteger1 per UnitAccumulative number of enemy's units eliminated in combat.
Player Unit in SectorInteger1 per ZoneDivide distance between enemy and player fortresses to 5 sectors.
Enemy Unit in SectorInteger1 per ZoneDivide distance between enemy and player fortresses to 5 sectors.
Average Player Unit Health %Float1 per UnitThe average health percentage of all player units of this type.
Average Enemy Unit Health %Float1 per UnitThe average health percentage of all enemy units of this type.

Action Space for "Arena Masters"

Action IndexAction NameDescription
0No Operation (NOOP)The agent chooses to do nothing, saving resources for a later push.
1Deploy Vanguard UnitSpends 3 resources to deploy a Vanguard unit.
2Deploy Skirmisher UnitSpends 5 resources to deploy a Skirmisher unit.
3Deploy Heavy Cavalry UnitSpends 7 resources to deploy a Heavy Cavalry unit.
4Activate Defensive AbilityActivates the defensive/healing ability.
5Activate Offensive AbilityActivates the rage/damage ability.
6Activate Area-Effect AbilityActivates the meteor/area damage ability.
7Interact with Bonus CrateIf a bonus crate is on screen, the agent will try to click it.
8Watch Ad for Free ResourcesClicks the button to get a resource boost.