Uniform-cost search
= Uniform-cost search
{title2=$f(n)=g(n)$}
<Best-first search> prioritizing accumulated <path cost>, equivalently <A-star search> with zero <heuristic function>. With finite <branching factor> and positive lower-bounded step costs, <tree search> is complete for finite solutions and returns a least-cost goal if the <goal test> is applied on removal from the <search frontier>. Goal testing at generation can instead return an expensive <edge> before a cheaper multi-<edge> route is explored.