Files
Rigby/src
rektdieandclaude d38f0b133a mcts: reroot moves only the root index (no compaction between moves)
Step 3 rerooted by compacting what the new root reaches (plan 3.6.6,
mark/compact with T = 0). In a graph, a reversible endgame keeps almost the
whole graph reachable from the new root, so every move paid O(graph) before
its first playout. Replaying a 2+0.02 game that step 3 lost on time (Hash 16,
rook endgame, half-move clock about 70): the reroot averaged 3.3 ms per move,
max 14.5 ms, against 0.3 ms for main. Under load that is more than the
increment, and step 3 ran out of time in 2 of 100 games.

Now reroot only sets the root. Nodes the new root no longer reaches keep
their memory and their table entries (search may link to them again) until
the next collection, which keeps only what the root reaches. In the same
replay, the time before the first playout is 0 ms on average.

VERIFY: verify_tree requires every node to be reachable only right after a
collection; the table must always hold every node of the arena. Check (b)
now checks that a reroot changes nothing and that the next collection keeps
exactly the nodes the new root reaches, unchanged.

Checked: zero warnings, bench unchanged (bench never reuses a graph),
`verify` (a)-(d), the VERIFY searches of plan section 6 including 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: 764208

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 21:19:17 +01:00
..
2026-11-15 00:31:20 +01:00
2026-11-15 21:27:38 +01:00
2026-11-15 21:27:38 +01:00
2026-11-15 00:31:20 +01:00
2026-11-15 21:26:45 +01:00
2026-11-15 21:26:45 +01:00
2026-11-15 21:26:45 +01:00
2026-11-15 21:27:38 +01:00
2026-11-15 21:26:45 +01:00
2026-11-15 21:26:45 +01:00
2026-11-15 21:26:45 +01:00
2026-11-15 21:27:38 +01:00
2026-11-15 00:31:20 +01:00
2026-11-15 00:31:20 +01:00