agent
Class Agent

java.lang.Object
  extended by agent.Agent

public abstract class Agent
extends java.lang.Object

An abstract software agent class. The agent must be managed by the Environment class, which calls its see() and selectAction() methods.


Method Summary
 java.lang.String getId()
          Return a unique string that identifies the agent.
abstract  void see(Percept p)
          Provide a Percept to the agent.
abstract  Action selectAction()
          Have the agent select its next action to perform.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

see

public abstract void see(Percept p)
Provide a Percept to the agent. This function is called by the environment at the beginning of each agent's turn. If the agent has internal state, this method should also update it.


selectAction

public abstract Action selectAction()
Have the agent select its next action to perform. Implements the action0: Per -> Ac function or the action: I -> Ac function, depending on whether or not the agent has internal state. Note, Per (or I) is not passed as a parameter, because we assume this information is recorded in an instance variable by the see() method.


getId

public java.lang.String getId()
Return a unique string that identifies the agent. This is particularly useful in multi-agent environments.