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, waitonGameOverpublic void sendMessage(GameEvent msg)
sendMessage in interface PlayerCopyright © 2017 FOSS Galaxy. All rights reserved.