2026-07-07

# Maze algos suck, maybe write a better one

Disclaimer
 - personal
 - target audience - strictly myself

Main
 - Potential project for my future self. Write better maze generation algos.
 - See also: [wikipedia: Maze-solving algos](https://en.wikipedia.org/wiki/Maze-solving_algorithm), [wikipedia: Maze generation algos](https://en.wikipedia.org/wiki/Maze_generation_algorithm)
 - I have a whole set of cached heuristics for implementing mazes that I don't find recorded anywhere here:
   - eyes are biased to go down and right, so make the correct path go left or up first
   - make it harder to track long corridors, such as 2-way 3-way (or even N-way spirals), or teleporter mazes, or cannon mazes
   - dead end paths should turn atleast twice across a significant area so you can't easily see in advance that they're dead ends. in general, entire sections of your maze should be like a distorted version of an N-way spiral
   - have some key nodes with high branch factor so it is easy to go in but hard to find your way back out, once you're in
   - avoid cycles, if you must use them, use them deep inside wrong sections of the maze
