public class StateObservationMulti extends StateObservation
currentGameState, model
Constructor and Description |
---|
StateObservationMulti(ForwardModel a_model,
int playerID)
Constructor for StateObservation in multi player games.
|
Modifier and Type | Method and Description |
---|---|
void |
advance(Types.ACTIONS[] actions)
Method overloaded for multi player games.
|
StateObservationMulti |
copy()
Returns an exact copy of the state observation object.
|
boolean |
equiv(java.lang.Object o)
Method overwritten with multi player optimisations.
|
java.util.ArrayList<Types.ACTIONS> |
getAvailableActions(int playerID)
Method overloaded for multi player games.
|
int |
getAvatarHealthPoints(int playerID)
Method overloaded for multi player games.
|
Types.ACTIONS |
getAvatarLastAction(int playerID)
Method overloaded for multi player games.
|
int |
getAvatarLimitHealthPoints(int playerID)
Method overloaded for multi player games.
|
int |
getAvatarMaxHealthPoints(int playerID)
Method overloaded for multi player games.
|
Vector2d |
getAvatarOrientation(int playerID)
Method overloaded for multi player games.
|
Vector2d |
getAvatarPosition(int playerID)
Method overloaded for multi player games.
|
java.util.HashMap<java.lang.Integer,java.lang.Integer> |
getAvatarResources(int playerID)
Method overloaded for multi player games.
|
double |
getAvatarSpeed(int playerID)
Method overloaded for multi player games.
|
int |
getAvatarType(int playerID)
Method overloaded for multi player games.
|
double |
getGameScore(int playerID)
Method overloaded for multi player games.
|
Types.WINNER[] |
getMultiGameWinner()
Similar to getGameWinner() in single player games, but for multi player.
|
boolean |
isAvatarAlive(int playerID)
returns true if the avatar is alive.
|
boolean |
isGameOver()
Method overridden for multi player games.
|
advance, getAvailableActions, getAvailableActions, getAvatarHealthPoints, getAvatarLastAction, getAvatarLimitHealthPoints, getAvatarMaxHealthPoints, getAvatarOrientation, getAvatarPosition, getAvatarResources, getAvatarSpeed, getAvatarType, getBlockSize, getEventsHistory, getFromAvatarSpritesPositions, getFromAvatarSpritesPositions, getGameScore, getGameState, getGameTick, getGameWinner, getImmovablePositions, getImmovablePositions, getKeyHandler, getMovablePositions, getMovablePositions, getNoPlayers, getNPCPositions, getNPCPositions, getObservationGrid, getPortalsPositions, getPortalsPositions, getResourcesPositions, getResourcesPositions, getWorldDimension, isAvatarAlive, setNewSeed
public StateObservationMulti(ForwardModel a_model, int playerID)
a_model
- forward model of the game.public void advance(Types.ACTIONS[] actions)
actions
- array of agent actions to execute in the next cycle for all players.public java.util.ArrayList<Types.ACTIONS> getAvailableActions(int playerID)
playerID
- ID of the player to querypublic double getGameScore(int playerID)
playerID
- ID of the player to query.public Types.WINNER[] getMultiGameWinner()
public boolean isGameOver()
isGameOver
in class StateObservation
public Vector2d getAvatarPosition(int playerID)
playerID
- ID of the player to query.public double getAvatarSpeed(int playerID)
playerID
- ID of the player to query.public Vector2d getAvatarOrientation(int playerID)
playerID
- ID of the player to query.public java.util.HashMap<java.lang.Integer,java.lang.Integer> getAvatarResources(int playerID)
playerID
- ID of the player to query.public Types.ACTIONS getAvatarLastAction(int playerID)
playerID
- ID of the player to query.public int getAvatarType(int playerID)
playerID
- ID of the player to query.public int getAvatarHealthPoints(int playerID)
playerID
- ID of the player to query.public int getAvatarMaxHealthPoints(int playerID)
playerID
- ID of the player to query.public int getAvatarLimitHealthPoints(int playerID)
playerID
- ID of the player to query.public boolean isAvatarAlive(int playerID)
public StateObservationMulti copy()
StateObservation
copy
in class StateObservation
public boolean equiv(java.lang.Object o)
equiv
in class StateObservation
o
- Object to compare this to.