O'Reilly logo

Mazes for Programmers by Jamis Buck

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Making Challenging Mazes

There are lots of ways to make a maze more challenging, but many of them are highly subjective and difficult to quantify. Walter D. Pullen, author of the Think Labyrinth! website, lists many of the considerations of a challenging maze on his Maze Psychology page,[8] and the list is not short. We’re going to focus on just one of them, here—solution length—and we’ll see how Dijkstra’s algorithm again saves the day.

In general, the longer the path, the more difficult the maze. Ideally, then, if we want a more challenging maze, we want to identify the longest path through it. We then put the entrance of our maze at one end of the path, and drop the goal at the other end, and we’ve upped the ante. Easy as that.

A general ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required