procedure breadth_first_search;
begin
OPEN:=[START];
CLOSED:=[ ];
while OPEN<>[ ] do
begin
X := dequeue (OPEN);
if final(X)
then return(success);
else
begin
add X to CLOSED
find successors of X
kill the successors of X that are in CLOSED or OPEN;
enqueue the surviving successors of X into OPEN;
end; {else}
end; {while}
return(failure);
end; {breadth_first_search}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment