Popular:

Maze Generator

Navigation Controls

The navigation controls for the hexagonal maze are not obvious, but I have tried to make them feel natural. Fear not, young ones and those using non-qwerty keyboard layouts, for I will someday make them configurable. For now, deal with it. 'H' is left. 'Y' is up and left. 'N' is down and left. 'G' is right. 'T' is up and right. 'V' is down and right. Yup, they're backwards. For some reason, they're easier this way for me (and it's a touch typing lesson in disguise!).

The goal is to reach the rightmost cell on the bottom row.

Your randomly generated hexagonal maze

Generate another random maze

Height:
Width:
Cell Size:

Description of the algorithm

The general idea is that each cell in the maze can be reached along exactly one path from the beginning of the maze. Thus, any maze may be described completely by keeping track of the previous cell on that path for each cell in the maze. Then, just start from the beginning and add cells one at a time. As an additional bonus, finding the solution is trivial. It is only a matter of starting at the end and following its path back to the beginning.