|
||||||||||
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.competition2007.GridSimulationAgent
public class GridSimulationAgent
This class deals with the agent state, his actions and perceptions.
Constructor Summary | |
---|---|
GridSimulationAgent()
The constructor instantiates the agentstate. |
Method Summary | |
---|---|
boolean |
canPush(GridSimulationWorldState simulationstate,
java.lang.String nextAction,
int x,
int y)
Test, if pushing possible |
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[] agentstates)
|
InitialStickyPerception |
createInitialPerception(WorldState simstate,
AgentState[] agentstates)
|
Perception |
createPerception(WorldState simstate,
AgentState[] agentstates)
|
AgentState |
getAgentState()
Retrieve agent state. |
void |
processAction(Action a,
WorldState simstate,
AgentState[] agentstates)
|
void |
setAgentParameter(AgentParameter agentpar)
Set agent creation parameter. |
void |
updateWorldState(WorldState simstate,
SimulationAgent[] agents)
take charge of agent's direction in world state. in the case, two or more agents wants to move in the same cell, only one of them can move in and the others will be set back to their old positions. in other words if the first agent wants to move to the cell, where another agent (also the second) stands. he will try to push the second agent away in a free cell .the push action can only success when the second agent does not want to perform a movement in his last simulation step and this simulation step(his actions can be "skip", "invalid" "pick", "drop", "mark", "unmark"). |
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 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[] agentstates)
public void processAction(Action a, WorldState simstate, AgentState[] agentstates)
public void updateWorldState(WorldState simstate, SimulationAgent[] agents)
updateWorldState
in class SimulationAgentExtend
simstate
- is the WorldStatepublic boolean canPush(GridSimulationWorldState simulationstate, java.lang.String nextAction, int x, int y)
nextAction
- x
- y
-
public int computeProbability(int fap, int mfap, int mng, int ng)
fap
- failureActionProbabilitymfap
- maxFailureActionProbabilitymng
- maxNumberOfGoldItemsng
- numberOfGoldItems (current)
public InitialStickyPerception createInitialPerception(WorldState simstate, AgentState[] agentstates)
public FinalPerception createFinalPerception(WorldState simstate, AgentState[] agentstates)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |