Volume 1, Issue 13; 20 Jun 2017

Maze drawing algorithms are really neat.

This tweet points to an animated GIF that transforms a maze into its spanning tree. That is just really cool. The link to a demonstration of Wilson’s Algorithm for generating mazes is also cool. And so are all the related links, to be honest.

Computer generated mazes have a special place in my heart because one of the first programs I really understood was a maze generator. (I wish I knew, or could recall, what algorithm it was. If pressed, based on hazy recollection of the behavior of the algorithm and the animations on Mike Bostock’s pages, I’d guess randomized depth-first. But it’s totally a guess.)

Back in the 80’s, you could go to the bookstore in the mall and buy books full of computer programs, mostly in BASIC. Just page after page of listings of computer programs that you could then take home and type into your computer. I was a teenager, I mostly wanted the games books, but there were programs of all sorts.

All of the programs were obfuscated, not maliciously (I don’t think), just because paper was expensive and they wanted to fit the programs on the smallest possible number of pages. So lots of lines with multiple statements, single letter variables, no declarations, etc.

I was interested in adventure games at the time, and I wanted to write one that had a maze in it. One of the books I got included a maze generator. I spent many days “unobfuscating” that program, separating the statements, reformatting the code, working out as best I could what the variables were for and naming them appropriately.

In the end, I believed I understood how it worked. And I did write that game. On a DEC Rainbow. Alas, neither the book, nor the game, nor the computer exist anymore.

Of the dozens of books of programs that I once had, exactly two survive in my library:

Elementary Basic: Learning to Program Your Computer in Basic with Sherlock Holmes by Henry Ledgard and Andrew Singer. Really a quite nice introductory programming book with good explanations and useful examples. To the book’s credit, the the conceit of giving Holmes an “Analytical Engine” is well done.

1001 Things To Do with Your Personal Computer by Mark Sawusch. I’m not convinced there are 1,001 programs in there, but there are dozens, perhaps hundreds, in a variety of categories.

Good times.