org.micropsi.comp.agent.micropsi.urges
Class BodySimulator

java.lang.Object
  extended byorg.micropsi.comp.agent.micropsi.urges.BodySimulator
All Implemented Interfaces:
CycleObserverIF

public class BodySimulator
extends java.lang.Object
implements CycleObserverIF


Field Summary
static double FOOD_DECAY
           
static int OPTIMAL_FOOD_LEVEL
           
static int OPTIMAL_INTEGRITY_LEVEL
           
static double OPTIMAL_WATER_LEVEL
           
static double WATER_DECAY
           
 
Constructor Summary
BodySimulator(PhysicalStateListenerIF physicalstate)
          Constructor for BodySimulator.
 
Method Summary
 UrgeCreatorIF[] createUrges(LocalNetFacade net)
           
 void damage(double damagePoints)
          Damages the agent
 void drink(double liters)
          Consumes water
 void eat(double kiloJoule)
          Consumes food
 void endCycle(long netStep)
          This method will be called when the current cycle is about to end and all gates have been just calculated.
 double getFoodLevel()
           
 double getFoodUrge()
          Returns the foodUrge.
 double getIntegrityLevel()
           
 double getIntegrityUrge()
          Returns the integrityUrge.
 double getWaterLevel()
           
 double getWaterUrge()
          Returns the waterUrge.
 void reset()
           
 void startCycle(long netStep)
          This method will be called when a new cycle (aka "netstep") just started.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OPTIMAL_FOOD_LEVEL

public static final int OPTIMAL_FOOD_LEVEL
See Also:
Constant Field Values

OPTIMAL_WATER_LEVEL

public static final double OPTIMAL_WATER_LEVEL
See Also:
Constant Field Values

OPTIMAL_INTEGRITY_LEVEL

public static final int OPTIMAL_INTEGRITY_LEVEL
See Also:
Constant Field Values

FOOD_DECAY

public static final double FOOD_DECAY
See Also:
Constant Field Values

WATER_DECAY

public static final double WATER_DECAY
See Also:
Constant Field Values
Constructor Detail

BodySimulator

public BodySimulator(PhysicalStateListenerIF physicalstate)
Constructor for BodySimulator.

Method Detail

getFoodUrge

public double getFoodUrge()
Returns the foodUrge.

Returns:
double

getIntegrityUrge

public double getIntegrityUrge()
Returns the integrityUrge.

Returns:
double

getWaterUrge

public double getWaterUrge()
Returns the waterUrge.

Returns:
double

eat

public void eat(double kiloJoule)
Consumes food

Parameters:
kiloJoule - food value that was eaten

drink

public void drink(double liters)
Consumes water

Parameters:
liters - water value that was drunken

damage

public void damage(double damagePoints)
Damages the agent

Parameters:
damagePoints - the damage taken

toString

public java.lang.String toString()

startCycle

public void startCycle(long netStep)
Description copied from interface: CycleObserverIF
This method will be called when a new cycle (aka "netstep") just started. The gates of the nodes are not calculated yet, and all activation is still in the slots.

Specified by:
startCycle in interface CycleObserverIF
Parameters:
netStep - the current netstep.
See Also:
CycleObserverIF.startCycle(long)

endCycle

public void endCycle(long netStep)
Description copied from interface: CycleObserverIF
This method will be called when the current cycle is about to end and all gates have been just calculated. All slots have zero activation.

Specified by:
endCycle in interface CycleObserverIF
Parameters:
netStep - the netstep just about to end.
See Also:
CycleObserverIF.endCycle(long)

getFoodLevel

public double getFoodLevel()
Returns:
double

getIntegrityLevel

public double getIntegrityLevel()
Returns:
double

getWaterLevel

public double getWaterLevel()
Returns:
double

createUrges

public UrgeCreatorIF[] createUrges(LocalNetFacade net)

reset

public void reset()

(c) by Micropsi Project: http://www.cognitive-agents.org

.