public static class ManualAgentsCommands.ManualSGAgent extends SGAgent
Modifier and Type | Field and Description |
---|---|
protected GroundedSGAgentAction |
nextAction |
agentType, domain, internalRewardFunction, world, worldAgentName
Constructor and Description |
---|
ManualAgentsCommands.ManualSGAgent() |
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.
|
GroundedSGAgentAction |
getAction(State s)
This method is called by the world when it needs the agent to choose an action
|
protected GroundedSGAgentAction |
getNextAction() |
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.
|
void |
setNextAction(GroundedSGAgentAction nextAction) |
getAgentName, getAgentType, getInternalRewardFunction, init, joinWorld, setInternalRewardFunction
protected volatile GroundedSGAgentAction nextAction
public void gameStarting()
SGAgent
gameStarting
in class SGAgent
public GroundedSGAgentAction getAction(State s)
SGAgent
public void observeOutcome(State s, JointAction jointAction, java.util.Map<java.lang.String,java.lang.Double> jointReward, State sprime, boolean isTerminal)
SGAgent
observeOutcome
in class 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
gameTerminated
in class SGAgent
public void setNextAction(GroundedSGAgentAction nextAction)
protected GroundedSGAgentAction getNextAction()