Depth-limited Search - Pseudocode

Pseudocode

DLS(node, goal, depth) { if ( depth >= 0 ) { if ( node == goal ) return node for each child in expand(node) DLS(child, goal, depth-1) } }

Read more about this topic:  Depth-limited Search