ai.worlds
Class Agent

java.lang.Object
  extended byai.worlds.Agent
Direct Known Subclasses:
VacuumAgent, WumpusAgent

public abstract class Agent
extends java.lang.Object

A generic agent. All agents must implement determineAction and takeAction methods

Author:
Jill Zimmerman -- jill.zimmerman@goucher.edu

Field Summary
 java.lang.String action
          The current action
 AgentBody body
          The body of the agent
 java.lang.Object percept
          The current percept
 int score
          The current score
 
Constructor Summary
Agent()
           
 
Method Summary
abstract  void determineAction()
          Determines the next action to be taken by the agent.
abstract  void takeAction(Environment e)
          Perfom the current action.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

body

public AgentBody body
The body of the agent


score

public int score
The current score


percept

public java.lang.Object percept
The current percept


action

public java.lang.String action
The current action

Constructor Detail

Agent

public Agent()
Method Detail

determineAction

public abstract void determineAction()
Determines the next action to be taken by the agent. The action is stored as a string in the field 'action'.


takeAction

public abstract void takeAction(Environment e)
Perfom the current action.

Parameters:
e - is the environment the agent is within