Making Hexagon (Sigma) Mazes

Learn how to make and display a maze made on a hex grid, also known as a sigma maze.

Introduction to sigma mazes

A maze made on a hex grid is formally called a sigma maze. It works the same regardless of what we call it: we just choose a maze algorithm and let it create a maze. Let’s use the Recursive Backtracker algorithm to run our new to_png implementation. Let's create a new file, hex_maze.rb.


Get hands-on with 1200+ tech skills courses.