biosim.app.domworld
Class DomWorldStateMachine

java.lang.Object
  extended by biosim.core.agent.StateMachine
      extended by biosim.app.domworld.DomWorldStateMachine
All Implemented Interfaces:
Agent

public class DomWorldStateMachine
extends StateMachine


Nested Class Summary
 class DomWorldStateMachine.Flee
           
 
Nested classes/interfaces inherited from class biosim.core.agent.StateMachine
StateMachine.State
 
Field Summary
static double AVERAGE_EVENT_TIME
           
static int CHASE
           
static double CHASE_DIST
           
static double CHASE_SPEED
           
static int ENCOUNTER
           
static double EPSILON
           
static double ETA
           
static double FAR_DIST
           
static int FLEE
           
static double FLEE_DIST
           
static double FLEE_SPEED
           
static double FRONTAL_FOV
           
static int GO_TO_WAYPOINT
           
static int GROUP
           
static double GROUP_DIST
           
static double GROUP_SPEED
           
static double HIERARCHY_STABILITY
           
static int LOITER
           
static int MIN_OTHERS
           
static double NEAR_DIST
           
static int NUM_STATES
           
static double PERSONAL_DIST
           
static double RANDOM_WALK_DIST
           
static double RANDOM_WALK_SPEED
           
static int ROAM
           
static double ROAM_DIST
           
static double ROAM_OBST_DIST
           
static double ROAM_SPEED
           
 
Fields inherited from class biosim.core.agent.StateMachine
nextState, states
 
Constructor Summary
DomWorldStateMachine(AbstractMonkey b, double domRank)
           
 
Method Summary
 void act(double time)
           
 boolean atWaypoint(sim.util.MutableDouble2D pos)
           
 boolean chaseLoiterTimeout(double time)
           
static void configure(java.util.Properties props)
           
 void finish()
           
 boolean fleeLoiterTimeout(double time)
           
 boolean groupLoiterTimeout(double time)
           
 void init()
           
static void invalidValue(java.lang.String propName, java.lang.String value)
           
 boolean isFarFromGroup(java.util.ArrayList<sim.util.MutableDouble2D> perceivedMonkeys)
           
 boolean loiterRandomWalkTimeout(double time)
           
 boolean lostFight()
           
 boolean randomWalkLoiterTimeout(double time)
           
 boolean roamLoiterTimeout(double time)
           
 void setTieStrengths(java.util.HashMap<DomWorldStateMachine,java.lang.Double> tsprefs)
           
 boolean tooClose(java.util.ArrayList<sim.util.MutableDouble2D> perceivedMonkeys, java.util.ArrayList<Agent> perceivedAgents)
           
 boolean wonFight()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROAM

public static int ROAM

GROUP

public static int GROUP

FLEE

public static int FLEE

CHASE

public static int CHASE

LOITER

public static int LOITER

ENCOUNTER

public static int ENCOUNTER

GO_TO_WAYPOINT

public static int GO_TO_WAYPOINT

NUM_STATES

public static int NUM_STATES

PERSONAL_DIST

public static double PERSONAL_DIST

NEAR_DIST

public static double NEAR_DIST

FAR_DIST

public static double FAR_DIST

MIN_OTHERS

public static int MIN_OTHERS

AVERAGE_EVENT_TIME

public static double AVERAGE_EVENT_TIME

FRONTAL_FOV

public static double FRONTAL_FOV

RANDOM_WALK_SPEED

public static double RANDOM_WALK_SPEED

RANDOM_WALK_DIST

public static double RANDOM_WALK_DIST

ROAM_SPEED

public static double ROAM_SPEED

ROAM_DIST

public static double ROAM_DIST

FLEE_SPEED

public static double FLEE_SPEED

FLEE_DIST

public static double FLEE_DIST

CHASE_SPEED

public static double CHASE_SPEED

CHASE_DIST

public static double CHASE_DIST

GROUP_SPEED

public static double GROUP_SPEED

GROUP_DIST

public static double GROUP_DIST

ETA

public static double ETA

HIERARCHY_STABILITY

public static double HIERARCHY_STABILITY

ROAM_OBST_DIST

public static double ROAM_OBST_DIST

EPSILON

public static double EPSILON
Constructor Detail

DomWorldStateMachine

public DomWorldStateMachine(AbstractMonkey b,
                            double domRank)
Method Detail

invalidValue

public static void invalidValue(java.lang.String propName,
                                java.lang.String value)

configure

public static void configure(java.util.Properties props)

setTieStrengths

public void setTieStrengths(java.util.HashMap<DomWorldStateMachine,java.lang.Double> tsprefs)

act

public void act(double time)
Specified by:
act in interface Agent
Overrides:
act in class StateMachine

isFarFromGroup

public boolean isFarFromGroup(java.util.ArrayList<sim.util.MutableDouble2D> perceivedMonkeys)

tooClose

public boolean tooClose(java.util.ArrayList<sim.util.MutableDouble2D> perceivedMonkeys,
                        java.util.ArrayList<Agent> perceivedAgents)

lostFight

public boolean lostFight()

wonFight

public boolean wonFight()

loiterRandomWalkTimeout

public boolean loiterRandomWalkTimeout(double time)

randomWalkLoiterTimeout

public boolean randomWalkLoiterTimeout(double time)

fleeLoiterTimeout

public boolean fleeLoiterTimeout(double time)

chaseLoiterTimeout

public boolean chaseLoiterTimeout(double time)

groupLoiterTimeout

public boolean groupLoiterTimeout(double time)

atWaypoint

public boolean atWaypoint(sim.util.MutableDouble2D pos)

roamLoiterTimeout

public boolean roamLoiterTimeout(double time)

init

public void init()

finish

public void finish()