Skip to Main Content
Mazes for Programmers
book

Mazes for Programmers

by Jamis Buck
July 2015
Intermediate to advanced content levelIntermediate to advanced
286 pages
6h 31m
English
Pragmatic Bookshelf
Content preview from Mazes for Programmers

Your Turn

It’s been said that if you stick to the rules, you miss all the fun. When it comes to mazes, at least, there appears to be some truth to that. Knowing which rules to bend (or even break!) can open entire floodgates of possibility.

We focused in this chapter on breaking the rules that forbid self-intersection—that is, allowing passages to intersect themselves. We worked through braiding mazes by removing dead ends, and then further complicated things by dropping pits of molten lava in the middle of our lovely shortest path. We looked at how Dijkstra’s algorithm can compensate for these traps and obstacles—these weights—and give you the most efficient (least expensive) path around them. We implemented weave mazes and a way to draw them ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Exercises for Programmers

Exercises for Programmers

Brian P. Hogan

Publisher Resources

ISBN: 9781680501315Errata Page