Until now only checkmate and stalemate were known for sure; a forced mate
was only felt through visits, and `score mate` was never printed.
A node is now proven won for its side to move when one of its children is
lost (shortest such mate), and proven lost when every move leads to a child
won for the other side (longest). The proof and its length in half-moves
live in the node's state byte, so the node stays 32 bytes. A proof is a
fact of the position, like checkmate: repetitions and the 50-move rule stay
on the edges of a path.
- Backprop: when a playout ends at a decided node (checkmate, a proof),
its parent is checked, and so on up while each step proves a node. The
root is not proven.
- A proven node keeps q = u = -1 / +1 and is treated as terminal by
playouts (the root still chooses its move). Collection never cuts a
proven node back, as its proof rests on its children.
- Selection plays the shortest proven win at once. The root's best move is
the shortest proven win, never a proven loss unless all are (then the
longest). At the root a proof counts only if the move does not draw by
repetition or the 50-move rule and the mate fits in the half-moves the
50-move rule leaves.
- UCI prints `score mate N` / `score mate -N` from the best root move.
Verified: zero warnings in both builds; the VERIFY build checks every
proof against its children (a win has a lost child at most one half-move
shorter, a loss only won children) and q = u = +-1; new `verify` check (e)
proves mate in 1, mate in 2 and two lost positions within 20000 playouts;
VERIFY searches with forced GC at Hash 1 and 2, reuse at Hash 64, Hash 1
and 960, smoke positions; reuse sequences along mating lines (KQ v K,
KR v K, two rooks, at Hash 64 and Hash 1) play to mate without a failure.
Mate on the 100th half-move is reported, and KQ v K with 4 half-moves left
reports no mate.
Bench: 613348
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rigby searches a graph since PR #23, so the search files, the banner, the
Makefile header and the README now say MCGS. The README describes the
graph search, reuse, collection and Hash memory as they are now.
Internal names (Tree, RIGBY_VERIFY_TREE) are unchanged.
No behaviour change: zero warnings, bench identical to main twice.
Bench: 608763
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>