Chapter 02 · Section II · 12 min read
Solving problems with AI
How heuristics let a system skip exploring most of the search space — and where they go wrong.
A blind search of every possible route from Thamel to Bhaktapur would take forever. The trick is to use a heuristic — a quick, often-wrong estimate of how close you are to the goal. Straight-line distance is a classic heuristic for route-finding.
A* search, the algorithm that powers most navigation apps, combines the actual distance walked so far with the heuristic estimate of distance remaining. It explores promising paths first, and ignores the wasteful ones.
This section is a stub. The full version will show how A* finds the route from Thamel to Bhaktapur, and what happens when the heuristic is too optimistic.