All Packages This Package Class Hierarchy Class Search Index
java.lang.Object | +----aima.agents.Environment | +----aima.agents.GridEnvironment
A GridEnvironment is an environment where objects exist in a two-dimensional rectangular grid of squares. More than one object can occupy a square.
public class GridEnvironment extends aima.agents.Environment { // Fields 1 public Point start; // Constructors 1 public GridEnvironment(AgentThing[], int, int); // Methods 10 public GridEnvironment addWalls(); public void addWithProbability(Class, float); public void execute(Agent, Action); protected Thing findObjectOfType(Class, Point); public Vector gridContents(int, int); public Vector gridContents(Point); public Point moveObjectTo(Thing, Point); public void placeInContainer(Thing, Thing); public void placeObject(Thing, Point); public void removeObject(Thing); }
public Point start
public GridEnvironment(AgentThing[] agents, int xSize, int ySize)
public void execute(Agent agentArg, Action actionArg)
Handle basic actions
- Overrides:
- execute in class Environment
public GridEnvironment addWalls()
Put walls all around the perimeter of the environment.
public void addWithProbability(Class objectClass, float prob)
public Vector gridContents(int x, int y)
public Vector gridContents(Point loc)
public Point moveObjectTo(Thing object, Point loc)
Move a thing to a location, and return that location. If there's an obstacle there, return nil and give object a bump.
public void placeObject(Thing object, Point loc)
Place an object at this location.
public void placeInContainer(Thing object, Thing container)
public void removeObject(Thing object)
protected Thing findObjectOfType(Class type, Point loc)
Is there an object of this type here?
All Packages This Package Class Hierarchy Class Search IndexFreshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4