Описание слайда:
The A* Algorithm
A*-Search(initial-test) ;; functions cost, h, succ, and GoalTest are defined open <- MakePriorityQueue(initial-state, NIL, 0, h(initial-state), h(initial-state))
;; (state, parent, g, h, f)
while (not(empty(open)))
node pop(open), state node-state(node)
closed push (closed, node)
if GoalTest(state) succeeds return node
for each child in succ(state)
new-cost node-g(node) + cost(state,child)
if child in open
if new-cost < g value of child
update(open, child, node, new-cost, h(child), new-cost+h(child))
elseif child in closed
if new-cost < g value of child
insert(open, child, node, new-cost, h(child), new-cost+h(child))
delete(closed,child)
else
open push(child, node, new-cost, h(child), new-cost+h(child))
return failure