Weighted maze generation and solving
Kruskal-generated mazes solved with Dijkstra, brute-force DFS and a greedy heuristic, benchmarked to find where speed stops beating optimality.
A Python suite that generates weighted mazes with Kruskal's algorithm and solves them several ways. The picture on this page is a live example: a maze generated with Kruskal's algorithm and solved with Dijkstra when the site was built.
What I did
- Implemented Kruskal-based maze generation and Dijkstra shortest-path solving.
- Wrote a brute-force DFS solver for non-overlapping entrance-to-exit paths and a greedy heuristic for faster all-pairs routing.
- Compared the approaches through complexity analysis and empirical benchmarking, finding the point where the greedy solver's speed no longer offsets its loss of optimality.