agent
Class Environment

java.lang.Object
  extended by agent.Environment
Direct Known Subclasses:
PackageWorld

public abstract class Environment
extends java.lang.Object

The top-level class for an agent simulation. This can be used for either single or multi-agent environments. This is intended for simulating static environments in which the agents take turns acting. An environment in which the agent could decide when to sense and act, or a dynamic multi-agent environment would require multiple threads, one for managing the way the environment changes and one for each agent.


Constructor Summary
Environment()
          Construct a new environment.
 
Method Summary
abstract  void addAgent(Agent agent)
          Add a new agent to the environment.
abstract  int getPerformanceMeasure(Agent a)
          Return the performance measure of a particular agent in the current environment.
abstract  int getTeamPerformanceMeasure()
          Return the performance measure of a team of agents in a cooperative environment.
 void start(State initState)
          Run the simulation starting from a given state.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Environment

public Environment()
Construct a new environment. Initialize the agents vector.

Method Detail

addAgent

public abstract void addAgent(Agent agent)
Add a new agent to the environment.


getPerformanceMeasure

public abstract int getPerformanceMeasure(Agent a)
Return the performance measure of a particular agent in the current environment. Higher values are considered better.


getTeamPerformanceMeasure

public abstract int getTeamPerformanceMeasure()
Return the performance measure of a team of agents in a cooperative environment. Higher values are considered better.


start

public void start(State initState)
Run the simulation starting from a given state. This consists of a sense-act loop for each agent.