November 3, 2019
A while back I bought Jamis Buck’s Mazes for Programmers and it’s been sitting on my TODO stack on my nightstand. The book explores about a dozen algorithms implemented in Ruby for generating mazes (and Dijkstra’s algorithm for solving them), and I thought it’d be interesting to walk through the implementations, following along in the original Ruby and re-implementing them in a functional paradigm, starting with Clojure.
It’s been several years since I used Ruby as my daily driver. These days I get to use Clojure for the vast majority of my work and side programming, so this will be an opportunity to light up those idle OOP pathways in my brain again. Moreover, the kinds of programs I’m paid to write (and the ones I write for myself) don’t tend to make extensive use of this sort of computation, so I figure it’ll be a nice complement to my normal work.
Jamis blogged a lot of the book’s original material before producing the book – those posts are visible in his blog archive (search that page for “maze” to see the full list).
For more on solving mazes, Amit Patel’s Red Blob Games site has a ton of amazingly well-presented work on various algorithms – of particular interest are the sections on using the A* algorithm for maze solving.
h.urna has some really neat web-based tools for visualizing maze generation, including a memory usage graph for each step.
Think Labyrinth! is a fantastic resource for understanding mazes – especially the sections on classifying algorithms for classifying maze generation and solution algorithms.