org.pandora.thought.consciousness
Class Consciousness

java.lang.Object
  extended by org.pandora.thought.BasicThought
      extended by org.pandora.thought.consciousness.Consciousness
All Implemented Interfaces:
Thought

public class Consciousness
extends BasicThought

Consciousness monitors active memory and decides what to do.


Field Summary
static int MAX_PROCESS_TIME
           
static int TRAVERSAL_LIMIT
           
 
Constructor Summary
Consciousness()
          Create a new consciousness.
 
Method Summary
 void age(Network network)
          Age the network, decrease consciousness level by 10%.
 Vertex getLastContext()
          Return the last conscious point in time.
 long getProcessingTime()
          Return the current allowed processing time.
 int getTraversalLevel()
          Return the number of levels to traverse a vertex for the current state.
 void initialize(java.util.Map<java.lang.String,java.lang.Object> properties)
          Initialize any configurable settings from the properties.
 void setLastContext(Vertex lastContext)
          Set the last conscious point in time.
 void think()
          Analyse the active memory.
 void think(Vertex vertex, int levels, java.util.Set<Vertex> recursiveSet, java.util.Set<Vertex> breadtheSet)
          Analyse vertex and traverse its relationships.
 
Methods inherited from class org.pandora.thought.BasicThought
awake, getName, getPandora, getPrimitive, getShortTermMemory, isConscious, log, log, setName, setPandora, stop, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TRAVERSAL_LIMIT

public static int TRAVERSAL_LIMIT

MAX_PROCESS_TIME

public static int MAX_PROCESS_TIME
Constructor Detail

Consciousness

public Consciousness()
Create a new consciousness.

Method Detail

initialize

public void initialize(java.util.Map<java.lang.String,java.lang.Object> properties)
Initialize any configurable settings from the properties.

Specified by:
initialize in interface Thought
Overrides:
initialize in class BasicThought

getLastContext

public Vertex getLastContext()
Return the last conscious point in time.


setLastContext

public void setLastContext(Vertex lastContext)
Set the last conscious point in time.


getTraversalLevel

public int getTraversalLevel()
Return the number of levels to traverse a vertex for the current state.


age

public void age(Network network)
Age the network, decrease consciousness level by 10%.


getProcessingTime

public long getProcessingTime()
Return the current allowed processing time. This decreases when stressed.


think

public void think()
Analyse the active memory. Output the active article to the senses.

Specified by:
think in interface Thought
Overrides:
think in class BasicThought

think

public void think(Vertex vertex,
                  int levels,
                  java.util.Set<Vertex> recursiveSet,
                  java.util.Set<Vertex> breadtheSet)
Analyse vertex and traverse its relationships. Swap the active vertex if interesting.