diff --git a/docs/mcgs-plan.md b/docs/mcgs-plan.md index 87a11d6..9592415 100644 --- a/docs/mcgs-plan.md +++ b/docs/mcgs-plan.md @@ -73,9 +73,10 @@ Read in full: `src/mcts.h`, `src/mcts.cpp`, `src/uci.cpp`, `src/eval.cpp`, needed (section 6). - Baseline on this machine: `663779 nodes 3253818 nps` (bench nps is tree positions per second, not playouts). -- The Chess960 perft EPD with node counts is **not in the repo**, and I could not - find it on this machine (`heimdall/tests/chess960.txt` has FENs only). See - section 7. +- The Chess960 perft EPD with node counts was **not in the repo**. The Chess960 + session left `fischer.epd` in its scratchpad: 960 positions, D1–D6. It is now + copied, untracked, to `tests/fischer.epd`, and step 2 commits it. + `perftfile tests/fischer.epd 5` passes on c8d1ca6 (17.6·10⁹ nodes, 52 s). - `cutechess-ob.exe` exists at `C:\Users\rektd\repos\OpenBench\Client\` and can run local smoke matches. @@ -675,9 +676,14 @@ Changes to the brief's suggested order, and why: is in the same range as the ValueHash comment's 37–85 %. - **Verification:** build both variants, `bench` on both, `perftsuite`, and one VERIFY build search to make sure nothing broke. -- **SPRT:** none. The code is compiled out of the shipped build, and the bench is - unchanged (same rule as the display-only changes). The owner decides whether - to merge it. +- **SPRT:** none. The code is compiled out of the shipped build and the bench is + unchanged. +- **Merge:** never. The branch stays on its own (owner's decision, 2026-11-16). + Later steps branch from `main`, not from `mcgs-stats`. To measure a later + branch with the stats build (e.g. when an SPRT disappoints), merge + `mcgs-stats` into a throwaway local branch, measure, and delete it. The stats + code never enters a step branch. Conflicts are expected once step 2 reshapes + `mcts.cpp`, so port the counters by hand on the throwaway branch. ### Step 2: Edge/Node split with tree behaviour preserved @@ -704,6 +710,12 @@ Changes to the brief's suggested order, and why: command with checks (a) and (b). 9. Hash is split between the arenas by the step-1 ratio. Document the split in a comment. + 10. In its own commit, add the Chess960 perft suite as `tests/fischer.epd` + (960 positions, `;D1`..`;D6`, sha256 + `4bc384f273d8ce9312bfde78484dce503c8d1b51b43aacc6352646b3c270b3cd`). An + untracked copy is at `tests/fischer.epd` in the main checkout + (`C:\Users\rektd\repos\Rigby`). Check the hash before committing it. It + enters `main` with this step. - **Acceptance:** - `bench` identical to main. - The reuse sequence from section 6 gives identical `bestmove` and `info` @@ -715,11 +727,12 @@ Changes to the brief's suggested order, and why: - **Report:** NPS (bench nps, and playouts/s at 5 s on the bench positions) versus main, labelled as a local measurement. - **SPRT:** **Non-Regression `[-5.00, 0.00]`, STC 8.0+0.08, Threads=1, - Hash=64**, the usual book. It is a hot-path refactor (two arenas, lazy + Hash=64**, book `UHO_Lichess_4852_v1.epd`, adjudication as in the earlier + Rigby tests. It is a hot-path refactor (two arenas, lazy creation, an extra indirection), and GC timing changes with the bytes per node, so play can differ even though bench does not. Non-regression is the right question for a refactor. If NPS drops by more than 3 %, also run LTC 40.0+0.40 - Hash=128 Non-Regression, because GC matters more at LTC. + Hash=256 Non-Regression, because GC matters more at LTC. ### Step 3: MCGS core (one self-consistent commit series) @@ -757,9 +770,14 @@ Changes to the brief's suggested order, and why: rate (share of node lookups that hit). - **SPRT:** - **STC 8.0+0.08, `[0.00, 5.00]`, Threads=1, Hash=64**, and **LTC 40.0+0.40, - `[0.00, 5.00]`, Threads=1, Hash=128**. Run both, because the expected gain - grows with search size (Czech et al.). LTC gets more Hash because 5× the - nodes at 64 MB would GC constantly; both sides get the same Hash. + `[0.00, 5.00]`, Threads=1, Hash=256**, both with `UHO_Lichess_4852_v1.epd`. + Run both, because the expected gain grows with search size (Czech et al.). + LTC gets more Hash because 5× the nodes at 64 MB would GC constantly. 256 MB + is roughly the node growth (5×, rounded to a power of two). Eleanor's + OpenBench presets scale Hash by 8× from STC to LTC, which would be 512 MB; + either is defensible, but keep the same value across all MCGS LTC tests. + Both sides always get the same Hash. Rigby has had no LTC test before (the + server's index shows only 8.0+0.08), so the LTC preset has to be created. - Suggested merge rule (the owner decides): merge if LTC passes and STC passes, or STC is inconclusive but a follow-up STC Non-Regression `[-5.00, 0.00]` passes. @@ -782,7 +800,7 @@ Changes to the brief's suggested order, and why: reuse; state this. A scripted game sequence shows the reconciled root edges (log the count in `info string`). - **SPRT:** STC `[0.00, 5.00]` Hash=64. If the arena re-split changes memory use - noticeably, also LTC `[0.00, 5.00]` Hash=128. + noticeably, also LTC `[0.00, 5.00]` Hash=256. ### Step 5: variants (each separate) @@ -831,8 +849,8 @@ silently cuts the searches short. Use a small driver that waits for `bestmove` (Python stdlib is enough; keep it outside the repo or under `tools/`). - **Build:** zero new warnings (`-Wall -Wextra`). -- **Perft:** `perftsuite` all pass. `perftfile 5` all pass (the - file is needed, see section 7). +- **Perft:** `perftsuite` all pass. `perftfile tests/fischer.epd 5` all pass + (960 positions, about 52 s on this machine; main at c8d1ca6 passes). - **Bench:** `bench`. Identical for steps 1, 2 and 4 (stated per step). Changed and explained for 3 and 5. - **VERIFY searches**, with a VERIFY build over UCI, `go nodes 200000` unless @@ -860,14 +878,20 @@ silently cuts the searches short. Use a small driver that waits for the VERIFY build vs itself at `nodes=20000`. Look for illegal moves, disconnects, timeouts and aborts. Results are not strength evidence. -## 7. Open questions for the owner +## 7. Questions for the owner + +Answered on 2026-11-16: + +1. **Chess960 perft EPD:** the owner did not know where it was. It was found in + the Chess960 session's scratchpad and verified (section 1). Step 2 commits it. +2. **Book and LTC:** use the settings of previous tests. Tests 5307–5309 use + `UHO_Lichess_4852_v1.epd`, Threads=1, Hash=64, 8.0+0.08, win adjudication + `movecount=3 score=400`, draw adjudication + `movenumber=40 movecount=8 score=10`. There was no earlier Rigby LTC, so the + plan uses 40.0+0.40 with Hash=256 (section 5, step 3). +3. **Step 1 merge:** the stats code stays on its branch and is never merged. + +Still open: -1. **The Chess960 perft EPD** (FENs with `;D1 ... ;D5` counts) is not in the repo - or on disk. Where is it? Should step 1 add it under `tests/`? -2. **LTC settings:** is 40.0+0.40 with Hash=128 acceptable for the LTC tests, - and which book do Rigby's tests use? The plan says "the usual book" and does - not guess. -3. **Step 1 merge:** merge the stats-only code to main, or keep it on its branch - for measurement only? 4. **Ordering change:** compaction moves into step 2 and step 4 becomes small - (section 5). Is that OK? + (section 5). The plan assumes this until the owner says otherwise.