[v0.2.0] - 2026-06-03
Anytime cascade pattern now covers all four classical search families.
Under mode="auto" (the default), a family-appropriate meta-algorithm wins
selection and runs a cascade tuned to the problem shape — always returning
the best incumbent within budget instead of not_found.
Features
- AnytimeCSP — cascade
[MinConflicts (only if @evaluate), Backtracking]
wins selection undermode="auto"on CSP-shaped spaces. First phase to
return a consistent complete assignment wins. - AnytimeLocal — cascade
[HillClimbing, SimulatedAnnealing, TabuSearch]
wins selection undermode="auto"on pure-optimization spaces
(@successors + @evaluate, no@goal). Lowest-cost incumbent wins across
phases. - AnytimeAdversarial — iterative deepening from depth 1 to
max_depth
overAlphaBeta(2-player) orNegamax(3+ player), threading the
previous depth's principal variation aspv_hintinto the next phase
for move ordering. Wins selection undermode="auto"on adversarial
spaces. - Adversarial cancel-token cooperation —
AlphaBeta,Minimax,
Negamaxcheck the token at the top of their recursion ((nan, None)
sentinel that collapses tonot_foundat the root);MCTSchecks it
at the top of its iteration loop and returns best-so-far from the
partial tree. - PV-first move ordering for
AlphaBetaandNegamax—
AnytimeAdversarialfeeds the previous iteration's principal variation
in as a hint; α-β pruning becomes substantially more effective. - Path population for
Minimax,AlphaBeta,Negamax— they now
returnSearchResult.pathas[(action, state), ...]like the other
search families (contract change documented in the design spec). - Mode-contract overrides for MCTS and Negamax —
MCTS.score_forbumps
to 53 undermode="approximate"(closing the prior gap where approximate
did nothing for game spaces);Negamax.score_forbumps to 52 when
space._players > 2(closing a bug whereAlphaBetasilently won
"exact"selection on multi-player games despite not honouring
_players).
Fixes
- CI:
publish.ymlrenamed topublish.yamlto match the PyPI trusted
publisher configuration. - CI:
tomllib.load(file)instead oftomllib.loads(bytes)for the
version-consistency check.
Docs
- Modes & Anytime delivery guide now documents the four-family cascade
table. - Cancel-token protocol guide moves the adversarial family from "watchdog
backstop" to "cooperates"; onlyIDAstarand CSP recursion now rely
on the watchdog. - API reference exposes the four meta-algorithms (
AnytimeAStar,
AnytimeLocal,AnytimeCSP,AnytimeAdversarial). - README and
docs/index.mdalgorithm-family tables call out the default
meta-algorithm per family.