liveBook · Manning

Maze

A maze is a spatial puzzle or problem space of connected and obstructed routes in which a path must be found between designated locations.

How 2 Manning books explain it

Classic Computer Science Problems in Swift: Essential techniques for practicing programmers

A navigational problem space consisting of connected locations and passages with a goal of finding a path between locations.

How it is used
Uses a grid navigation problem to exercise depth-first search, breadth-first search, and A*.
How deep it goes
Builds random generation, locations, legal moves, goal testing, and path display; does not guarantee a generated maze has a solution.
Examples
Runs searches on randomly generated 10-by-10 grids and prints routes marked with start, goal, and path characters.
What you can do after
Build it from scratch in Swift, then run a pathfinding algorithm and display a route when one exists.

Read how Classic Computer Science Problems in Swift: Essential techniques for practicing programmers explains maze →

Learn Go with Pocket-Sized Projects

A maze is a spatial puzzle consisting of connected and obstructed routes arranged so that a path must be found between designated locations.

How it is used
Uses mazes as a complete engineering exercise for concurrent exploration, image processing, command-line output, and testing.
How deep it goes
Explains grid encoding, constraints, neighbor discovery, entrance scanning, concurrent exploration, and focused tests.
Examples
Demonstrates edge and internal treasures, colored PNG grids, dead ends, branches, crosses, and small exploration test images.
What you can do after
Build a Go command-line solver that reads a PNG maze, finds its solution, highlights the route, and optionally creates an exploration GIF.

Read how Learn Go with Pocket-Sized Projects explains maze →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.