width-search
Width-based search without heuristics: novelty tables, Iterated Width (IW), Serialized IW, BFWS and Rollout IW for planning and games
cargo add width-search Who it is for
- Planning and search people who want IW, SIW or BFWS in Rust, on SAS+ tasks or on their own state representation, without writing a heuristic first.
- Game and tool developers who need to check that a generated level is solvable, plan for NPCs from world-state facts, or explore a simulator from its raw state bytes (more in In games).
- Researchers comparing novelty-based pruning against heuristic search, with node counts that line up with LAPKT.
- For shortest paths with action costs and a good distance heuristic, A* and its variants in
heuristic-searchare the better pick. Heuristics for classical planning tasks live inplanning-heuristics, and probabilistic outcomes are handled bystochastic-search.
Algorithms 7
- BFWS Best-First Width Search · BFWS(⟨w_{#g}, #g⟩)
Best-first width search BFWS(⟨w_{#g}, #g⟩) with novelty computed per value of the goal count.
- BFWS-f5 BFWS(f5) · BFWS #r · BFWS(⟨w_{#g,#r}, #g⟩)
BFWS(⟨w_{#g,#r}, #g⟩), where #r counts relaxed-plan facts reached, recomputed whenever the goal count drops.
-
The additive heuristic on SAS+ tasks, whose best supporters give the relaxed plans for BFWS.
- IW Iterated Width · IW(k)
IW(k) is breadth-first search that drops every non-goal state with novelty greater than k; iterated width runs IW(1), IW(2), ... until one succeeds.
- Novelty pruning Novelty
Novelty tables that prune every state making no new combination of up to k features true.
- Rollout IW Rollout IW(1)
Depth-first rollouts that prune a node unless it reaches some feature at a smaller depth than before, running until a goal is found or the root is solved.
- SIW Serialized Iterated Width · Serialized IW
A simplified serialized IW that runs iterated width from the current state until the goal count drops, appends that subplan, and repeats.