-
Notifications
You must be signed in to change notification settings - Fork 48
Information about the state of the Avatars (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 avatars. StateObservationMulti provides information about all avatars in the game (position, resources, speed orientation). Note that they all require the ID of the player queried. See here the most important functions:
State Observation functions | Description |
---|---|
ArrayList<Types.ACTIONS> getAvailableActions(int playerID) | Returns the actions that are available in this game for the avatar corresponding to playerID. |
Vector2d getAvatarPosition(int playerID) | Returns the position of the avatar corresponding to playerID. If the game is finished, this returns Types.NIL. |
double getAvatarSpeed(int playerID) | Returns the speed of the avatar corresponding to playerID. If the game is finished, this returns 0. |
Vector2d getAvatarOrientation(int playerID) | Returns the orientation of the avatar corresponding to playerID. If the game is finished, this returns Types.NIL. |
HashMap<Integer, Integer> getAvatarResources(int playerID) | Returns the resources in the possession of the avatar corresponding to playerID. As there can be resources of different nature, each entry is a key-value pair where the key is the resource ID, and the value is the amount of that resource type owned. It should be assumed that there might be other resources available in the game, but the avatar could have none of them. If the avatar has no resources, an empty HashMap is returned. |
-
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