mlpy.environments.gridworld.Cell¶
-
class
mlpy.environments.gridworld.Cell(x, y, func)[source]¶ Bases:
objectThe abstract cell module.
A cell is a base unit in a 2d-grid. The
GridWorldis composed of cells.Parameters: x : int
The x-position of the cell.
y : int
The y-position of the cell.
func : callable
A callback function to find the neighboring cells.
Notes
Every class inheriting from Cell must implement
is_occupied.Attributes
neighborsThe cell’s neighbors. xThe x-position of the cell. yThe y-position of the cell. Methods
is_occupied()Determines if the cell is occupied.