Tinker Finding the way

by Samy (Kondasamy Jayaraman)

28 settled

Dijkstra: 28 junctions looked at.

Chapter 4 of 7

A*: lean toward the goal

Dijkstra settled junctions behind the depot that lead nowhere near the customer. The app can do better.

This chapter: How can a search look at fewer junctions and still find the quickest way?

About this chapter

You will learn

  • A* adds a guess of the minutes left
  • A guess that never overestimates keeps the route exact
  • Weighting the guess trades minutes for speed

Words you’ll meet

A*
Dijkstra plus a guess of the minutes still to go, so it leans toward the goal.
Heuristic
The guess: here, the straight-line distance at the fastest road’s pace.
Weight
How hard the search trusts its guess; above 1 it may give up a few minutes.

Step 1 of 5

adds a to each junction’s minutes: a guess of the minutes left, by straight line at the fastest road’s pace.

Pick A*.