Table of Contents
Acknowledgments |
Introduction |
About This Book |
Online Resources |
1. | Your First Random Mazes |
Preparing the Grid |
The Binary Tree Algorithm |
The Sidewinder Algorithm |
Your Turn |
2. | Automating and Displaying Your Mazes |
Introducing Our Basic Grid |
Implementing the Binary Tree Algorithm |
Displaying a Maze on a Terminal |
Implementing the Sidewinder Algorithm |
Rendering a Maze as an Image |
Your Turn |
3. | Finding Solutions |
Dijkstra’s Algorithm |
Implementing Dijkstra’s |
Finding the Shortest Path |
Making Challenging Mazes |
Coloring Your Mazes |
Your Turn |
4. | Avoiding Bias with Random Walks |
Understanding Biases |
The Aldous-Broder Algorithm |
Implementing Aldous-Broder |
Wilson’s Algorithm |
Implementing Wilson’s Algorithm |
Your Turn |
5. | Adding Constraints to Random Walks |
The Hunt-and-Kill ... |
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.