sraaphorst / spelunker

Maze generation and solving library
Other
11 stars 2 forks source link

Add refinement to cellular automata to make them actual usable mazes #41

Open sraaphorst opened 6 years ago

sraaphorst commented 6 years ago

This deals with issue #23.

After the cellular automata algorithms have run, seldom do they generate usable mazes.

What we should do is determine connected components (using disjoint sets?), and then carve passages between them so that they can actually be mazes. This won't make them perfect spanning trees, but it will help.

sraaphorst commented 6 years ago

Rule B2/S123 seems to do exactly this.

sraaphorst commented 6 years ago

We could still add the refinement, though, which would be useful to ensure connectivity.