MCGS: stop a playout at a child that is ahead of its edge #24

Merged
claude merged 1 commits from mcgs-v-stop into main 2026-11-16 23:19:46 +01:00
Collaborator

Variant 5a of docs/mcgs-plan.md. If a child node already has more visits than the edge that leads to it, the playout stops there. It backs up the child's current Q instead of descending further. In a graph, a transposed child has usually been searched more through another parent, so its Q is already a better estimate than one more deep playout. The depth limit now ends a playout the same way.

SPRT

Test: https://bench.rektdie.com/test/5316/ (59d5af5 vs mcgs-step3-reroot 95e4909). The code of that base is identical to the current main; only docs differ.

Elo   | 12.35 +- 6.40 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=64MB
LLR   | 3.31 (-2.94, 2.94) [0.00, 5.00]
Games | N: 4898 W: 1609 L: 1435 D: 1854
Penta | [91, 544, 1073, 582, 159]

Correctness

These were run before the test, and all passed:

  • Zero warnings in both the normal and the VERIFY build.
  • verify (a)–(d).
  • VERIFY searches with forced GC at Hash 1 and Hash 2.
  • Reuse sequences at Hash 64, at Hash 1 and from a 960 start position.
  • The smoke positions.
  • Bench is deterministic.

Bench

609350

🤖 Generated with Claude Code

Variant 5a of `docs/mcgs-plan.md`. If a child node already has more visits than the edge that leads to it, the playout stops there. It backs up the child's current Q instead of descending further. In a graph, a transposed child has usually been searched more through another parent, so its Q is already a better estimate than one more deep playout. The depth limit now ends a playout the same way. ## SPRT Test: https://bench.rektdie.com/test/5316/ (`59d5af5` vs `mcgs-step3-reroot` `95e4909`). The code of that base is identical to the current main; only docs differ. ``` Elo | 12.35 +- 6.40 (95%) SPRT | 8.0+0.08s Threads=1 Hash=64MB LLR | 3.31 (-2.94, 2.94) [0.00, 5.00] Games | N: 4898 W: 1609 L: 1435 D: 1854 Penta | [91, 544, 1073, 582, 159] ``` ## Correctness These were run before the test, and all passed: - Zero warnings in both the normal and the VERIFY build. - `verify` (a)–(d). - VERIFY searches with forced GC at Hash 1 and Hash 2. - Reuse sequences at Hash 64, at Hash 1 and from a 960 start position. - The smoke positions. - Bench is deterministic. ## Bench 609350 🤖 Generated with [Claude Code](https://claude.com/claude-code)
claude added 1 commit 2026-11-16 23:19:37 +01:00
With always-descend, a playout runs through existing nodes until it reaches
a new position or a draw of its path. In reversible endgames it wanders
through cycles: mean playout depth 28 against main's 6 in KR v K (bench
15), at 0.15x main's playouts/s, with 30 % of playouts ending in a
repetition.

KataGo's stop rule: when the child an edge leads to already has more
visits than the edge (other move orders reached it), the playout ends
there. The edge counts the visit and its parent recomputes from the
child's current Q; the child is left as it is. In a tree the two counts are
equal, so this only fires on transpositions. The depth limit now ends a
playout the same way.

The bench changes because playouts stop at transpositions.

Checked: zero warnings; VERIFY build: `verify` (a)-(d), the VERIFY searches of plan section 6 with forced GC at Hash 1 and 2, the reuse sequence at Hash 64, Hash 1 and from the 960 start, and the go nodes 1/2, go depth 1 smoke positions.

Bench: 609350

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude merged commit 150a876b2a into main 2026-11-16 23:19:46 +01:00
claude deleted branch mcgs-v-stop 2026-11-16 23:19:46 +01:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rektdie/Rigby#24