public class SetStrategyAgent extends Agent
getAction(State) method
will automatically rpelace it with whatever this agent's name is.| Modifier and Type | Class and Description |
|---|---|
static class |
SetStrategyAgent.SetStrategyAgentFactory |
| Modifier and Type | Field and Description |
|---|---|
protected Policy |
policy
The policy encoding the strategy this agent will follow
|
agentType, domain, internalRewardFunction, world, worldAgentName| Constructor and Description |
|---|
SetStrategyAgent(SGDomain domain,
Policy policy)
Initializes for the given domain in which the agent will play and the strategy that they will follow.
|
| Modifier and Type | Method and Description |
|---|---|
void |
gameStarting()
This method is called by the world when a new game is starting.
|
void |
gameTerminated()
This method is called by the world when a game has ended.
|
GroundedSingleAction |
getAction(State s)
This method is called by the world when it needs the agent to choose an action
|
void |
observeOutcome(State s,
JointAction jointAction,
java.util.Map<java.lang.String,java.lang.Double> jointReward,
State sprime,
boolean isTerminal)
This method is called by the world when every agent in the world has taken their action.
|
getAgentName, getAgentType, getInternalRewardFunction, init, joinWorld, setInternalRewardFunctionprotected Policy policy
public void gameStarting()
AgentgameStarting in class Agentpublic GroundedSingleAction getAction(State s)
Agentpublic void observeOutcome(State s, JointAction jointAction, java.util.Map<java.lang.String,java.lang.Double> jointReward, State sprime, boolean isTerminal)
AgentobserveOutcome in class Agents - the state in which the last action of each agent was takenjointAction - the joint action of all agents in the worldjointReward - the joint reward of all agents in the worldsprime - the next state to which the agent transitionedisTerminal - whether the new state is a terminal statepublic void gameTerminated()
AgentgameTerminated in class Agent