pub fn ihiw<P: WidthProblem>(
problem: &P,
w_high: usize,
w_low: usize,
seed: u64,
) -> SearchResult<P::Action>Expand description
Incremental HIW, IHIW(w_high, w_low) (Junyent, Jonsson & Gómez,
ICAPS 2021, Algorithms 1 and 2): hiw that picks its own
high-level features from the problem’s features.
It runs a series of HIW searches. The first has no high-level features,
so it is IW(w_low). After a failed search, its pruned states join a
pool. IHIW draws pruned states from the pool at random until one yields
candidate features, then promotes one random candidate to a high-level
feature and searches again. A high-level feature f here means “feature
f is true”, so the high-level features of a state are its features that
were promoted so far.
The candidates of a pruned state n with parent p (Algorithm 1) are the
features true in both n and p that are true in no state on the path
above p, the root included: a feature that changed once, just before
the branch was pruned, likely splits the state space (like picking up a
key). p must not be the root, and n must differ from p in some
feature; otherwise n has no candidates.
The search returns the first plan found and gives up (plan: None) when
the pool runs out of states with new candidates. It promotes at most one
feature per round, so it runs at most num_features() + 1 searches. The
paper restructures the previous search tree to reuse it; this version
starts every search afresh, which costs nodes but finds the same plans.
Node counts add up over all searches, and every search’s tree is kept
until the end, since pruned states from any round may be drawn. seed
fixes the random draws.
§Panics
Panics if w_high or w_low is 0.