



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




function IDA*( problem) returns a solution sequence inputs: problem, a problem local variables: f-limit, the current f - Cost limit root, a node
root โ Make-Node(Initial-State[problem]) f-limit โ f - Cost[root] loop do solution, f-limit โ DFS-Contour(root, f-limit) if solution is non-null then return solution if f-limit = โ then return failure; end
function DFS-Contour(node, f-limit) returns a solution sequence and a new f - Cost limit inputs: node, a node f-limit, the current f - Cost limit local variables: next-f, the f - Cost limit for the next contour, initially โ
if Goal-Testproblem then return node, f-limit if f - Cost[node] > f-limit then return null, f - Cost[node] for each node s in Successors(node) do solution, new-f โ DFS-Contour(s, f-limit) if solution is non-null then return solution, f-limit next-f โ Min(next-f, new-f); end return null, next-f