Cells breeding, living and dying in beautiful patterns according to a set of rules regarding the cell and its neighbours. Lose yourself and the rat Consider the simple maze. This might easily be represented by a two-dimensional grid. Each cell in the grid can be either a floor or a wall. The method in which the maze is generated is a topic for another article, so here is a maze I prepared earlier.
Allowable movements are North, South, East and West.
The cells bordering the grid are all walls, except for the start and end points. Paths are one cell wide. There are a number of ways to solve a maze. This method views the maze from the local perspective. If we can see the entire maze, we can immediately eliminate certain paths that are obvious dead-ends.