Ruby

http://s.erious.ly

the { buckblogs :here }

Winding down…

It’s been a good run, but my thrill for blogging has ebbed. Most of my online conversation occurs on Twitter these days, and my Buckblog has definitely felt the lack of attention. So, it is with some sadness that I announce the end of......

Sharing the Inheritance Hierarchy

I’ve been working more closely with Ruby 1.9 and Rails 3 lately, and while in general it’s been smooth going, there was one particularly disappointing road bump today. Consider the following code, from a Rails functional test: ...

Maze Generation: More weave mazes

My previous post showed one way to create “weave mazes”, or mazes in which the passages weave over and under one another. The technique I showed was flexible, and could be implemented using several different maze algorithms, but it has (at least) one big drawback: it’s not predictable. You don’t know how many over/under...

Maze Generation: Weave mazes

This is a “weave” maze:

weave maze

The name does not describe any specific algorithm for generating mazes, but rather simply identifies the class of maze, where some passages weave over or under other passages. It’s a type of 3D maze but it can be rendered nicely in 2D, as long as...

Weave Mazes: Your Take?

Later this week I’m going to post an article about how you might implement “weave mazes”, like this one: This is a maze where some of the passages “weave” over or under other passages. It’s a type of 3D maze, but very cons...

Programming Language Survey Results

A couple of weeks ago (already!) I asked two simple questions of my Twitter followers: what are (up to) four programming languages that you know and love, and what are (up to) four programming languages that you would like to learn? Aro...

Kaleidoscope

It’s funny how knowledge leads to knowledge. You start digging deeper into one thing, and discover threads leading off into related fields. I began by researching maze algorithms, decided I wanted to see what mazes in more complex tesselations would look like, and after one thing or anouther found myself learning about Wythoff constructions.

The...

Mazes in CoffeeScript

Several people have asked how I did the Javascript demos in my maze algorithm articles, and while I’ve answered them a couple of times in the comments, I thought it might be interesting enough to warrent its own post. The demos are ac...

Maze Generation: Algorithm Recap

(Hello Minecrafters! If you’re looking for random mazes you can build in Minecraft, you might be better served by this page I wrote. It’ll give you block-wise schematics for the maze, and will require less mental translation than the demos here. Just don’t use IE—it won’t work right in that browser. If you want...

Maze Generation: Sidewinder algorithm

Last of the (eleven!) maze algorithms on my list is the Sidewinder algorithm. With a name like that, it’s got to be cool, right?

Well, possibly. It’s got its problems, but it’s quick and easy to implement, and allows arbitrarily tall mazes. It’s closely related to the Binary Tree algorithm, but manages to get away...

Maze Generation: Binary Tree algorithm

This next algorithm is crazy, crazy simple. It also is the only one of the algorithms I’ve covered with the ability to generate a perfect maze without keeping any state at all. It can build the entire maze by looking at only a single cell at a time.

Here’s how it works: for every cell in...

Maze Generation: Growing Tree algorithm

Remember way back in the first article of this series, where I said that Recursive Backtracking was my favorite for generating mazes? Well, I changed my mind. My new favorite is the Growing Tree algorithm.

This algorithm is pretty cool. Configured one way, it mimics the behavior of the Recursive Backtracking algorithm. Configured another,...