public class AgentPlayer extends Object implements Player
This keeps track of state on behalf of the policy so that the agent can implement the standard interface generally used by game playing agents (get a state, return an action).
Modifier and Type | Field and Description |
---|---|
protected Agent |
policy |
protected GameState |
state |
Constructor and Description |
---|
AgentPlayer(String name,
Agent policy)
Create a player with a given name and policy.
|
Modifier and Type | Method and Description |
---|---|
Action |
getAction() |
String |
getName() |
void |
sendMessage(GameEvent msg) |
void |
setID(int id,
int nPlayers) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
onGameOver
public void sendMessage(GameEvent msg)
sendMessage
in interface Player
Copyright © 2017 FOSS Galaxy. All rights reserved.