Skip to content
Adaptive AgroTech NetworkUniversity of Southern Denmark · SDU Drone Center
Cover for Dijkstra vs A*: How Does a Robot Choose a Path?

Video by Adaptive AgroTech. If the embedded player is unavailable, open the original video ↗.

Motion planningInterview topic 025

Dijkstra vs A*: How Does a Robot Choose a Path?

Dijkstra and A* search the same free-space graph with different priorities. A* adds a goal-directed heuristic that can reduce exploration, while shortest-path guarantees depend on edge costs and heuristic assumptions.

Understand the concept

The key idea

Dijkstra prioritizes the frontier cell with lowest accumulated cost \(g\). A* uses \(g+h\), adding an estimate of remaining goal cost. On the presentation's equal-cost four-neighbor grid, Manhattan distance directs A* toward the goal, and both methods find the same shortest cost while A* expands fewer cells. The reduction depends on map, heuristic, and tie breaking. Dijkstra requires nonnegative edge costs. A* graph search without reopening closed nodes preserves optimality with a consistent heuristic. A shortest graph path still needs motion control and does not independently handle turning limits or moving obstacles.

What to remember

  • Dijkstra prioritizes accumulated path cost.
  • A* adds an estimate of cost remaining.
  • Graph optimality depends on stated cost and heuristic assumptions.
Pause & think

Check your understanding

What changes when A* adds h to Dijkstra's cost priority?

Show the explanation

The heuristic directs exploration toward the goal and can reduce the number of expanded cells.