public static class ManualAgentsCommands.ManualSGAgent extends SGAgentBase
Modifier and Type | Field and Description |
---|---|
protected Action |
nextAction |
agentType, domain, internalRewardFunction, world, worldAgentName
Constructor and Description |
---|
ManualSGAgent() |
Modifier and Type | Method and Description |
---|---|
Action |
action(State s)
This method is called by the world when it needs the agent to choose an action
|
void |
gameStarting(World w,
int agentNum)
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.
|
protected Action |
getNextAction() |
void |
observeOutcome(State s,
JointAction jointAction,
double[] jointReward,
State sprime,
boolean isTerminal)
This method is called by the world when every agent in the world has taken their action.
|
void |
setNextAction(Action nextAction) |
agentName, agentType, getInternalRewardFunction, init, init, setAgentDetails, setInternalRewardFunction
protected volatile Action nextAction
public void gameStarting(World w, int agentNum)
SGAgent
w
- the world in which the game is startingagentNum
- the agent number of the agent in the worldpublic Action action(State s)
SGAgent
s
- the current state of the worldpublic void observeOutcome(State s, JointAction jointAction, double[] jointReward, State sprime, boolean isTerminal)
SGAgent
s
- 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()
SGAgent
public void setNextAction(Action nextAction)
protected Action getNextAction()