|
RECURSIVE-DLS implements the
TREE-SEARCH algorithm using depth first search with a depth limit. You can see the effect of the depth limit
in the else if statement, the 4th line in the RECURSIVE-DLS
method() . Here, if the depth limit is
reached, a flag cutoff is returned to the caller (either
DEPTH-LIMITED-SEARCH or RECURSIVE-DLS).
In the latter case, RECURSIVE-DLS backtracks and has to try another
successor if possible. In the former
(when cutoff is returned to the calling function DEPTH-LIMIT-SEARCH,
the search tree (to depth limit) has been entirely explored and
exhausted for goal states.
|