A search is a a general best-first framework using an evaluation function of the form
- : cost from start node to node
- : heuristic estimate from to goal
We maintain a priority queue ordered by , and then expand the node with the smallest . Thus, we combine search depth/cost (via ) with goal guidance (via ).
Note that Algorithm A is a framework, not a specific algorithm. Its properties depend entirely on the heuristic .
For example, if overestimates the true cost, A search might expand a suboptimal path first.

In the above case, if the for path 1 is overestimated, we would return a suboptimal path.