com.agentfactory.logic.agent
Class Perceptor

java.lang.Object
  extended by com.agentfactory.logic.agent.Perceptor

public abstract class Perceptor
extends java.lang.Object

Perceptors are used by the agent to maintain an up to date model of its environment in the form of beliefs. All perceptors must subclass this class.


Field Summary
protected  MentalAgent agent
           
 
Constructor Summary
Perceptor()
          CONSTRUCTORS
 
Method Summary
 void adoptBelief(java.lang.String bel)
          causes the agent to adopt the given belief
 void destroy()
          Destroy method useful for making sure that resuources used by agents are dealocated before the agent is killed.
 void fire()
           
 java.lang.String getAgentName()
           
 Module getModuleByClass(java.lang.String className)
           
 Module getModuleByName(java.lang.String name)
           
 java.util.ArrayList getModulesByClass(java.lang.String className)
           
 java.util.ArrayList getPerceptions()
           
 PerformanceEvent getPerformance()
           
 com.agentfactory.platform.service.PlatformService getService(java.lang.String name)
           
abstract  void perceive()
          executes each itertation of agent.
 void setAgent(MentalAgent agent)
           
 java.lang.String toString()
           
 void updatePerformance(long time)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

agent

protected MentalAgent agent
Constructor Detail

Perceptor

public Perceptor()
CONSTRUCTORS

Method Detail

setAgent

public void setAgent(MentalAgent agent)

getAgentName

public java.lang.String getAgentName()

adoptBelief

public void adoptBelief(java.lang.String bel)
causes the agent to adopt the given belief

Parameters:
bel - the belief to be adopted

getService

public com.agentfactory.platform.service.PlatformService getService(java.lang.String name)

getModuleByClass

public Module getModuleByClass(java.lang.String className)

getModuleByName

public Module getModuleByName(java.lang.String name)

getModulesByClass

public java.util.ArrayList getModulesByClass(java.lang.String className)

fire

public void fire()

updatePerformance

public void updatePerformance(long time)

getPerformance

public PerformanceEvent getPerformance()

perceive

public abstract void perceive()
executes each itertation of agent. should extract some knowledge from environment and generate appropriate beliefs


destroy

public void destroy()
Destroy method useful for making sure that resuources used by agents are dealocated before the agent is killed. Perceptors should implement this method if they have resources which should be explictly desposed of when the agent is being killed (e.g. native resources). Otherwise the default implementation will suffice.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getPerceptions

public java.util.ArrayList getPerceptions()