Iterative-deepening-A* works as follows: at each iteration, perform a depth-first search, cutting off a branch when its total cost exceeds a given threshold. This threshold starts at the estimate of the cost at the initial state, and increases for each iteration of the algorithm. At each iteration, the threshold used for the next iteration is the minimum cost of all values that exceeded the current threshold. As in A*, the heuristic has to have particular properties to guarantee optimality. See [|Properties] below.
Pseudocode
pathcurrent search path nodecurrent node' gthe cost to reach current node festimated cost of the cheapest path hestimated cost of the cheapest path coststep cost function is_goalgoal test successorsnode expanding function, expand nodes ordered by g + h ida_starreturn either NOT_FOUND or a pair with the best path and its cost
procedureida_star bound := h path := loop t := search ift = FOUND then return ift = ∞ then return NOT_FOUND bound := t end loop end procedure
functionsearch node := path.last f := g + h iff > boundthen returnf ifis_goalthen return FOUND min := ∞ forsuccinsuccessorsdo ifsuccnotinpaththen path.push t := search ift = FOUND then return FOUND ift < minthenmin := t path.pop endif end for returnmin end function'''
Properties
Like A*, IDA* is guaranteed to find the shortest path leading from the given start node to any goal node in the problem graph, if the heuristic function is admissible, that is for all nodes, where is the true cost of the shortest path from to the nearest goal. IDA* is beneficial when the problem is memory constrained. A* search keeps a large queue of unexplored nodes that can quickly fill up memory. By contrast, because IDA* does not remember any node except the ones on the current path, it requires an amount of memory that is only linear in the length of the solution that it constructs. Its time complexity is analyzed by Korf et al. under the assumption that the heuristic cost estimate is consistent, meaning that for all nodes and all neighbors of ; they conclude that compared to a brute-force tree search over an exponential-sized problem, IDA* achieves a smaller search depth, but not a smaller branching factor. Recursive best-first search is another memory-constrained version of A* search that can be faster in practice than IDA*, since it requires less regenerating of nodes.
Applications
Applications of IDA* are found in such problems as planning.