Planning & Search in Rust
Esc

Loading…

↑↓ move ↵ open Esc close
Colour theme
All algorithms

LPA*

Also known as Lifelong Planning A*

search heuristic-search

LPA* (Lifelong Planning A*) finds a cheapest path from a fixed start to a fixed goal, and finds it again after edge costs change. It keeps two values per vertex: g, the cost it found, and rhs, a one-step lookahead from the predecessors' g. A vertex is inconsistent when the two differ, and only inconsistent vertices go on the queue. The first search costs about as much as A*; after a change, LPA* repairs only the part of the search tree that the change affects. With a consistent heuristic (one that never drops by more than the edge cost along an edge), every returned path is optimal.

Pseudocode

algorithm LPA*(s₀, s-goal, h)input: start vertex s₀, goal vertex s-goal, consistent heuristic houtput: a cheapest path from s₀ to s-goal, again after each batch of edge changesrhs[s₀] ← 0                                  ▷ every other g and rhs starts at ∞U ← {s₀}                                     ▷ inconsistent vertices, ordered by keyrepeatcompute()yield path-to(s-goal), or failure if g[s-goal] = ∞for each edge (u, v) whose cost changed do  ▷ edge-changedupdate-vertex(v)until no more changesfunction key(s)return ⟨min(g[s], rhs[s]) + h(s), min(g[s], rhs[s])⟩   ▷ compared lexicographicallyprocedure update-vertex(v)if v ≠ s₀ thenrhs[v] ← min of g[u] + c over (u, c) in predecessors(v)remove(U, v)if g[v] ≠ rhs[v] theninsert(U, v, key(v))procedure compute()while min-key(U) < key(s-goal) or rhs[s-goal] ≠ g[s-goal] dou ← extract-min(U)if g[u] > rhs[u] then                      ▷ overconsistent: settle itg[u] ← rhs[u]else                                       ▷ underconsistent: reset itg[u] ← ∞update-vertex(u)for each (v, c) in successors(u) doupdate-vertex(v)

In the crates

Lineage

Comes from

builds on A*

Led to

AIT* builds on it

BIT* builds on it

D* Lite builds on it

Dynamic multi-objective search builds on it

RRT# builds on it

Papers

  1. Lifelong Planning A* Sven Koenig, Maxim Likhachev, David Furcy · 2004· Artificial Intelligence introduces doi 10.1016/j.artint.2003.12.001