Constructor and Description |
---|
AbstractPlayer() |
Modifier and Type | Method and Description |
---|---|
abstract Types.ACTIONS |
act(StateObservation stateObs,
ElapsedCpuTimer elapsedTimer)
Picks an action.
|
void |
draw(java.awt.Graphics2D g)
Gets the player the control to draw something on the screen.
|
Types.ACTIONS |
getLastAction()
Gets the last action executed by this controller.
|
void |
logAction(Types.ACTIONS action)
Logs a single action
|
void |
setup(java.lang.String actionFile,
int randomSeed)
This function sets up the controller to save the actions executed in a given game.
|
void |
teardown()
Closes the agent, writing actions to file.
|
public abstract Types.ACTIONS act(StateObservation stateObs, ElapsedCpuTimer elapsedTimer)
stateObs
- Observation of the current state.elapsedTimer
- Timer when the action returned is due.public final void setup(java.lang.String actionFile, int randomSeed)
actionFile
- file to save the actions to.randomSeed
- Seed for the sampleRandom generator of the game to be played.public final void teardown()
public final void logAction(Types.ACTIONS action)
action
- the action to log.public Types.ACTIONS getLastAction()
public void draw(java.awt.Graphics2D g)
g
- Graphics device to draw to.