width-search
Width-based search (Lipovetzky & Geffner): novelty tables, IW(k), iterated width, and BFWS(⟨w_{#g}, #g⟩).
Anything that can enumerate successors and describe states as integer features implements WidthProblem: planning atoms, grid cells, RAM bytes. The sas-plus feature adds an adapter for sas_plus::Task.
Usage
Implement WidthProblem and run a search. Here, walking from 0 to 5 on a line has width 1:
use ;
/// Walk along the integers 0..=5, one step at a time.
;
let plan = iw.plan.expect;
assert_eq!;
A grid with a key and a door needs width 2, because the agent revisits cells after picking up the key:
Features
sas-plus:sas::SasProblem, an adapter that runs width-based search on asas_plus::Task.
Tested: end to end on a Fast Downward output.sas (gripper: IW needs width 3 for the conjunctive goal, finding the optimal 5-step plan). Also: IW with k = #variables is complete and optimal on unit-cost random tasks; IW and BFWS plans are validated.
Roadmap: SIW, BFWS with #r, Rollout IW, node-count comparison against LAPKT.
References: Lipovetzky & Geffner, ECAI 2012 and AAAI 2017.
MSRV
Rust 1.86. Raising it is a minor release.
Contributing
See CONTRIBUTING.md.
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
The examples in examples/ are public domain (CC0-1.0), so you can copy them into anything.
Test fixtures carry their own licenses; see REUSE.toml.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this work by you shall be dual licensed as above, without any additional terms or conditions.