public class GridSimulationAgent extends SimulationAgentExtend
Constructor and Description |
---|
GridSimulationAgent()
The constructor instantiates the agentstate and the action
|
Modifier and Type | Method and Description |
---|---|
int |
computeProbability(int fap,
int mfap,
int mng,
int ng)
This method computes for each agent his probabilty of action failure
|
FinalPerception |
createFinalPerception(WorldState simstate,
AgentState[] as) |
InitialStickyPerception |
createInitialPerception(WorldState simstate,
AgentState[] as) |
Perception |
createPerception(WorldState simstate,
AgentState[] as) |
GridSimulationAgentAction |
getAction()
Get the current action of this agent
|
AgentState |
getAgentState()
Retrieve agent state.
|
void |
processAction(Action a,
WorldState simstate,
AgentState[] agentstates) |
void |
setAction(Action newAction)
Set the new action for this agent
|
void |
setAction(String action)
Set the new action for this agent
|
void |
setAgentParameter(AgentParameter agentpar)
Set agent creation parameter.
|
void |
setGrid(WorldState simstate)
Set the GridSimulationWorldState
|
void |
updateWorldState(WorldState simstate,
SimulationAgent[] agents)
take charge of agent's positions in world state.
|
moveAction
getAgent, setAgent
public GridSimulationAgent()
public void setGrid(WorldState simstate)
simstate
- public void setAction(Action newAction)
action
- Actionpublic void setAction(String action)
action
- Action as stringpublic GridSimulationAgentAction getAction()
public AgentState getAgentState()
SimulationAgent
public void setAgentParameter(AgentParameter agentpar)
SimulationAgent
setAgentParameter
in interface SimulationAgent
setAgentParameter
in class AbstractSimulationAgent
agentpar
- agent parameters to usepublic Perception createPerception(WorldState simstate, AgentState[] as)
public void processAction(Action a, WorldState simstate, AgentState[] agentstates)
public void updateWorldState(WorldState simstate, SimulationAgent[] agents)
updateWorldState
in class SimulationAgentExtend
simstate
- is the WorldStatepublic InitialStickyPerception createInitialPerception(WorldState simstate, AgentState[] as)
public FinalPerception createFinalPerception(WorldState simstate, AgentState[] as)
public int computeProbability(int fap, int mfap, int mng, int ng)
fap
- failureActionProbabilitymfap
- maxFailureActionProbabilitymng
- maxNumberOfGoldItemsng
- numberOfGoldItems (current)Copyright © 2013. All Rights Reserved.