Heuristic search

Author

Clayton Cafiero

Published

2026-06-01

Introduction

Dijkstra’s algorithm is guarenteed to find a shortest path between a given start node and all other nodes in a graph. However, this greedy algorithm proceeds blindly, without any sense of progress toward goal. Without some estimate of progress toward goal, a search algorithm might perform unnecessary work. Accordingly, we have heuristic search which adds intelligence in the form of an estmated distance from goal. This is used to prioritize, and thus guide search, and can often result in fewer nodes being explored that with Dijkstra. In typical cases, this can speed graph search significantly.

This is the objective of heuristic search. The first heuristic search algorithm we’ll investigate is \astar, and algorithm originally developed for robot route-finding.

Copyright © 2023–2026 Clayton Cafiero

No generative AI was used in producing drafts of this material. This was written the old-fashioned way. AI was used to rewrite existing pseudocode in LaTeX to produce standalone *.tex files for rendering, and for revisions toward satisfying WCAG 2.1 AA-level accessibility standards as required by UVM policy. It may also have been used to proofread selected human-written prose. Claude 2.1.150 with model Sonnet 4.6. Revisions, if any, were performed by the author. AI was not used in generating any code whatsoever. All code samples and starter code are by the author only.