Beam-stack search
Also known as Beam stack search
search heuristic-search
Beam-stack search is beam search that remembers what it pruned, so it is complete. Its beam stack holds one interval [low, high) of f values per layer, and the next layer admits only successors with f in that interval. When the search runs dry, it backtracks to the deepest layer that still has f values below the best solution cost U, moves that interval to [high, U) and builds the layer below again. It finds a first path as fast as beam search and reports each better one (it is anytime); when the stack is empty, the last path is optimal for an admissible heuristic. Memory stays at about width states per layer, but a narrow beam can take a long time to finish.
Pseudocode
algorithm Beam-stack search(s₀, goal, h, width)input: start s₀, goal test goal, admissible heuristic h, beam width width ≥ 1output: better and better paths; the last is optimal once the stack is emptyU ← ∞ ▷ cost of the best path so farLAYER[0] ← {s₀}STACK ← ⟨[0, ∞)⟩ ▷ item d: the f interval [low, high) for layer d + 1d ← 0repeatwhile LAYER[d] ≠ ∅ do[low, high) ← STACK[d]NEXT ← ∅for each s in LAYER[d] with f(s) < U, in order of f = g + h doif goal(s) thenU ← g[s]on-solution(path-to(s)) ▷ a goal is not expandedelsefor each (s′, c) in successors(s) doif low ≤ g[s] + c + h(s′) < min(high, U) and no copy of s′ with g ≤ g[s] + c is in memory thenNEXT ← NEXT ∪ {s′ with g = g[s] + c}remove the states with f ≥ U from NEXTif NEXT holds more than width states thenf-cut ← the width-th smallest f in NEXTSTACK[d] ← [low, smallest f in NEXT above f-cut)NEXT ← the states of NEXT with f ≤ f-cut ▷ keep ties at the widthLAYER[d + 1] ← NEXTpush(STACK, [0, ∞))d ← d + 1while STACK ≠ ∅ and high of top(STACK) ≥ U dopop(STACK)if STACK = ∅ thenreturn path-to the best goal, or failure if U = ∞d ← |STACK| − 1STACK[d] ← [high of STACK[d], U) ▷ the f values this layer pruneddrop every layer below duntil falseIn the crates
heuristic-searchComplete and anytime beam search, optimal once it completes, with a fixed beam width.
Lineage
Comes from
builds on Beam search
Led to
Nothing on this site.
Papers
- Beam-Stack Search: Integrating Backtracking with Beam Search Rong Zhou, Eric A. Hansen · 2005· Proceedings of the Fifteenth International Conference on Automated Planning and Scheduling (ICAPS 2005)