Breadth-First Search Algorithm

  1. Put the start node s on a queue called open. open contains nodes that are still to be examined.

  2. While open is non-empty,

    1. Remove the first node n from open; put n on a list called closed. If n is a goal node, terminate with success. The solution path is given by the pointers from n back to the start node.

    2. Expand node n (generate its successors). For each successor node m, if it is neither on open nor on closed, put a pointer from m back to n and record the operator used; insert m at the end of the open queue.

  3. open is empty; terminate with failure.

Contents    Page-10    Prev    Next    Page+10    Index