I've set myself to the task of writing a Numbrix generator and wanted to give an update of the process. Making a Numbrix starts out by making a path that winds through a grid and occupies the whole grid. It turns out this is called a "unicursal" maze. I know this because two forums (pretty much at the same time) pointed me to the excellent
Think Labyrinth website.
The algorithm described on Think Labyrinth for generating Unicursal mazes I found entirely too restrictive, so I put myself in contact with Walter Pullen, the man behind Think Labyrinth. In an e-mail to me he had this to say:
Quote:
There's another technique of producing Unicursal Mazes in "Daedalus", although it takes a few steps. Starting with a single line across the Maze area (easiest way is to make a standard perfect Maze and then solve it, leaving just the solution path). Then make that line buckle in the middle, randomly spreading throughout the area like yarn being stuffed into a box (this is accomplished with the "Tweak Passages" command, when configured appropriately). This is slow, tends to produce a Maze with a texture similar to intestines, and leaves a few unfilled cells at the end, however it is a completely alternative approach.
Now that's more like it, only I have to figure out how to avoid the few unfilled cells. I have a theory that involves insuring that there are no contiguous blocks of an odd number of unfilled cells. There are nuances that have to be worked out still, but on paper this approach looks pretty good.