https://github.com/dmaydan/Maze_Solver_Generator
Solve and generate mazes in JS
https://github.com/dmaydan/Maze_Solver_Generator
Last synced: 3 months ago
JSON representation
Solve and generate mazes in JS
- Host: GitHub
- URL: https://github.com/dmaydan/Maze_Solver_Generator
- Owner: dmaydan
- Created: 2019-01-27T08:03:20.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-07-28T08:35:28.000Z (about 6 years ago)
- Last Synced: 2024-11-20T10:43:12.584Z (11 months ago)
- Language: JavaScript
- Homepage: https://dmaydan.github.io/Maze_Solver_Generator/
- Size: 414 KB
- Stars: 200
- Watchers: 3
- Forks: 20
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- hub - Maze_Solver_Generator
README
# Maze Solver and Generator
[This website](https://dmaydan.github.io/Maze_Solver_Generator/) generates mazes with recursive divsion and solves them with BFS. The maze and the solution are visualized on the HTML ``.## Recursive Division - Maze Generation
Essentially, at every step, the algorithm bisects the maze horizontally or vertically - then, it chooses a random cell along this bisection to leave open (that way the 2 resulting regions are still connected). Then, the same algorithm is performed on the 2 new regions. Recursion continues until it no longer makes sense to continue bisecting.Wikipedia GIF:
## Breadth-First Search - Maze Solving
*Breadth-first search (BFS) is an algorithm for traversing or searching tree or graph data structures. It starts at the tree root (or some arbitrary node of a graph, sometimes referred to as a 'search key'[1]), and explores all of the neighbor nodes at the present depth prior to moving on to the nodes at the next depth level.*
https://en.wikipedia.org/wiki/Breadth-first_search
![]()