/* OPEN and CLOSED are lists */
OPEN = Start node, CLOSED = empty
While OPEN is not empty do
Remove leftmost state from OPEN, call it X
If X is a goal return success
Put X on CLOSED
Generate all successors of X
Eliminate any successors that are already
on OPEN or CLOSED
put remaining successors
on LEFT end of OPEN
End while
For depth first put successors on LEFT (ie. acts like a STACK)
|