Uniform-cost search is similar to breadth-first search. We associate with each node n a cost g(n) that measures the cost of getting to node n from the start node. g(start) = 0. If n_{i} is a successor of n, then g(n_{i}) = g(n) + c(n,n_{i}) , where c(n,n_{i}) is the cost of going from node n to node n_{i} .
Instead of considering the first node on open, as in breadth-first search, the least-cost node on open is expanded.
Advantage:
Disadvantages:
Uniform-cost search is the same as Heuristic Search when no heuristic information is available (heuristic function h is always 0 ).