|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.columbia.cs.coms4701.agent.environments.simple.SimpleEnvironmentObject
edu.columbia.cs.coms4701.agent.environments.simple.SimpleAgent<K,P>
public class SimpleAgent<K extends AgentAction,P extends AgentPercept>
A simple Agent implementation, which handles the getters and setters for the various properties, and the property change notification.
Subclassing SimpleAgent probably won't be necessary, since all of the interesting stuff happens in the AgentAction, AgentPercept, and AgentProgram.
Field Summary |
---|
Fields inherited from class edu.columbia.cs.coms4701.agent.environments.simple.SimpleEnvironmentObject |
---|
changeSupport |
Constructor Summary | |
---|---|
SimpleAgent()
|
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 current 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. |
java.lang.String |
toString()
|
Methods inherited from class edu.columbia.cs.coms4701.agent.environments.simple.SimpleEnvironmentObject |
---|
addPropertyChangeListener, isAlive, removePropertyChangeListener, setAlive |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface edu.columbia.cs.coms4701.agent.EnvironmentObject |
---|
addPropertyChangeListener, isAlive, removePropertyChangeListener, setAlive |
Constructor Detail |
---|
public SimpleAgent()
Method Detail |
---|
public K nextAction(java.util.Set<P> thePercepts)
nextAction
in interface Agent<K extends AgentAction,P extends AgentPercept>
thePercepts
- the percepts from the Environment
edu.columbia.cs.coms4701.agent.AgentProgram#nextAction(java.util.Set)
public AgentProgram<K,P> getAgentProgram()
getAgentProgram
in interface Agent<K extends AgentAction,P extends AgentPercept>
public java.lang.Double getPerformanceMeasure()
getPerformanceMeasure
in interface Agent<K extends AgentAction,P extends AgentPercept>
public void setPerformanceMeasure(java.lang.Double theMeasure)
setPerformanceMeasure
in interface Agent<K extends AgentAction,P extends AgentPercept>
theMeasure
- new performance measure.public java.lang.String getAuthor()
getAuthor
in interface Agent<K extends AgentAction,P extends AgentPercept>
AgentProgram.getAuthor()
public java.lang.String getDescription()
getDescription
in interface Agent<K extends AgentAction,P extends AgentPercept>
AgentProgram.getDescription()
public java.lang.String toString()
toString
in class SimpleEnvironmentObject
public void setAgentProgram(AgentProgram<K,P> theProgram)
setAgentProgram
in interface Agent<K extends AgentAction,P extends AgentPercept>
theProgram
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |