Planning & Search in Rust
Esc

Loading…

↑↓ move ↵ open Esc close
Colour theme
All algorithms

Focal search

Also known as A*ε, A* epsilon

search heuristic-search

Focal search (A*ε) finds a path that costs at most w times the optimum (it is bounded-suboptimal). It keeps the open states ordered by f = g + h, where h is admissible: it never overestimates the remaining cost. The focal list holds the open states with f ≤ w · f_min, where f_min is the smallest f that is open. Focal search expands the focal state with the smallest value of a second, free focal key, which in the crate may depend on the whole path, for example the number of conflicts in multi-agent path finding. With w = 1 it is A* that breaks ties by the focal key.

Pseudocode

algorithm Focal-Search(S₀, goal, h, key, w)input: start states S₀, goal test goal, admissible heuristic h, focal key key, weight w ≥ 1output: a path to a goal that costs at most w times the optimum, or failurefor each s in S₀ dog[s] ← 0k[s] ← key-start(s)insert(OPEN, s)                            ▷ ordered by f = g + hwhile OPEN ≠ ∅ dof-min ← min { g[s] + h(s) : s ∈ OPEN }FOCAL ← { s ∈ OPEN : g[s] + h(s) ≤ w · f-min }s ← the state of FOCAL with the smallest k[s]     ▷ ties: smaller f, then larger gremove(OPEN, s)if goal(s) thenreturn path-to(s)for each (a, s′, c) in successors(s) doif g[s] + c < g[s′] theng[s′] ← g[s] + cparent[s′] ← sk[s′] ← key-extend(k[s], s, a, c, s′)        ▷ the key follows the best pathinsert-or-update(OPEN, s′)                   ▷ reopens a closed statereturn failure

In the crates

  • heuristic-search

    Bounded-suboptimal search with a public focal list and tie-breaking, finding a solution within weight times the optimum.

    focal_search

Lineage

Comes from

generalizes A*

Led to

ECBS combines it

Papers

  1. Studies in Semi-Admissible Heuristics Judea Pearl, Jin H. Kim · 1982· IEEE Transactions on Pattern Analysis and Machine Intelligence introduces doi 10.1109/tpami.1982.4767270