ai.worlds.vacuum
Class VacuumWorld
java.lang.Object
ai.worlds.Environment
ai.worlds.GridEnvironment
ai.worlds.vacuum.VacuumWorld
- All Implemented Interfaces:
- java.lang.Cloneable, java.lang.Runnable
- public class VacuumWorld
- extends GridEnvironment
A Vacuum environment.
- Author:
- Jill Zimmerman -- jill.zimmerman@goucher.edu
Constructor Summary |
VacuumWorld(Agent[] a,
int xsize,
int ysize,
double probDirt,
javax.swing.JFrame f)
|
Methods inherited from class ai.worlds.GridEnvironment |
addObj, clone, contains, copyGrid, fillGrid, fillLoc, forward, getItem, grab, neighbor, removeObj, snapshot, termination, turn, updateEnv |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VacuumWorld
public VacuumWorld(Agent[] a,
int xsize,
int ysize,
double probDirt,
javax.swing.JFrame f)
legalAction
public boolean legalAction(java.lang.String a)
- Determine if an action is legal.
- Specified by:
legalAction
in class Environment
- Parameters:
a
- is an action string.
getPercept
public java.lang.Object getPercept(Agent a)
- Get the next percept.
- Specified by:
getPercept
in class Environment
- Parameters:
a
- is the agent.
performanceMeasure
public int performanceMeasure(Agent a)
- Determine performance of the agent.
- Specified by:
performanceMeasure
in class Environment
- Parameters:
a
- is the agent.