IDA*
IDASTAR (node : N, bound : B)
IF N is a goal, EXIT algorithm
IF N has no children, RETURN infinity
FN = infinity
FOR each child Ni of N, F[i] := f(Ni)
IF f(Ni) <= B, FN := MIN(FN, IDASTAR(Ni,B))
ELSE FN := MIN(FN, f(Ni))
RETURN FN