massim.competition2011
Class GraphSimulationAgent

java.lang.Object
  extended by massim.framework.simulation.AbstractSimulationAgent
      extended by massim.competition2011.GraphSimulationAgent
All Implemented Interfaces:
SimulationAgent

public class GraphSimulationAgent
extends AbstractSimulationAgent

This class deals with the agent state, his actions and perceptions.


Constructor Summary
GraphSimulationAgent()
          The constructor instantiates the agentstate and the action
 
Method Summary
 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.
 
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

GraphSimulationAgent

public GraphSimulationAgent()
The constructor instantiates the agentstate and the action

Method Detail

setAgentParameter

public void setAgentParameter(AgentParameter agentpar)
Configures the agent according to the 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 team

Specified by:
setAgentParameter in interface SimulationAgent
Overrides:
setAgentParameter in class AbstractSimulationAgent
Parameters:
agentpar - agent parameters to use

initialize

public void initialize(GraphSimulationConfiguration config)
Initializes the agent internal values. The AgentParameter must have been set previously, by calling setAgentParameter.

Parameters:
config - the current configuration being used

getAgentState

public AgentState getAgentState()
Description copied from interface: SimulationAgent
Retrieve agent state.

Returns:
corresponding agent state.

createPerception

public Perception createPerception(WorldState simstate,
                                   AgentState[] agentstates)
This method only calculates private agent perceptions. Shared perceptions must be added externally


processAction

public void processAction(Action a,
                          WorldState simstate,
                          AgentState[] agentstates)

createInitialPerception

public InitialStickyPerception createInitialPerception(WorldState simstate,
                                                       AgentState[] agentstates)

createFinalPerception

public FinalPerception createFinalPerception(WorldState simstate,
                                             AgentState[] agentstates)

setAction

public void setAction(Action newAction)
Sets the action received from the client-side agent to the agent state, for execution in the current step.

Parameters:
newAction -


Copyright © 2011. All Rights Reserved.