public class GraphSimulationAgent extends AbstractSimulationAgent
Constructor and Description |
---|
GraphSimulationAgent()
The constructor instantiates the agentstate and the action
|
Modifier and Type | Method and Description |
---|---|
FinalPerception |
createFinalPerception(WorldState simstate,
AgentState[] agentstates) |
InitialStickyPerception |
createInitialPerception(WorldState simstate,
AgentState[] agentstates) |
Perception |
createPerception(WorldState simstate,
AgentState[] agentstates)
This method only calculates private agent perceptions.
|
AgentState |
getAgentState()
Retrieve agent state.
|
void |
initialize(GraphSimulationConfiguration config)
Initializes the agent internal values.
|
void |
processAction(Action a,
WorldState simstate,
AgentState[] agentstates) |
void |
setAction(Action newAction)
Sets the action received from the client-side agent to the agent state, for execution in the current step.
|
void |
setAgentParameter(AgentParameter agentpar)
Configures the agent according to the
AgentParameter as parsed from the configuration file. |
getAgent, setAgent
public GraphSimulationAgent()
public void setAgentParameter(AgentParameter agentpar)
AgentParameter
as parsed from the configuration file.
agentpar
must be an instance of GraphSimulationAgentParameter
. The information
included in agentpar
is the name of the agent, the name of its role, and the name of its teamsetAgentParameter
in interface SimulationAgent
setAgentParameter
in class AbstractSimulationAgent
agentpar
- agent parameters to usepublic void initialize(GraphSimulationConfiguration config)
AgentParameter
must have been set previously,
by calling setAgentParameter
.config
- the current configuration being usedpublic AgentState getAgentState()
SimulationAgent
public Perception createPerception(WorldState simstate, AgentState[] agentstates)
public void processAction(Action a, WorldState simstate, AgentState[] agentstates)
public InitialStickyPerception createInitialPerception(WorldState simstate, AgentState[] agentstates)
public FinalPerception createFinalPerception(WorldState simstate, AgentState[] agentstates)
public void setAction(Action newAction)
newAction
- Copyright © 2013. All Rights Reserved.