let iterativedfs ~start ~childgen ~goaltest ~combinator =
(* repeatedly call boundeddfsearch with increasing depth, until we find a solution*)
let rec loop iter =
let res = boundeddfsearch ~start ~childgen ~goaltest ~combinator ~depth:iter in
if res = None then
loop (iter+1)
else
res
in
loop 1