Planning & Search in Rust
Esc

Loading…

↑↓ move ↵ open Esc close
Colour theme
All algorithms

IDA*

Also known as Iterative Deepening A*

search heuristic-search

IDA* (Iterative Deepening A*) finds a cheapest path with an admissible heuristic h (one that never overestimates), in memory linear in the path length. It runs a series of depth-first searches, and each search prunes a state when f = g + h exceeds a threshold. The first threshold is h of the start; each next threshold is the smallest f that the last search pruned. IDA* keeps only the current path, so it expands a state again in every iteration and along every path that reaches it. Use it on trees and on graphs where few paths lead to the same state and few distinct f values occur; many distinct float costs mean many iterations.

Pseudocode

algorithm IDA*(s₀, goal, h)input: start state s₀, goal test goal, admissible heuristic houtput: a cheapest path to a goal, or failureθ ← h(s₀)P ← ⟨s₀⟩                                     ▷ the current pathwhile true dot ← search(P, 0, θ)if t = found thenreturn Pif t = ∞ thenreturn failureθ ← t                                      ▷ the smallest pruned ffunction search(P, g, θ)s ← last(P)if g + h(s) > θ thenreturn g + h(s)if goal(s) thenreturn foundt-min ← ∞for each (s′, c) in successors(s) doif s′ ∉ P then                             ▷ skip cycles on the pathappend(P, s′)t ← search(P, g + c, θ)if t = found thenreturn foundt-min ← min(t-min, t)remove-last(P)return t-min

In the crates

  • heuristic-search

    Iterative deepening A*: cheapest path with an admissible heuristic in memory linear in the depth.

    ida_star

Lineage

Comes from

builds on IDDFS

Led to

Fringe search builds on it

IDA* with transposition table builds on it

Papers

  1. Depth-first iterative-deepening: An optimal admissible tree search Richard E. Korf · 1985· Artificial Intelligence introduces doi 10.1016/0004-3702(85)90084-0