The previous algorithm does not utilize the full power of recursive
The previous algorithm does not utilize the full power of recursive
it is possible to simplify the procedure further by using recursion itself (rather than an explicit open list) to organize states and paths through the state space
a global closed list is used to detect duplicate states and prevent loops and the open list is implicit in the activation records of the recursive environment
rather than generating all children of a state and placing them on an open list, the following algorithm produces the child states one at a time and recursively searches the descendants of each child before generating its sibling
In recursive searching a child state, if some descendant of that state is a goal, the recursive call returns success and the algorithm ignores the siblings
If the recursive call on the child state fails to find a goal, the next sibling is generated and all of its descendants are searched
In this fashion, the algorithm searches the entire graph in a depth-first order