edu.columbia.cs.coms4701.agent
Interface Agent<K extends AgentAction,P extends AgentPercept>

All Superinterfaces:
EnvironmentObject
All Known Subinterfaces:
RobotAgent
All Known Implementing Classes:
PenteAgent, RoombaAgent, SimpleAgent

public interface Agent<K extends AgentAction,P extends AgentPercept>
extends EnvironmentObject

An Agent is an EnvironmentObject that can receive percepts and affect the environment via actions. Agents contain an AgentProgram, which is the object that receives sets of percepts and chooses actions.

Version:
0.1
Author:
aaron@cs

User: aaron Date: Aug 23, 2006 Time: 4:16:13 PM


Method Summary
 AgentProgram<K,P> getAgentProgram()
          Returns the agent program for this agent
 java.lang.String getAuthor()
          Wrapper method to fetch the author (as a UNI) of the agent program.
 java.lang.String getDescription()
          Wrapper method to fetch a description of the the agent program.
 java.lang.Double getPerformanceMeasure()
          Returns the performance measure for this agent.
 K nextAction(java.util.Set<P> thePercepts)
          Wrapper method to fetch the next AgentAction from the AgentProgram, given a set of AgentPercepts
 void setAgentProgram(AgentProgram<K,P> theProgram)
          Sets the agent program for this agent.
 void setPerformanceMeasure(java.lang.Double theMeasure)
          Sets the performance measure for this agent.
 
Methods inherited from interface edu.columbia.cs.coms4701.agent.EnvironmentObject
addPropertyChangeListener, isAlive, removePropertyChangeListener, setAlive
 

Method Detail

nextAction

K nextAction(java.util.Set<P> thePercepts)
Wrapper method to fetch the next AgentAction from the AgentProgram, given a set of AgentPercepts

Parameters:
thePercepts - the percepts from the Environment
Returns:
a chosen action
See Also:
AgentProgram#nextAction(java.util.Set

)


setAgentProgram

void setAgentProgram(AgentProgram<K,P> theProgram)
Sets the agent program for this agent. Should probably not be changed once the environment begins running!

Parameters:
theProgram -

getAgentProgram

AgentProgram<K,P> getAgentProgram()
Returns the agent program for this agent

Returns:
the agent program for this agent

getPerformanceMeasure

java.lang.Double getPerformanceMeasure()
Returns the performance measure for this agent.

Returns:
the current performance measure

setPerformanceMeasure

void setPerformanceMeasure(java.lang.Double theMeasure)
Sets the performance measure for this agent.

Parameters:
theMeasure - new performance measure.

getAuthor

java.lang.String getAuthor()
Wrapper method to fetch the author (as a UNI) of the agent program.

Returns:
the UNI of the agent program author (e.g. "awh2101")
See Also:
AgentProgram.getAuthor()

getDescription

java.lang.String getDescription()
Wrapper method to fetch a description of the the agent program.

Returns:
a short text description of the agent program
See Also:
AgentProgram.getDescription()