Class: | Search algorithm |
Data: | Tree, Graph |
Space: | O(d) |
Iterative deepening A* (IDA*) is a graph traversal and path search algorithm that can find the shortest path between a designated start node and any member of a set of goal nodes in a weighted graph. It is a variant of iterative deepening depth-first search that borrows the idea to use a heuristic function to conservatively estimate the remaining cost to get to the goal from the A* search algorithm. Since it is a depth-first search algorithm, its memory usage is lower than in A*, but unlike ordinary iterative deepening search, it concentrates on exploring the most promising nodes and thus does not go to the same depth everywhere in the search tree. Unlike A*, IDA* does not utilize dynamic programming and therefore often ends up exploring the same nodes many times.
While the standard iterative deepening depth-first search uses search depth as the cutoff for each iteration, the IDA* uses the more informative
f(n)=g(n)+h(n)
g(n)
n
h(n)
n
The algorithm was first described by Richard Korf in 1985.[1]
Iterative-deepening-A* works as follows: at each iteration, perform a depth-first search, cutting off a branch when its total cost
f(n)=g(n)+h(n)
As in A*, the heuristic has to have particular properties to guarantee optimality (shortest paths). See Properties below.
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,[1] that is
h(n)\leh*(n)
for all nodes, where is the true cost of the shortest path from to the nearest goal (the "perfect heuristic").[2]
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
h(n)\lecost(n,n')+h(n')
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 (by a constant factor), but not a smaller branching factor.[3]
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.[2]
Applications of IDA* are found in such problems as planning.[4] Solving the Rubik's Cube is an example of a planning problem that is amenable to solving with IDA*.[5]
. Ivan Bratko (computer scientist) . Prolog Programming for Artificial Intelligence . Pearson Education . 2001.