Skip to content

Most difficult maze? #4

Discussion options

You must be logged in to vote

Hi. I cannot give you a "scientific" answer, but let me try to give some thoughts.

The mazes generated by all these algorithms are "perfect mazes". A "perfect maze" is just a spanning tree of the undirected graph induced by the grid: vertices of the graph are the grid positions and edges are the horizontal and vertical connections between neighbor positions (in the "8-neighbor topology, also the diagonal neighbors are considered as connected).

So you have a spanning tree of a grid graph and you run a graph traversal / pathfinder algorithm on this tree. As there exists a unique path between any two vertices in the tree, a path/solution always exists.

Each graph algorithm has its characteri…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by armin-reichert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants