THE GARDEN OF FORKING PATHS
Welcome!
The Garden of Forking paths is an explosive maze generation game. Generate as many mazes as you like, solve them, and then break them!
Press 'generate' to build a new maze.
Move up with the arrow keys or with WASD
How are the mazes made you ask? Good question: every maze is generated with a recursive backtracker algorithm. A random cell is selected as the current cell. From the current cell, a path is made to one of its unvisited neighbors. That neighbor is now the current cell. So, one of its unvisited neighbors is selected and a path is made to that cell from the current cell. This process continues until there are no unvisited neighbors surrounding the current cell. At that point, the algorithm backtracks to the last visited cell searching for unvisited neighbors. If an unvisited neighbor is found the process continues. If no unvisited neighbor is found, the algorithm backtracks to another previously visited cell. When every cell is visited the algorithm is complete and the maze has been generated.