simuLCS
Class AgentClassifierAutomatic

java.lang.Object
  extended bysimuLCS.Entity
      extended bysimuLCS.Agent
          extended bysimuLCS.AgentClassifier
              extended bysimuLCS.AgentClassifierAutomatic

public class AgentClassifierAutomatic
extends AgentClassifier

Agent having two behaviours and switching between them every X time steps.

Author:
Benoit

Field Summary
protected  ClassifierSet c1
          The first behaviour
protected  ClassifierSet c2
          The second behaviour
protected  int intervalSwitchingBehaviours
          The Agent switches behaviour every intervalSwitchingBehaviours time steps.
protected  double maxSpeed
          Maximum number of pixels the agent can move for one time step
protected  int nbOfStepsMoving
          Number of steps it has already moved (in order to switch)
static int REAL_BEHAVIOUR_1
          Constant for the first behaviour
static int REAL_BEHAVIOUR_2
          Constant for the second behaviour
 
Fields inherited from class simuLCS.AgentClassifier
behaviour, DETECTION_DISTANCE, isDetectionLimited, lastMovVector, template
 
Fields inherited from class simuLCS.Agent
arena, heading, oldcoord
 
Fields inherited from class simuLCS.Entity
color_ext, color_int, coord, generator, name, paintName, size
 
Constructor Summary
AgentClassifierAutomatic(java.util.Random gen, Arena a, java.lang.String name)
          Constructs Agent Ra, Robot Automatic.
 
Method Summary
 boolean isDangerous()
          Agent Ra IS dangerous
 void move(Arena arena, Entity[] others, int nbEntities, java.awt.Graphics2D g)
          Moves the agent.
 
Methods inherited from class simuLCS.AgentClassifier
canDetect, drawVisibilityCircle, getBehaviour, getLastMovVector, getNewMovVectorAccordingTo, getTemplate, isDetectionLimited, paint, setBehaviour, setDetectionLimited, setLastMovVector, setTemplate
 
Methods inherited from class simuLCS.Agent
clear, clear, getArena, getBehaviour, getCoordNearTo, getRadius, isMoving, move, toString
 
Methods inherited from class simuLCS.Entity
collideWithMe, distanceTo, getColor_ext, getColor_int, getCoord, getId, getName, getRadiusBody, getSize, isPaintName, setColor_ext, setColor_int, setName, setPaintName, setSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REAL_BEHAVIOUR_1

public static final int REAL_BEHAVIOUR_1
Constant for the first behaviour

See Also:
Constant Field Values

REAL_BEHAVIOUR_2

public static final int REAL_BEHAVIOUR_2
Constant for the second behaviour

See Also:
Constant Field Values

c1

protected ClassifierSet c1
The first behaviour


c2

protected ClassifierSet c2
The second behaviour


nbOfStepsMoving

protected int nbOfStepsMoving
Number of steps it has already moved (in order to switch)


intervalSwitchingBehaviours

protected int intervalSwitchingBehaviours
The Agent switches behaviour every intervalSwitchingBehaviours time steps.


maxSpeed

protected double maxSpeed
Maximum number of pixels the agent can move for one time step

Constructor Detail

AgentClassifierAutomatic

public AgentClassifierAutomatic(java.util.Random gen,
                                Arena a,
                                java.lang.String name)
Constructs Agent Ra, Robot Automatic.

Parameters:
gen -
a -
name -
Method Detail

move

public void move(Arena arena,
                 Entity[] others,
                 int nbEntities,
                 java.awt.Graphics2D g)
Moves the agent. Moves the ghost and applies the learning system if isLearning == true.

Overrides:
move in class AgentClassifier
See Also:
#isLearning

isDangerous

public boolean isDangerous()
Agent Ra IS dangerous

Overrides:
isDangerous in class Agent