6 Iterative Deepening

function ID(P = ⟨S, s₀, A, τ, c, G⟩):
    limit ← 1
    while true:
        if DLS(P, limit) == "done":   # goal found?
            return "done"
        else:
            limit ← limit + 1