Depth-limited Search - Algorithm (informal)

Algorithm (informal)

  1. Determine the vertex where the search should start and assign the maximum search depth
  2. Check if the current vertex is the goal state
    • If not: Do nothing
    • If yes: return
  3. Check if the current vertex is within the maximum search depth
    • If not: Do nothing
    • If yes:
      1. Expand the vertex and save all of its successors in a stack
      2. Call DLS recursively for all vertices of the stack and go back to Step 2

Read more about this topic:  Depth-limited Search