v0.9.1 — set-play corrected
A semantics fix to a theme released in 0.9.0, and a native install path for the CLI binary.
set-play was nearly vacuous — and reported the opposite of set play
0.9.0 defined it as "the same position with the other side to move is solvable". That matched 423 of 580 KQvk --dtm 2 positions (72.9%). A filter that keeps three positions in four is not a filter.
It also conflated two opposite things. Parity forces the sibling position to be at D−1 or D+1, where D is this position's distance:
D−1 — the mate is already there; the side to move merely delays it. This is set play:
8/8/8/8/8/8/8/k1KQ4 b → dtm=2 (h#1) Ka2 Qa4#
8/8/8/8/8/8/8/k1KQ4 w → dtm=1 (h#0.5) Qa4#
D+1 — flipping the side to move makes the mate longer. This was reported too:
8/8/8/8/8/8/k7/2K1Q3 b → dtm=2 (h#1) Ka1 Qa5#
8/8/8/8/8/8/k7/2K1Q3 w → dtm=3 (h#1.5) Kc2 Ka3 Qa5# (28 solutions)
set-play now requires the sibling solvable at exactly D−1: 423 → 183 hits, 72.9% → 31.6%.
This changes behaviour for anyone using 0.9.0's set-play — you will get fewer positions, specifically the 240 per that query where flipping the side to move lengthened the mate. The looser "any shorter distance" reading is the glossary's separate Short set play, not implemented.
ThemeInput gained the position's own ValuePair, since the detector previously could not see D at all.
The guard that nearly wasn't
Both sentinel guards are load-bearing, and one only proved so under mutation testing: dropping value.dtm <= DTM_MAX survived the first run, because at DTM_UNSET (253) with a sibling at DTM_MAX (252), 252 + 1 == 253 holds by coincidence — an unsolvable position would have reported set-play. A boundary test for that exact pair now kills it, and review confirmed it is the only such coincidence in the sentinel range.
make install-bin
Install the CLI binary alone, no Python — for a system package, a container layer, or a machine with no Python:
sudo make install-bin # /usr/local/bin/helpmate (GNU default)
make install-bin PREFIX=$HOME/.local # rootless
make install-bin DESTDIR=/tmp/stage # package staging
make uninstall-binA thin wrapper over cmake --install, which already worked but was undocumented. No bespoke install script, which would be a second source of truth against the build.
Verification
Catch2 3,867,064 assertions / 213 cases; ctest 275/275; lint, typecheck, format-check clean; api 85, bindings 17, web 38+16, repo 14, jstest 38.
The KPvk integration test was re-measured rather than relaxed (57 → 23 hits), and its per-hit check strengthened from "the flipped position is solvable" to "probes to exactly D−1" — the weaker assertion is what let the original bug through.
Upgrade note: no table format change. Existing tables read exactly as before.
What's Changed
Full Changelog: v0.9.0...v0.9.1