Planning & Search in Rust
Esc

Loading…

↑↓ move ↵ open Esc close
Colour theme
All algorithms

RTA*

Also known as Real-Time A*

search heuristic-search

RTA* (Real-Time A*) moves an agent toward a goal while it plans only one step ahead. It moves to the successor s′ with the smallest c(s, s′) + h(s′), like LRTA*. But it stores the second-best value for the state it leaves: the cost to come back and try the best alternative. So the agent avoids going back and forth within one trial. These stored values can overestimate, so the table is not admissible and repeated trials need not converge; use LRTA* to learn across trials.

Pseudocode

algorithm RTA*(s₀, goal, H)input: start state s₀, goal test goal, table H (starts as a heuristic h)output: the path travelled to a goal, or failures ← s₀while not goal(s) doE ← {(s′, c + H[s′]) : (s′, c) in successors(s), H[s′] < ∞}if E = ∅ then                              ▷ every successor is a dead endH[s] ← ∞return failure(s-best, f₁) ← entry of E with the smallest value   ▷ the first on tiesif |E| ≥ 2 thenH[s] ← second-smallest value in E        ▷ the cost to come back and try the next bestelseH[s] ← f₁                                ▷ a single live successor is not a dead ends ← s-best                                 ▷ move one step and record itreturn the path travelled

In the crates

Papers

  1. Real-time heuristic search Richard E. Korf · 1990· Artificial Intelligence introduces doi 10.1016/0004-3702(90)90054-4