Graph Heuristics

12 min read Assignment

Graph Heuristics

Greedy BFS • Dijkstra's • A*

A graph heuristic is a strategy for deciding which node to explore next when searching through a graph. The three algorithms in this lesson each make that decision differently — trading off speed, memory, and optimality.

Greedy BFS
Uses only h(n) — the estimated cost to goal. Fast but not guaranteed optimal.
Dijkstra's
Uses only g(n) — the actual cost from start. Optimal but explores in all directions.
A*
Uses f(n) = g(n) + h(n) — combines both. Optimal and efficient. Used in the Maze Runner.

Work through the sidebar from left to right. Pass the quiz for each algorithm to unlock the next.

Algorithm Journey

Pass each quiz to unlock the next algorithm.

Game Status: Not Started
  • Select an algorithm in the sidebar to begin. Complete each quiz to unlock the next.
  • Use the Maze Runner on the right to see these algorithms in action!

Submit Assignment

Need to update a submission later? Open the submissions dashboard.

Course Timeline