I am reading the book of Russell & Norvig: AIMA and wonder, why A* (Best-First-Search with f=g+h
) does explore a node, even if it has already been explored with a lower PATH-COST
.
Following the example from John Levin, Best-First-Search expands the following paths:
['S'],
['S', 'A'],
['S', 'A', 'B'],
['S', 'B'], <- unnecessary since the B before has lower path costs
['S', 'D'],
['S', 'D', 'C'],
['S', 'A', 'B', 'C'], <- unnecessary since the B before has lower path costs
['S', 'D', 'E'],
['S', 'D', 'C', 'G']
IMHO node <- POP(frontier)
should happen until node.PATH-COST
is lower than PATH-COST
of all seen instances of that state. Am I wrong?