|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmassim.framework.simulation.AbstractSimulationAgent
massim.gridsimulations.SimulationAgentExtend
massim.competition2008.GridSimulationAgent
public class GridSimulationAgent
This class deals with the agent state, his actions and perceptions.
Constructor Summary | |
---|---|
GridSimulationAgent()
The constructor instantiates the agentstate und the action |
Method Summary | |
---|---|
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(java.lang.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. |
Methods inherited from class massim.gridsimulations.SimulationAgentExtend |
---|
moveAction |
Methods inherited from class massim.framework.simulation.AbstractSimulationAgent |
---|
getAgent, setAgent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GridSimulationAgent()
Method Detail |
---|
public void setGrid(WorldState simstate)
simstate
- public void setAction(Action newAction)
action
- Actionpublic void setAction(java.lang.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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |