Skip to content

Advancing and copying the state (2 Player)

Raluca D. Gaina edited this page Feb 12, 2018 · 1 revision

The state observation is given to the agents as an object of the class StateObservationMulti as a tool to query the game state, and therefore have some information to decide the next action to take. It also includes a Forward Model that allows the agent to advance the game state (by simulating the effect of taking an action) and copy it. These are the two methods that allow this:

Forward Model functions Description
void advance(Types.ACTIONS[] action) Advances the state using the array of actions passed as the moves of the agents, one move per agent, the index in the array corresponding to the players' IDs. It updates all entities in the game. It modifies the object 'this' to represent the next state after the actions have been executed and all entities have moved. Note: stochastic events will not be necessarily the same as in the real game.
StateObservationMulti copy() Returns an exact copy of the state observation object.

Table of Contents:

Clone this wiki locally