public class LearningPlayer extends Player
Constructor and Description |
---|
LearningPlayer(java.lang.Process proc,
java.lang.String port)
Learning Player constructor.
|
Modifier and Type | Method and Description |
---|---|
Types.ACTIONS |
act(SerializableStateObservation stateObs,
ElapsedCpuTimer elapsedTimer) |
Types.ACTIONS |
act(StateObservation so,
ElapsedCpuTimer elapsedTimer)
Picks an action.
|
Types.ACTIONS |
act(StateObservationMulti stateObs,
ElapsedCpuTimer elapsedTimer)
Picks an action.
|
boolean |
finishPlayerCommunication()
Tells the client that this is over.
|
Types.LEARNING_SSO_TYPE |
getLearningSsoType() |
boolean |
init(StateObservation so,
boolean isValidation) |
int |
result(StateObservation stateObs)
Function called when the game is over.
|
boolean |
startPlayerCommunication()
Starts the communication between the server and the client.
|
draw, getAllActions, getLastAction, getPlayerID, isHuman, logAction, result, resultMulti, setPlayerID, setup, teardown
public LearningPlayer(java.lang.Process proc, java.lang.String port)
public Types.ACTIONS act(SerializableStateObservation stateObs, ElapsedCpuTimer elapsedTimer)
public Types.ACTIONS act(StateObservation so, ElapsedCpuTimer elapsedTimer)
public boolean init(StateObservation so, boolean isValidation)
so
- State observation of the current game in its initial stateisValidation
- true if the level to play is a validation one.public Types.ACTIONS act(StateObservationMulti stateObs, ElapsedCpuTimer elapsedTimer)
Player
public int result(StateObservation stateObs)
stateObs
- the game state at the end of the gamepublic boolean startPlayerCommunication()
public boolean finishPlayerCommunication()
public Types.LEARNING_SSO_TYPE getLearningSsoType()