Who Should Take This Course and Why?

Get introduced to this course's target audience, programming language, and learning outcomes.

Intended audience

If you’ve ever written software before, then this course is for you. You don’t need to have a degree in computer science, and you don’t need to have shipped any large software projects before—you only need to be familiar with simple programming concepts.

Maybe you’re a game designer. Your games might be visually rich and complex, graphically simplistic, or even purely textual, but mazes can still play various roles.

If gaming isn’t your thing, perhaps algorithms are. Programmers—hobbyists and professionals alike—often take great delight in learning and implementing processes like random maze algorithms. Understanding these algorithms and bringing them to life is a grand puzzle, all by itself, with a lot of satisfaction to be found in the journey.

And even if you don’t identify with either of those categories, you may yet find value in maze algorithms.

These algorithms can be very effective against burnout and programmer’s block by providing a moderate level of challenge and a variety of visually interesting and engaging ways to play with them. Taking a bit of time each day to tinker with a different algorithm can keep your mind fresh and limber. It’s great mental exercise!

About the code

The sample code and the examples in this course are all written in Ruby, but the algorithms and techniques used are definitely not Ruby-specific. The examples are written clearly enough that even if you aren’t familiar with Ruby, the concepts shine through; there’s plenty of room for experimentation.

What to expect

This is a hands-on course. Whenever an algorithm is covered, you'll be required to implement it in Ruby so that you can visualize it immediately.

So, throughout this course, we'll cover different algorithms. You’ll learn about a dozen different ways to generate mazes using those particular algorithms, as well as several fascinating ways to play around with them.

Note: Click the "Run" button to compile and look at the generated maze to get an idea of what's to follow.

Press + to interact
require 'colored_grid'
require 'binary_tree'
grid = ColoredGrid.new(25, 25)
start = grid[grid.rows / 2, grid.columns / 2]
grid.distances = start.distances
img = grid.to_png
img.save "colorized.png"
filename = "colorized.png"

Course learning outcomes

We will be looking at the following topic:

  • We’ll learn about a dozen different ways to generate mazes using different algorithms.

  • We'll look at some basic techniques and will walk through the beginnings of a grid implementation.

  • We'll learn about Dijkstra’s algorithm in depth and see how it can be used to find solutions to the mazes we'll generate.

  • We'll use Dijkstra’s algorithm to gain insight into the structures and patterns hiding within those mazes.

  • We’ll see how to color mazes, fit them into arbitrary outlines, and build them out radially in circles.

  • We’ll explore different grid styles based on hexagons and triangles.

  • We'll learn to create 3D mazes by building passages that weave over and under one another.

  • We'll play around with the algorithms to produce things like particularly dense weaves, rooms, or even infinitely long mazes.

  • We'll learn to build these mazes out in multiple dimensions.

Press + to interact
Let's get started
Let's get started