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 ...
Get Mazes for Programmers now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.