Planning & Search in Rust
Esc

Loading…

↑↓ move ↵ open Esc close
Colour theme
All algorithms

NBS

Also known as Near-Optimal Bidirectional Search

search heuristic-searchminiplan

NBS (Near-Optimal Bidirectional Search) searches forward from the start and backward from the goal at the same time. It expands states in pairs, one from each side. The lower bound of a pair (u, v) is max(f_F(u), f_B(v), g_F(u) + g_B(v)); NBS expands a pair only when that bound is at most the current lower bound, and raises the bound when no such pair is left. It stops when the bound reaches the cost of the cheapest meeting point. With admissible estimates the path is optimal, and NBS never expands more than twice the states that any admissible front-to-end bidirectional search (one that estimates the cost to the far end, not to the other frontier) must expand.

Pseudocode

algorithm NBS(s₀, goal, h_F, h_B)input: start s₀, goal test goal, admissible h_F (cost to a goal) and h_B (cost from s₀)output: a cheapest path from s₀ to a goal, or failureWAIT_F ← {s₀}                                ▷ waiting queues are ordered by fWAIT_B ← the goal statesREADY_F ← ∅                                  ▷ ready queues are ordered by gREADY_B ← ∅μ ← ∞                                        ▷ cost of the cheapest meet foundCLB ← 0                                      ▷ current lower boundwhile both sides have open states and CLB < μ dofor each side d in F, B domove every state with f_d ≤ CLB from WAIT_d to READY_dif READY_F ≠ ∅ and READY_B ≠ ∅ and min-g(READY_F) + min-g(READY_B) ≤ CLB thenu ← extract-min(READY_F)v ← extract-min(READY_B)expand(u, F)                             ▷ children go to WAIT_Fexpand(v, B)                             ▷ predecessors go to WAIT_Bμ ← min(μ, cheapest g_F + g_B of a state seen on both sides)elseCLB ← smallest lb(u, v) of any open pair  ▷ lb = max(f_F(u), f_B(v), g_F(u) + g_B(v))if μ < ∞ thenreturn path through the cheapest meetreturn failure

In the crates

Papers

  1. Front-to-End Bidirectional Heuristic Search with Near-Optimal Node Expansions Jingwei Chen, Robert C. Holte, Sandra Zilles, Nathan R. Sturtevant · 2017· Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence (IJCAI) introduces doi 10.24963/ijcai.2017/69