Your privacy choices

KiwiBee uses optional Google Analytics, Google Ads, and Meta Pixel cookies to understand adult visitors, measure completed sign-ups, and improve campaigns. Essential cookies always stay on. OpenAI’s ChatGPT Ads Pixel also measures page views and completed enquiries after advertising consent, and may use hashed contact details for matching. Privacy policy

Skip to main content

Pathfinding Maze

About this simulation

This simulation lets students watch three pathfinding algorithms search a maze. Explored cells turn blue, the frontier is amber and the final route glows green. Students choose A star, Dijkstra or BFS, change the speed, turn costly mud on or off and generate a new maze. Readouts show nodes explored, path length and path cost. With mud on, BFS finds the shortest path in steps but not the cheapest, while A star explores far fewer cells. It is useful for computing lessons on algorithms and trade-offs.

What students can explore

  • Run A* on the maze and note Nodes explored, Path length and Path cost.
  • Switch Algorithm to Dijkstra and then BFS on the same maze and compare the three readouts.
  • Turn Mud (cost 3) off and see whether the three paths become equal in cost.
  • Press New maze and predict which algorithm will explore the most cells.
  • Slow Steps/s down to watch the blue explored area and the amber frontier grow.

Learning objectives

  1. 1Compare how BFS, Dijkstra and A star explore a maze.
  2. 2Explain the difference between the shortest path and the cheapest path.
  3. 3Describe how a heuristic helps A star explore fewer cells.
  4. 4Use counts of explored nodes to judge the efficiency of an algorithm.

Questions teachers ask

Is it free to use?

Yes. It is free and runs in any modern browser, including whiteboards and tablets, with no sign-up needed.

Why does BFS sometimes find a costlier path?

BFS counts steps and ignores terrain cost, so it finds the route with the fewest steps. When mud costs more to cross, the fewest-step route can cost more than the one Dijkstra and A star find.

Why does A star explore fewer cells?

A star adds an estimate of the remaining distance to the goal, here the Manhattan distance. This makes it favor cells that lead toward the goal while still finding the cheapest route.

How do I use the pathfinding simulation?

Pick an Algorithm, set Steps/s, and switch Mud on or off. Press New maze to start over, then compare Nodes explored, Path length and Path cost.

Embed this simulation

Drop it into your LMS, blog, or class site — free.

<iframe src="https://kiwibee.io/en/simulations/pathfinding-maze-3d-simulation/embed" title="Pathfinding Maze | KiwiBee" loading="lazy" allowfullscreen style="width:100%;height:min(70vh,620px);min-height:420px;border:0;border-radius:16px"></iframe>

Continue exploring

Bring interactive science into your classroom

KiwiBee's free teacher workspace brings lesson planning, worksheets, classroom tools, and gradebook together in one place.

Start free and create your first class

or explore the teacher workspace →