Figure 6: The breadth-first control strategy algorithm

Put the start node on list OPEN (unexpanded nodes).

IF start node is a goal node, show solution.

while searching for a solution

   IF list OPEN is empty, no solution exists, quit.

   Remove first node n from list OPEN and place it 
   on list CLOSED (expanded nodes).

   Expand node n.

   Place all successors of node n at end of list OPEN.

   IF any successor is a goal node, show solution.

end while