-
Notifications
You must be signed in to change notification settings - Fork 48
Querying the state of the game (2 Player)
Raluca D. Gaina edited this page Feb 12, 2018
·
1 revision
Some functions can be used to retrieve information of the current state of the game. StateObservationMulti provides information about the game (score, winner, game tick, available actions). Note that the methods are similar to the StateObservation class, but some of them require the ID of the player querying the state. See the most important functions:
State Observation functions | Description |
---|---|
double getGameScore(int playerID) | Gets the score, at this observation, of the player corresponding to playerID. |
int getGameTick() | Returns the game tick of this particular observation. |
Types.WINNER[] getMultiGameWinner() | Returns an array of type Types.WINNER, with length corresponding to the number of players in the game, indicating the win state of all players in the current game observation. For each player, the possible values in the array (ID corresponding to index in the array) are Types.WINNER.PLAYER_WINS, Types.WINNER.PLAYER_LOSES and Types.WINNER.NO_WINNER. |
Dimension getWorldDimension() | Returns the world dimensions, in pixels. |
int getBlockSize() | Indicates the width in pixels of a sprite in the game. |
boolean isGameOver() | Indicates if the game is over or if it hasn't finished yet. |
-
GVG Framework
- Tracks Description
- Code Structure
- Creating Controllers
- Creating Multi Player Controllers
- Creating Level Generators
- Running & Testing Level Generators
- Creating Rule Generators
- Running & Testing Rule Generators
-
Forward Model and State Observation
- Advancing and copying the state
- Advancing and copying the state (2 Player)
- Querying the state of the game
- Querying the state of the game (2 Player)
- Information about the state of the Avatar
- Information about the state of the Avatar (2 Player)
- Information about events happened in the game
- Information about other sprites in the game
- Game Description Class
- Constraints
- Game Analyzer Class
- Level Analyzer Class
- Sprite Level Description Class
- Sprite, Termination, and Interaction Data Class
- Level Mapping Class
- Competition Specifications
- VGDL Language