From 18bd5296094c5bfdf81bca36b58e3ef219d2bc4b Mon Sep 17 00:00:00 2001 From: rektdie Date: Mon, 16 Nov 2026 18:57:12 +0100 Subject: [PATCH 01/19] docs: MCGS research summary and implementation plan Research on graph search (KataGo, Czech et al., Lc0 dag_classic, Ceres, Monty, GHI literature) and the design for turning Rigby's MCTS into Monte-Carlo Graph Search: 16-byte edges with per-edge draw counts, 32-byte nodes keyed by the full Zobrist key plus a 16-bit check, idempotent backprop, path-dependent draws decided during descent, and mark-and-slide compaction for two arenas. Ordered steps with gates and SPRT recommendations. Empty mcgs-log.md for per-branch results. No code change. Co-Authored-By: Claude Opus 5.5 --- docs/mcgs-log.md | 7 + docs/mcgs-plan.md | 873 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 880 insertions(+) create mode 100644 docs/mcgs-log.md create mode 100644 docs/mcgs-plan.md diff --git a/docs/mcgs-log.md b/docs/mcgs-log.md new file mode 100644 index 0000000..9cc7f03 --- /dev/null +++ b/docs/mcgs-log.md @@ -0,0 +1,7 @@ +# MCGS log + +One section per branch: commit, bench, SPRT link, outcome. Outcomes are filled in +only from results the owner provides. + +| step | branch | commit | bench | SPRT (link, TC, bounds) | outcome | +| --- | --- | --- | --- | --- | --- | diff --git a/docs/mcgs-plan.md b/docs/mcgs-plan.md new file mode 100644 index 0000000..87a11d6 --- /dev/null +++ b/docs/mcgs-plan.md @@ -0,0 +1,873 @@ +# Monte-Carlo Graph Search for Rigby: research and plan + +Written 2026-11-16 against `main` at `c8d1ca6` (bench `663779`). +Implementation sessions read this file and `docs/mcgs-log.md` first. They do one +step from section 5, nothing else. If this plan turns out wrong for a step, that +session stops and explains instead of improvising. + +Contents: + +1. Facts about the current code (verified) +2. Research findings, with sources +3. Design +4. Measurement design (step 1) +5. Implementation plan +6. Test reference +7. Open questions for the owner + +--- + +## 1. Facts about the current code (verified on c8d1ca6) + +Read in full: `src/mcts.h`, `src/mcts.cpp`, `src/uci.cpp`, `src/eval.cpp`, +`src/position.h`, `src/types.h`, plus the key and halfmove parts of `src/position.cpp`. + +- **Value net.** The brief says `(768->128)x2->1`. That is out of date. The + Makefile embeds `networks/rigby-value-v2.bin`, which is `(768->1024)x2` SCReLU + (PR #22). The README still describes v1. Value = `cp_to_q(quiescence(...))`, + with Q = tanh(cp/800). +- **`Node` is 20 bytes:** `u32 first_child, u32 visits, float q, u16 move, + u16 policy, u8 num_children, u8 state`. It is node and edge at once. Children + sit contiguously in `Tree::nodes_`. Index 0 is null and index 1 is always the root + (`Tree::root()` is `static constexpr`). +- **`q`** is a running mean from the view of the side that moved into the node, + updated incrementally: `q += (value - q) / visits`. Selection reads `child.q` + directly. The side to move at a node sees `-node.q`. +- **Leaf handling.** The first visit of a node only evaluates it + (`evaluate_leaf`); the second visit expands it (`expand`: movegen, butterfly + bias, policy net). The root is expanded before the first playout and never + evaluated, so the root's visits equal the sum of its children's visits. Every + other expanded node has at least one visit more. +- **`evaluate_leaf`** checks, in this order: no legal moves (mate → `TERMINAL_LOSS`, + stalemate → `TERMINAL_DRAW`); then, only at depth > 0, `halfmove >= 100`, + insufficient material and `is_repetition`, all stored as `TERMINAL_DRAW`; then + a `ValueHash` probe; then `eval::value`. Path-dependent draws therefore live + in the node today. That is fine in a tree and wrong in a graph. +- **`is_repetition`** is two-fold: any earlier occurrence of the key, same side + to move, `back = 4, 6, ... <= halfmove`, over `history_`. `history_` holds the + game history up to and including the root, plus the playout path. Two-fold + therefore also counts a single earlier occurrence in the game before the root. +- **`ValueHash`** takes 1/32 of Hash: 12-byte entries, a 32-bit check, replaced by + visits. Backprop stores `-node.q` for every path node except `TERMINAL_DRAW` + nodes. `evaluate_leaf` probes it before calling the net. It persists across + searches and is cleared on `ucinewgame`. +- **`ButterflyHistory`** is updated for every path move with the playout result + in cp and biases policy logits at expansion time. +- **`Tree::compact`** (used by `reroot` and `collect_garbage`) packs kept child + blocks in place. It relies on two things: a child block is allocated after its + parent's block, and every node has exactly one parent. `prune_threshold` relies + on visits only shrinking going down the tree. All three break on a DAG. +- **Root decisions** use child visits: `best_child` (most visits, then Q, then + prior), `best_move_settled` (smart pruning with `root_start_visits_`), + `principal_variation`, `print_info` and `draw_dashboard`. +- **Zobrist key** covers pieces, castling rights, side to move and the ep file + only when an ep capture is pseudo-legal. It excludes the halfmove clock, which + is good for merging. +- **`RIGBY_VERIFY_TREE`** checks, after reroot and after each GC: legality of + every child move, `num_children == legal moves`, and visits >= the children's + visits sum (+1 for non-root nodes). +- **`bench`** runs 16 positions × 5000 playouts, one `Searcher`, Hash 64. + Signature = Σ(playouts + depth sum). Each position has history `{key}`, so tree + reuse never happens. 5000 expansions are far below 64 MB, so GC never happens + either. **Bench therefore does not cover GC or reuse.** Separate checks are + 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. +- `cutechess-ob.exe` exists at `C:\Users\rektd\repos\OpenBench\Client\` and can + run local smoke matches. + +## 2. Research findings + +"Verified" means I read the source or text myself in this session. Anything else +is marked. + +### 2.1 KataGo, "Monte-Carlo Graph Search from First Principles" (verified) + +https://github.com/lightvector/KataGo/blob/master/docs/GraphSearch.md + +- Naive node sharing is unsound. Child visit counts get inflated by other + parents, and parent Q goes stale or drifts. Updating every parent of a node is + also wrong. +- Derivation: PUCT approximately solves a KL-regularised policy optimisation + (Grill et al.). The node value is then the regularised utility of the posterior + policy: `Q(n) = (U(n) + Σ_a N(n,a)·Q(n,a)) / N(n)`, with + `N(n) = 1 + Σ_a N(n,a)` and `Q(n,a) = Q(child)`. +- **Edge visits** N(n,a), meaning how often PUCT at n chose a, are separate from + the child's N. PUCT uses edge visits: + `Q(n,a) + c·P(n,a)·sqrt(Σ_b N(n,b)) / (1 + N(n,a))`. +- Recompute Q idempotently on the playout path. Stale Q off the path is accepted: + exploration visits everything eventually, and a recompute makes a node correct + once its children are. +- **Stop rule:** optionally recurse only if `child.N <= edge visits`. Otherwise + increment the edge and recompute upward without a new child visit. KataGo stops + by default and has options to always continue or stop "leakily". Convergence + needs child visits → ∞ as edge visits → ∞. +- An incremental update is equivalent on trees. On graphs it "can be a little + tricky" but can be done. KataGo prefers idempotent updates. Tracking N·Q instead + of Q can give torn reads under lock-free multithreading. +- Game-over nodes: N = 1, U = Q = outcome. +- Hashes: 128–192-bit Zobrist is "usually collision-free". Cycle detection guards + against collision-induced recursion. +- Cycles are mostly ignored in the main text. KataGo (Go) uses a history hash + that blocks sharing only when a cycle is possible. The 2024-03-10 addendum + links a Google Doc (next item). + +### 2.2 lightvector, "Thoughts on Handling N-fold Repetition in MCGS for Chess" (verified) + +The Google Doc at +https://docs.google.com/document/d/1JbxsoMtr7_qAAkfYynAgpvuarMMJycaL5toXdnqVJoo +does not render for a fetcher, but its plain-text export +(`.../export?format=txt`) was readable. Dated 2024-02-28. The author notes he has +no chess implementation experience. Content: + +- Baseline: put the full history in the hash. That is safe and degenerates to + MCTS. Do not XOR position Zobrists together for the history, because XOR + commutes and self-cancels; use a non-linear mixer such as splitmix64. +- Truncate history at provably irreversible moves (captures, pawn moves, + castling-right changes). States that differ only before such a move merge. +- Then prune history heuristically with `prune_history_for_hashing(history)`, + as KataGo does for Go. Possible rules: drop positions that are too many plies + old, or that differ from the current board on many squares, or a learned head + predicting whether a history position can recur. +- If a cycle still occurs, "terminate a playout if that playout's path ever + intersects itself", while still incrementing edge visits and recomputing N and + Q on the way back. + +### 2.3 Czech, Korus, Kersting, "Monte-Carlo Graph Search for AlphaZero" (2020, verified) + +https://arxiv.org/abs/2012.11045, CrazyAra (crazyhouse and chess). + +- Stores visits and Q on **both edges and nodes**. When the next node is a + transposition, it computes `δQ = Q(s,a) − V*(s')`. If `|δQ| > ε_Q` (0.01), it + stops the playout without a net evaluation and backs up the correction + `Q_φ = N(s,a)·δQ + V*(s')`, clipped to `[Vmin, Vmax]`. Otherwise it keeps + descending. ε_Q is "the only hyper parameter". +- "We incorporate the step counter within the transposition hash key. This way + we cannot reach a state with the same key more than once within a trajectory. + Therefore, cycles cannot occur." Which counter is meant is **not stated** + (probably the ply or move count). Merges then happen only between paths of + equal length. +- Assumes Markovian states. Using history in the net input "did not result in a + major issue". +- 30–70 % memory reduction. The gain grows with search size. Chess gains are + smaller than crazyhouse gains. + +### 2.4 Grill et al., "Monte-Carlo Tree Search as Regularized Policy Optimization" (ICML 2020) + +https://arxiv.org/abs/2007.12509. I verified only the abstract: AlphaZero's +search heuristics approximate the solution of a specific regularised policy +optimisation. The form `π̄ = argmax_y [qᵀy − λ_N·KL(π_θ, y)]` with +`λ_N = c·sqrt(Σ_b n_b) / (|A| + Σ_b n_b)` is **from memory and not verified**. +What matters here is the consequence (verified through the KataGo doc): the +regularised target is defined by how often PUCT chose each action at this node, +which is the edge visits, not the child's total visits. + +### 2.5 Lc0 + +- **PR #963 is not DAG search.** It is Naphthalin's "Beta-MCTS: a soft hybrid of + MCTS and Minimax", opened 2019-10-06, labelled "not for merge" and never merged + (verified on the PR page). The TalkChess thread cites it, which is probably + where the confusion comes from. +- Lc0's DAG search is `src/search/dag_classic`, merged as "dag-preview" in + **PR #2155** (borg323, 2025-04, "mostly the work of @Etcaqab"). Follow-ups: + #2274 garbage-collection thread (merged 2025-10), #2388 n_in_flight underflow + fix (merged 2026-05), #2291 fixed-size TT (open), #2295 TT memory calculation + (merged). Source read at master `476a0f7` (2026-10-20). + - **Layout** (verified, `node.h`). `LowNode` is the shared position: an + `edges_` array (move + policy), N, WL, D, M, number of parents. `Node` is a + realised edge with its own N, WL, D, M, `n_in_flight_`, a `sibling_` pointer, + a `shared_ptr` to the target `LowNode`, and bit flags including "edge was + handled as a repetition at some point". Both are ≤ 64 bytes. **Lc0 keeps Q + on the edge** (`Node`) as well as on the node (`LowNode`), like Czech. + - **Key** (verified, `PositionHistory::HashLast` and `Position::Hash`): + `HashCat` of the last `CacheHistoryLength+1` positions (default 0, so just + the last position). Each position's hash includes its repetition count, and + the rule-50 ply is mixed in. **Lc0 merges only positions with equal rule-50 + ply and equal repetition count**, which is conservative. The TT maps the + 64-bit hash to a `weak_ptr` and erases expired entries. The exact + container type was not checked. There is no full-position comparison. + - **Repetition** (verified, `search.cc`). Three-fold (`repetitions >= 2`) is a + pseudo-terminal: the `Node`, i.e. the edge, gets `SetRepetition()` and value + 0. A two-fold inside the search tree (`TwoFoldDraws`, default on, depth >= 4 + and depth >= plies since the previous occurrence) also marks the edge as a + repetition and propagates a draw above it. Fifty-move and insufficient + material are made terminal on the `Node` at extension, except at the root. + - **Transposition catch-up** (verified). `MaybeAdjustForTerminalOrTransposition` + replaces the edge's value by the LowNode's when the edge has fewer visits or + the LowNode is a transposition, and propagates the delta upward + (`n_to_fix`, `v_delta`). `ShouldStopPickingHere` stops a playout at a + transposition whose Node and LowNode differ by ≥ 0.01 WL (and other limits). + This is Czech's ε rule. + - Multithreaded, with `n_in_flight` on both Node and LowNode and reference + counting plus a background GC thread. + +### 2.6 Monty (verified, `official-monty/Monty` master `0950aff`, 2026-05-12) + +- **A tree, not a graph.** Transpositions are handled only by a hash table of Q + (`tree/hash.rs`: 32-bit check, q, d, visits). It is probed in place of the + network at a node's first visit and written on the way back for every path + node. Rigby's `ValueHash` copies this. +- Repetition and 50-move are checked by `game_state` with a stack of keys + cleared at every zeroing move, set on the node at first visit + (`node.set_state`). That is fine in a tree. Note: `halfm == 100` with mate + counts as mate. Monty's hash also receives the value of path-dependent draw + nodes. I did not check whether that matters. + +### 2.7 Ceres (verified, `dje-dev/Ceres` main, `src/Ceres.MCGS`, last change 2026-09-12) + +- Has a full MCGS implementation (`GNode`, `GEdge`, parent lists, `n_in_flight` + per edge). +- `PathMode`, default **`PositionEquivalence`**: nodes are coalesced by board + position. Alternative: `PositionAndHistoryEquivalence`, which keys on the + position plus a 96-bit **multiset** running hash of the positions since the last + irreversible move (`PositionWithHistoryHashes`: the running hash resets after + an irreversible move). +- **Repetition draws live on the edge as a count**, not a flag: `GEdgeStruct` + has `N` and `NDrawByRepetition` (both `int`), and + `Q = QChild·(N − NDrawByRepetition) / N`, so a draw visit counts as 0. +- `ReconcileDrawByRepetitions`: after graph reuse, an edge whose child board is in + the game history (graph-root to search-root spine plus prehistory) is + reclassified as a full draw (`NDrawByRepetition = N`). That is exact, because + that history is common to every path. Purely in-tree repetitions stay + path-dependent and are left to live detection. + +### 2.8 Graph History Interaction literature + +- Kishimoto & Müller, "A General Solution to the Graph History Interaction + Problem", AAAI-04 (verified, PDF text). GHI was first noted by Palay (1983). + Campbell (1985) split it into **draw-first** (a score involving repetition is + stored and wrongly reused for a position without repetition) and **draw-last** + (the reverse). Breuker et al.'s Base-Twin Algorithm (BTA) uses possible-draw + marks with base and twin nodes, needs an explicit graph, and must remove marks + every iteration "since marks are path-dependent information". The AAAI paper + stores path information for proven results and uses Kawano's simulation, + targeting proofs (df-pn, αβ) in checkers and Go. +- Campbell 1985 and Breuker, van den Herik, Uiterwijk, Allis 2001 ("A solution to + the GHI problem for best-first search", TCS 252) were **not read directly**, + only through the AAAI-04 summary. +- What carries over to MCGS: MCGS proves nothing, so exact GHI handling is not + needed. What is needed is to avoid the draw-first case systematically (never + store a path-dependent draw in a shared node) and to keep the draw-last error + bounded. + +### 2.9 TalkChess, "Move repetitions in tree search + transpositions" (t=72136) + +Page 1 of 2 was read. Page 2 could not be fetched (connection refused) and is +**unread**. + +- koedem: shared nodes make repetition status path-dependent. He cites lc0 PR + #963. +- noobpwnftw: only the path with the globally shortest occurrence of a node may + expand it. Other occurrences are treated as terminal and rescored locally if + the path repeats. +- koedem's objections: the shortest path may go through a blunder, the main line + can be starved, and his example FEN is + `3r2k1/5ppp/8/8/8/8/5PPP/2R3K1 w`. +- No resolution on page 1. + +### 2.10 Not verified + +- The exact Grill formula (2.4). +- Which "step counter" Czech et al. hash (2.3). +- Campbell 1985 and Breuker 2001, read only second-hand (2.8). +- TalkChess page 2 (2.9). +- Lc0's TT container type (2.5). + +## 3. Design + +### 3.1 Conventions and invariants + +- `v` = a value in [-1, 1] **from the side to move** at a position (what + `eval::value` returns). +- `node.q` and `node.u` are **from the view of the side that moved into the + node**: `node.q = −(stm value)`. This keeps Rigby's convention. It is + path-independent, because the side to move is part of the position. +- Edge `(n, a)` leads to child `c`. `c.q` is from the view of the side to move + at n, which is the side choosing a. So the edge value used in PUCT at n is + `Q(n,a) = (W(n,a) / N(n,a)) · c.q`, where `N(n,a)` = edge visits, + `D(n,a)` = edge visits that ended in a path-dependent draw, and + `W = N − D`. Draw visits count as 0. If `N(n,a) = 0`, FPU applies. If + `W = 0`, the edge value is 0. +- Node visits: `N(n) = base(n) + Σ_a N(n,a)`. A fresh node has `base = 1` and + `u = −v_leaf`. A pruned node (3.6) keeps its N in `base` and its Q in `u`. +- Recompute in mover view: + + `n.q = (base·u − Σ_a W(n,a)·c_a.q) / N(n)` + + Check: the side to move at n sees `−n.q = (base·(−u) + Σ W·c.q) / N`, which is + KataGo's formula with draw visits contributing 0. +- Terminal nodes (position-intrinsic only: checkmate, stalemate, insufficient + material): `u = q = +1` (the stm is mated, so the mover won) or 0. They have no + edges. N counts visits. +- **Only position-intrinsic facts are ever written into a node.** Repetition and + 50-move results exist only as per-edge draw counts and as a playout's value. + +### 3.2 Data layout + +``` +struct Edge { // 16 bytes, contiguous per node, created at expansion + u32 child; // node index, 0 = no node yet (lazy creation) + u32 visits; // N(n,a): how often PUCT at n chose a + u32 draws; // D(n,a): of those, playouts that ended in a path draw + u16 move; + u16 policy; // prior scaled to 0..65535 +}; +struct Node { // 32 bytes, created when a position is first reached + u64 key; // full Zobrist key + u32 first_edge; // 0 = not expanded + u32 visits; // N(n) = base + Σ edge visits + float q; // mover view, recomputed on the playout path + float u; // mover view: own evaluation, or the Q kept by pruning + u32 base; // weight of u: 1, or N at the time of pruning + u8 num_edges; // ≤ 218 legal moves + u8 state; // UNEXPANDED, EXPANDED, TERMINAL_LOSS, TERMINAL_DRAW + u16 check; // second fingerprint, see 3.5 +}; +``` + +Why this differs from the brief's 12-byte edge: the draw count must be per edge +and 32-bit. A perpetual-check edge in a long analysis can collect more than 65k +draw visits, so a u16 would saturate and silently bias Q. A one-bit flag is not +enough either (3.5). 16 bytes also keeps 4 edges per cache line. The node is 32 +bytes, not 20, because it carries the key (needed to rebuild the table after GC +and to verify), `u` and `base` (needed for idempotent recompute and for pruning +without losing information) and a 16-bit second check. + +**Key table:** open addressing with linear probing, power-of-two capacity +≥ 2 × node capacity. 8-byte slots `{u32 key_hi, u32 node}` (`node = 0` is +empty). Slot = `key & mask`. A hit needs equal `key_hi`, then the node's full +64-bit `key` and its 16-bit `check`. Nothing is ever deleted except by a rebuild +after GC or reroot (3.6), so there are no tombstones. About 16 bytes per node. + +**Memory and the meaning of Hash.** Hash still means all search memory: +ValueHash (1/32, until variant 5c), key table, node arena, edge arena. With r +edges per node, a node costs about `32 + 16 + 16r` bytes. Today a node costs +20 bytes for every child, visited or not. The split between the arenas is set +in step 3 from the edges-per-node ratio measured in step 1 (`edge_bytes / node_bytes` +at the end of 5 s searches). GC runs when either arena or the table (load > 0.5) +is full. + +### 3.3 Playout (always-descend base, step 3) + +``` +pos = root_pos; history_ = game history + root; path = [root] +loop: + n = path.back() + if n is TERMINAL: value = stm view of n.u; break + if n is UNEXPANDED: expand(n) (fails → playout ends here, value = -n.q, gc_pending) + e = select_edge(n) + pos.make_move(e.move); history_.push(pos.key); depth++ + // Path-dependent draws are decided before the node lookup: + if is_repetition(pos) → path draw + else if pos.halfmove >= 100 and not checkmated(pos) → path draw + if path draw: value = 0; e is marked as a draw edge for backprop; break + if e.child == 0: + c = table.find(pos) // a transposition into an existing node + if !c: c = create_node(pos) // first visit: evaluate (3.1); value = its v + e.child = c; path.push(c); break + e.child = c + path.push(e.child) + if depth >= MAX_PLAYOUT_DEPTH (e.g. 512): value = -c.q; break // collision guard +``` + +- `checkmated(pos)`: if the child node exists, read its state; otherwise use + `pos.in_check() && !has_legal_move(pos)`. Mate takes precedence over the + 50-move rule, as now. A repeated position cannot be mate, because the game + continued from its first occurrence. +- `create_node` = today's `evaluate_leaf` minus the path checks: movegen (mate + or stalemate → terminal); insufficient material → `TERMINAL_DRAW` (never at + the root); then the ValueHash probe; then `eval::value`. +- `expand` is unchanged apart from writing edges (`child = 0, visits = draws = 0`). + The priors are a snapshot from whichever path expanded the node, the same as + today. +- The root has no path checks (they apply to children), so it is never declared + drawn, as today. The root is created through `create_node` (one evaluation) and + expanded before the first playout. + +### 3.4 Selection and root decisions + +- PUCT at n over edges: `Q(n,a)` as in 3.1 for `N(n,a) > 0`, FPU otherwise; + exploration `cpuct(N(n)) · sqrt(N(n)) · P / (1 + N(n,a))`, using today's + formula with `N(n)` in place of `node.visits`. In a tree `N(n)` equals today's + `node.visits`. FPU = `−n.q − fpu_reduction·sqrt(Σ P over edges with N(n,a) > 0)`. + Root cpuct is chosen by `idx == root`. +- **Everything at the root uses edge visits:** best move (most `N(n,a)`, then + edge Q, then prior), smart pruning (`root_start_visits_` = root edge visits at + search start), score (`Q` of the best edge), `print_info`, the dashboard rows. +- **PV:** follow the best edge from each node. Stop when `child == 0`, + `visits == 0`, after 64 plies, or after a move whose position repeats the PV + or the history. Cycles make the 64-ply cap necessary, not cosmetic. + +### 3.5 Repetition, 50-move and cycles + +**Decision: key = the position only (today's Zobrist). Detect repetition and +50-move draws on every descent, after `make_move` and before the table lookup. +Record them per edge as a draw count `D(n,a)`, never in a node. The +reversible-window key with threshold T is variant 5d.** + +Why counts and not a per-edge flag: an edge belongs to its parent node, and the +parent node is shared by every path that reaches it. A move can be a repetition +on one path to n and a fresh position on another. A sticky flag, as in Lc0's +`Node`, makes every later path see a draw. A count makes the edge value the +visit-weighted mixture of what the paths actually produced. Ceres does this with +`NDrawByRepetition` and the same formula. Both are approximations. Only the count +stays consistent as path frequencies change. + +Why not put history in the key from the start (Lc0's rule-50 ply plus repetition +count, Ceres's history mode, Czech's step counter): + +1. **It removes much of the merging.** Two move orders reach the same position + with a different halfmove clock whenever their pawn moves fall in a different + order. For example, `1.e4 Nc6 2.Nf3` has halfmove 2 and `1.Nf3 Nc6 2.e4` has + halfmove 0. A reversible-window key also refuses every transposition between + piece manoeuvres, which is where deep transpositions come from. +2. **The pure-position key is the KataGo and Ceres default** (Ceres's + `PositionEquivalence`), and every other option is a strict refinement. A + threshold variant (5d) can be added later without touching anything else. +3. **The error is bounded.** The value a shared node carries is a mixture over + real paths, never a fabricated draw. Repetition-sensitive positions (long + reversible sequences, perpetuals, fortresses) are exactly where 5d splits + nodes, and 5d's SPRT decides whether that is worth the lost merging. + +Variant 5d, for comparison: when `halfmove >= T`, the key additionally mixes in a +**multiset** hash of the positions in the current reversible window (splitmix64 +of each key, summed mod 2^64 so that order does not matter and there is no XOR +cancellation; the hash resets at each zeroing move, as in Ceres). Below T the key +is the position. Above T, paths with different reversible histories get +different nodes, so neither repetition nor the 50-move proximity mixes there. The +window multiset fixes its own length, so the halfmove clock is fixed too. +T = ∞ is the base. Path detection stays in either case, because repetitions +within the window must still score as draws. + +**Cycles cannot cause infinite descent.** A cycle in the position graph uses only +reversible moves: a capture, a pawn move or a lost castling right changes the +position for good. So a playout that would re-enter a position already on its +path finds that position's key in `history_` within `halfmove` plies, with the +same side to move, at distance ≥ 4. `is_repetition` sees it and ends the playout +as a draw before the node is entered. A path therefore never contains a node +twice, and its length is bounded. +`MAX_PLAYOUT_DEPTH` only guards against a hash collision linking unrelated +positions (see the next point). + +**There is no unbounded value feedback.** Nodes can still depend on each other +through a cycle: X→Y on one path, Y→X on another. But each recompute is a convex +combination: weights `base` and `W(n,a)` over `N(n)`, values in [-1, 1], draw +visits at 0. So every Q stays in [-1, 1] and only nodes on the path change. +There is no iteration to a fixed point, so nothing can diverge. The remaining +error is GHI's draw-last kind: Y's value includes X's value on paths where going +back to X would be a draw. The draw counts on that edge pull it towards 0 in +proportion to how often that actually happened. + +**Collisions.** The table compares the full 64-bit key plus a 16-bit +`check = u16(mix64(colors[WHITE] ^ rotl(pieces[PAWN], 17) ^ rotl(pieces[KING], 41)))` +that is independent of the Zobrist key. That makes about 80 bits. With 2·10^6 +nodes the chance of any false merge is about `n²/2^81 ≈ 2·10^-12` per search. +Without the check, 64 bits would give about `10^-7` per search, which is fine +for games but not for long analysis. The root is additionally re-validated at +search start: its edges must equal `generate_legal(root)`, otherwise the graph is +cleared. Illegal-move protection inside the graph rests on the 80-bit check. +VERIFY builds check legality of every edge (3.8). + +### 3.6 Reuse and GC on a DAG + +**Mark, then slide both arenas, then rebuild the table.** + +1. **Mark.** Do a DFS from the root over `edge.child`, with a visited bitmap. + Pruning rule with threshold T: a reachable node with `N < T` (other than the + root) loses its edges. It keeps `visits`. It sets `u = q` (the current + mover-view Q) and `base = visits`, and `state = UNEXPANDED`. Its edges and + anything reachable only through them are dropped. `q` is unchanged, so no + value is lost, which matches today's behaviour. +2. **Threshold.** Same histogram as today: `kept(T) ≈ Σ over reachable nodes with N ≥ T of + (edges + edge targets)`. In a tree this is exact and equals today's rule. In + a DAG, reachability through pruned nodes can only lower the real number, so + `kept ≤ estimate ≤ target`. The policy therefore does not assume monotone + visits for safety, only for tightness. +3. **Forwarding.** `fwd_node[old] → new` for marked nodes, in index order. The + edge blocks of kept expanded nodes are sorted by `first_edge` and given new + starts in that order. Both arenas then slide toward the front in increasing + index order. Every destination is ≤ its source, so memmove in place is safe + **regardless of allocation order**. The tree assumption is gone. +4. **Remap.** Remap `node.first_edge` from the block map and `edge.child` from + `fwd_node`. A kept node's edges with a child always point to marked nodes, + because marking follows exactly those edges. The root becomes + `fwd_node[root]`. Make the root index a member, since `root()` can no longer + be the constant 1. Null slot 0 stays. +5. **Table.** Clear it and reinsert every surviving node by its own key. This is + O(nodes), like the rest of GC, and removes a whole class of remapping bugs. +6. **Reroot** = find the new root (walk the played moves along edges as today, + or look its key up in the table; both find the same node in a graph), then + mark/compact with T = 0. If the node is terminal, the graph starts fresh. + That covers insufficient material, which must not be the root's state. +7. **Root-edge reconciliation** (step 4). After reroot, the game history is + common to every path. For each root edge: if its move now gives a two-fold + repetition against `history_`, set `D = N`, so the edge becomes a pure draw. + If it does not but `D > 0`, those draws belonged to other histories: subtract + them (`N −= D`, root `N −= D`, `D = 0`). Root edges are then exact. + Ceres goes deeper with a depth-limited walk; that is not planned. + +### 3.7 ValueHash and butterfly history + +- ValueHash stays in step 3, unchanged: it is probed in `create_node` and + written for every path node (`−n.q`, visits). Path draws are never nodes, so + they are never written. That is cleaner than today's `state != TERMINAL_DRAW` + test. In a graph it only helps for positions the graph has dropped (after GC + or reroot) or never held. Removing it is variant 5c. +- Butterfly history is unchanged and path-based. The playout value is the leaf + value, 0 for a path draw, or the stopped node's value (5a). + +### 3.8 Debug tooling (`-DRIGBY_VERIFY_TREE`) + +Each node is visited once, by DFS from the root, carrying the position from the +first path that reaches it. Positions are path-independent apart from the clock. +The checks: + +- `node.key == pos.key` and `node.check` matches. `table.find(pos)` returns this + node. The number of table entries equals the number of nodes after a rebuild. +- Expanded: `num_edges == legal moves`, every `edge.move` legal and distinct, + `first_edge + num_edges <= edges_used`. +- `edge.draws <= edge.visits`. `edge.visits > edge.draws ⇒ child != 0`. + `child < nodes_used`. +- `node.visits == base + Σ edge.visits` (expanded nodes, root included from + step 3). Terminal nodes have no edges. +- **No path state in nodes:** `TERMINAL_LOSS ⇔` checkmate and `TERMINAL_DRAW ⇔` + stalemate or insufficient material, recomputed from the position. +- `|q| <= 1`, `|u| <= 1`, finite. +- Step 2 only (still a tree): the in-degree of every node is exactly 1, the + root's is 0. + +Unit-style checks run as a `verify` UCI command that exists only in VERIFY +builds: + +- (a) Incremental key equals `set_fen(fen()).key` along random games, standard + and 960. +- (b) GC: snapshot every reachable node by key → (visits, q, edges by move → + (visits, draws, child key)), force `collect_garbage`, compare all survivors. + Do the same after `reroot`. +- (c) Repetition leak: search positions with forced repetitions, then run the + node-state check above. +- (d) Table consistency after every GC. + +### 3.9 Choices that affect later batching or multithreading + +- Edges have no `n_in_flight`. Virtual loss would need 2 more bytes per edge + (20-byte edges), or packing `draws` into fewer bits. +- Lazy child creation and table insert would need CAS on `edge.child` and on the + table slot, plus per-thread allocation chunks. +- `create_node` evaluates synchronously. Batching would need a "pending eval" + state that selection treats as in flight. Nothing in this design writes a value + that a pending node could not supply later. +- Idempotent recompute reads children without locks. Storing a mean `q` (not + N·Q) avoids KataGo's torn-read problem. Torn reads of `q` versus `visits` only + make a value briefly stale. +- GC and reroot are stop-the-world, which is fine with a pause-all-threads + barrier. +- Path draw detection uses each playout's own `history_` and is naturally + per-thread. + +### 3.10 Optional variants (each its own branch and SPRT, never bundled) + +- **5a Stop rule.** After linking or entering an existing child `c` with + `c.N > N(n,a)` (before the increment), end the playout: value = `−c.q` (stm view at + `c`), increment the edge, and recompute upward. Sub-variants: always stop; + leaky (stop with probability p, e.g. 0.5). +- **5b Edge-Q cache + incremental sum.** The edge stores the `c.q` it last folded + in (+4 bytes, a 20-byte edge). The node stores `S = Σ W·q_seen`. The + recompute is O(1): replace the path edge's term. Selection reads only + contiguous edges. This trades staleness of off-path children for locality and + NPS. +- **5c ValueHash removal.** Give its 1/32 to the graph. +- **5d Window-hash key for halfmove ≥ T** (3.5). Candidate T from the step-1 + halfmove histogram of transposition hits. +- Later, not planned: Lc0-style two-fold handling (history two-folds need a + third occurrence); path-aware selection that scores an edge as 0 when it + repeats on the current path; a deeper reconciliation walk. + +## 4. Measurement design (step 1) + +Goal: bound what MCGS can gain before building it, and size the arenas. All +counting is behind `-DRIGBY_STATS` (`make STATS=1`). The normal build is +unchanged and bench-identical. + +**Runner:** a new UCI command `mcgsstats [hash_mb]` searches the +16 bench positions. It uses a fresh `Searcher` per position (no reuse, so +results don't depend on order) and prints one row per position plus totals. Run +it at **1000 ms and 5000 ms**, Hash 64. Also run 5000 ms at Hash 16 to see GC. + +**Transposition counters (exact).** These use an instrumentation-only +`std::unordered_map` from key to the number of tree nodes with that key, +updated at node creation and rebuilt after GC and reroot. A second map from key +to the number of expanded nodes is kept the same way. + +| counter | meaning | what it bounds | +| --- | --- | --- | +| `leaf_tt` | playouts whose new leaf's key already exists in the tree | the brief's "transposition rate"; value evals MCGS could skip | +| `leaf_tt_expanded` | ... and that existing node is expanded | how much subtree would be shared | +| `vh_hits` | first visits answered by ValueHash today | what is already saved | +| `exp_dup` | `expand()` calls for a key already expanded elsewhere | policy-net calls MCGS saves | +| `path_tt` | playouts passing through ≥ 1 node whose key has ≥ 2 tree nodes | how many playouts touch shared structure | +| `dup_nodes` | tree nodes / distinct keys, at the end | memory duplication | +| `rep_draws`, `r50_draws` | playouts ending in a repetition or 50-move draw | how much the draw-count path is exercised | +| `tt_halfmove_hist` | histogram of `pos.halfmove` at `leaf_tt` hits: 0, 1–3, 4–7, 8–15, 16–31, 32–63, ≥64 | upper bound of merges lost by variant 5d for each T | +| `visited / allocated` | nodes with visits > 0 / all nodes, at the end | edges-per-node ratio r for the arena split (3.2) | + +**Time split.** Use `__rdtsc()` on x86 (`std::chrono::steady_clock` elsewhere) +around these parts, cumulative per search: value (`eval::value`, i.e. net + +qsearch); policy (`eval::policy` inside `expand`); movegen in `evaluate_leaf` and +`expand`; `select_child`; backprop loop; ValueHash probe and store; `make_move` +in `playout`; total `playout()`. Report each as a share of total playout cycles. +The timer overhead (≈ 10 reads × 20–40 cycles) is small against a playout. The +shares are from a stats build and labelled as such. + +**How the numbers bound the gain** (to be filled with measured values in +`mcgs-log.md`): + +- Search time MCGS could free is at most `f_value · max(0, leaf_tt − vh_hits) + f_policy · exp_dup`. + `f_*` are the time shares, and the rates are per playout or per expansion. +- From the opposite direction, MCGS adds a table lookup per new node plus a + recompute over the edges of each path node (about the cost of one more + `select_child` per path node). An upper bound for that is + `f_select + f_backprop` today. Steps 2 and 3 measure the real NPS cost. +- The effect of sharing subtree statistics (deeper effective search, the actual + point of MCGS) is not bounded by any of this. Only the SPRT measures it. +- Cross-check: the ValueHash comment claims 37–85 % of leaf evaluations repeat a + position. `leaf_tt` should land in that range, or the counters are wrong. + +## 5. Implementation plan + +Each step: its own branch from `main` (or from the previous step once merged), +small commits, every correctness gate from section 6 passed, `mcgs-log.md` +updated (branch, commit, bench; SPRT link and outcome left empty for the owner). +No step merges to main by itself. + +Changes to the brief's suggested order, and why: + +- **The DAG-capable compaction (forwarding tables, two arenas, no + allocation-order assumption) moves into step 2.** It must exist before step 3 + can create a graph. Otherwise step 3 would have to disable GC and reuse, and + its SPRT would mix MCGS with "no tree reuse". +- **Step 4 shrinks** to the DAG-specific reuse behaviour (root-edge + reconciliation) plus table and arena sizing. + +### Step 1: instrumentation (measurement only) + +- **Branch:** `mcgs-stats`. +- **Files:** `src/mcts.h`, `src/mcts.cpp`, `src/uci.cpp`, `Makefile` (`STATS=1` + adds `-DRIGBY_STATS`), and a new `src/stats.h` if that keeps `mcts.cpp` tidy. +- **Brief:** Add the counters and timers of section 4, all under + `#ifdef RIGBY_STATS`, and the `mcgsstats` command, also stats-only. Do not + change search behaviour. + - The key→count maps are instrumentation-only and must be rebuilt after + `collect_garbage` and `reroot`. Walk the tree from the root and recompute + each node's key from its position. + - `rep_draws` / `r50_draws` count playouts that end at a `TERMINAL_DRAW` node + whose reason was repetition or 50-move. Record the reason in a stats-only + side table indexed by node, or recompute it. + - Run `mcgsstats 1000`, `mcgsstats 5000`, `mcgsstats 5000 16`. Put the tables + and the derived bounds into `mcgs-log.md` under "Step 1 measurements", + labelled as stats-build numbers. +- **Acceptance:** the normal build is bench-identical (`663779`, or main's + current bench if main moved), and the `STATS=1` build is also bench-identical. + The stats code must not change search. No new warnings. Cross-check: `leaf_tt` + 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. + +### Step 2: Edge/Node split with tree behaviour preserved + +- **Branch:** `mcgs-step2-split`. +- **Files:** `src/mcts.h`, `src/mcts.cpp`. `src/pretty.*` only if the dashboard + rows need new fields (they should not). +- **Brief:** + 1. Introduce `Edge` (16 B) and the 32-byte `Node` of 3.2, in two arenas. + 2. Expansion writes an edge block. A child `Node` is created only when its + edge is first selected. + 3. Edge visits are kept equal to child visits. In a tree they are identical, + and selection, FPU and root decisions switch to reading `edge.visits` (and + `edge.policy`) now, with `child.q` for Q. + 4. Keep the incremental `q` update and every float operation in the same + order. The point is bit-identical search. `u`/`base`/`key`/`check` and + `edge.draws` exist but are unused (or set and ignored). + 5. Path-dependent draws stay in `node.state` for now. That is still correct in + a tree, and it moves in step 3. + 6. Make the root index a member. + 7. Replace `compact` and `prune_threshold` with the mark → forwarding → slide → + remap scheme of 3.6 for two arenas. No table yet. Keep the tree-exact + threshold rule. The pruned node keeps visits and q, as today. + 8. Extend `verify_tree` per 3.8 (tree subset, in-degree 1) and add the `verify` + command with checks (a) and (b). + 9. Hash is split between the arenas by the step-1 ratio. Document the split in + a comment. +- **Acceptance:** + - `bench` identical to main. + - The reuse sequence from section 6 gives identical `bestmove` and `info` + node counts versus main at Hash 256, where no GC happens. + - All VERIFY runs clean, including forced-GC runs (Hash 1 and 2). Under GC the + output may differ from main, because the bytes per node differ. That is + expected; state it. + - `perftsuite` and 960 perft clean. No new warnings. +- **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 + 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. + +### Step 3: MCGS core (one self-consistent commit series) + +- **Branch:** `mcgs-step3-core`, from step 2. +- **Files:** `src/mcts.h`, `src/mcts.cpp`, `src/movegen.cpp` only if a cheap + `checkmated` helper is needed. +- **Brief:** Implement 3.1–3.5 and the table rebuild in GC (3.6.5): + - The key table with the 80-bit check. + - `create_node` (today's `evaluate_leaf` without path checks), with the root + created and evaluated through it. + - Descent with path draws before the lookup, lazy linking to existing nodes, + and `MAX_PLAYOUT_DEPTH`. + - Backprop: + - for each path node from the leaf's parent up: `edge.visits++` (`edge.draws++` + for a path draw), `node.visits++`, recompute `q` by the 3.1 formula (sum in + `double`); + - the leaf: a new node has `N = base = 1`; a terminal node gets `N++`; + - ValueHash store per path node; + - the butterfly update as today. + - Remove the repetition and 50-move checks from node creation, and the + `TERMINAL_DRAW` test in the ValueHash store. + - Root decisions, PV, info and dashboard on edges (3.4). + - Root edge validation at search start. + - VERIFY: the full 3.8 list, including check (c) and the table checks. + - Arena and table sizing per 3.2. + - No stop rule, no edge Q cache: those are variants. +- **Acceptance:** + - All gates in section 6. + - The bench changes. Explain it in the commit message: the tree becomes a graph + (transpositions share nodes, so playout depths and the visited positions + change); the root gets an evaluation and `N = 1 + Σ`; and repetitions are now + judged per playout instead of once per node. + - VERIFY self-play: at least 20 games at a fixed-nodes TC with no abort. + - Report labelled numbers: NPS versus step 2, and the measured transposition + 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. + - 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. + - If both fail or stall, do not tune. Investigate with the stats build: + transposition hit rate, NPS loss, depth distribution, draw counts. + +### Step 4: DAG-aware reuse polish + +- **Branch:** `mcgs-step4-reuse`, from step 3. +- **Files:** `src/mcts.cpp`. +- **Brief:** + - Root-edge reconciliation (3.6.7) after every reroot. + - Reroot by table lookup, with the move walk kept as a cross-check in VERIFY + builds. + - Confirm that GC's kept size stays ≤ target on DAGs (log it in VERIFY builds). + - Re-measure the arena split at the end of 5 s searches with transpositions + and adjust it if one arena fills first. + - Add check (b) for a rerooted graph. +- **Acceptance:** all gates. Bench unchanged versus step 3, because bench has no + 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. + +### Step 5: variants (each separate) + +Each variant gets its own branch from the current MCGS head, a single concern, +all gates, and its own SPRT. Never bundle them. + +| branch | change | SPRT | +| --- | --- | --- | +| `mcgs-v-stop` | 5a stop rule, always-stop | STC + LTC `[0.00, 5.00]` | +| `mcgs-v-stop-leaky` | 5a leaky, p = 0.5 (only after `mcgs-v-stop` has a result) | STC + LTC `[0.00, 5.00]` | +| `mcgs-v-edgeq` | 5b edge-Q cache + incremental sum | STC `[0.00, 5.00]` (it is mostly an NPS trade) | +| `mcgs-v-novaluehash` | 5c remove ValueHash, memory to the graph | Non-Regression STC `[-5.00, 0.00]` (a simplification) | +| `mcgs-v-window-T` | 5d window-hash key for halfmove ≥ T, T from the step-1 histogram | STC + LTC `[0.00, 5.00]` | + +- Bench changes for every variant except possibly 5c, which changes it only where + ValueHash hits mattered. That is almost certainly a change too. Explain each. +- **If a variant is inconclusive or negative:** measure before tuning. For + example: the stop rule's share of stopped playouts and the change in depth; + 5b's NPS gain and how stale the stored Q is (|q_seen − c.q| histogram); + 5d's share of node lookups split by the window. + +## 6. Test reference (correctness gates) + +Run them on Windows with the repo Makefile (clang++, MinGW target), from the +repo root. + +```bash +make -j EXE=rigby-dev +``` + +```bash +make -j EXE=rigby-verify OBJ_DIR=obj-verify CXX="clang++ -DRIGBY_VERIFY_TREE" +``` + +This works with today's Makefile: command-line variables override `OBJ_DIR`, +and `CXX` still contains "clang", so the MinGW target is kept. The separate +`OBJ_DIR` keeps the VERIFY objects from mixing with the normal build. Delete +`obj-verify/` afterwards, since `.gitignore` does not cover it. A `STATS=1` build +(step 1) works the same way with `OBJ_DIR=obj-stats`. Checked in this session: +on main, `setoption name Hash value 1`, `go nodes 300000` from startpos runs +dozens of collections and every one passes `verify_tree`. + +UCI searches must be driven so that the next `position` waits for `bestmove`, +because `position` stops a running search. Piping all commands at once +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). +- **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 + noted: + - `position startpos` and `position startpos moves e2e4 e7e5 g1f3 b8c6 f1c4 g8f6` + (transpositions). + - `position startpos moves g1f3 g8f6 f3g1 f6g8 g1f3 g8f6` (history repetition + at the root's children). + - Bench positions 11, 12 and 15 (`8/8/3k4/...`, `8/5pk1/...`, `8/8/8/4k3/8/8/2KR4/8 w - -`), + which are endgames with long reversible play. + - `8/8/8/4k3/8/8/2KR4/8 w - - 95 100`: 50-move draws at depth 5+ must appear + as edge draws, never as node states. + - `6k1/5ppp/8/8/8/8/5PPP/3R2K1 w - - 0 1` (mate in 1, Rd8#). + - A Chess960 start, e.g. `bqnb1rkr/pp3ppp/3ppn2/2p5/5P2/P2P4/NPP1P1PP/BQ1BNRKR w HFhf - 2 9` + with `UCI_Chess960 true`. + - **Tree reuse:** one session with `position startpos`, `go nodes 50000`, then + `position startpos moves `, `go nodes 50000`, repeated + for 10 moves. + - **Forced GC:** `setoption name Hash value 1`, `go nodes 300000` on startpos + and on the 960 position (several `tree collected` lines expected). +- **`verify` command** (VERIFY builds, from step 2 on): checks (a)–(d) of 3.8. +- **Smoke:** `go nodes 1`, `go nodes 2`, and `go depth 1` on the positions above. + Then self-play with `C:\Users\rektd\repos\OpenBench\Client\cutechess-ob.exe`: + 100 games of dev vs base at 2.0+0.02, Hash 16, which forces GC, and 20 games of + 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 + +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? -- 2.47.3 From 4a4338dd9afbb219f4b5a19f629f3444301bb389 Mon Sep 17 00:00:00 2001 From: rektdie Date: Mon, 16 Nov 2026 19:02:56 +0100 Subject: [PATCH 02/19] docs: MCGS plan with the owner's answers Book and adjudication from tests 5307-5309 (UHO_Lichess_4852_v1.epd), LTC 40.0+0.40 at Hash 256 since Rigby has no LTC preset yet, the stats branch is never merged, and the Chess960 perft suite (found in an old session scratchpad, passes depth 5 on main) gets committed by step 2. Co-Authored-By: Claude Opus 5.5 --- docs/mcgs-plan.md | 70 +++++++++++++++++++++++++++++++---------------- 1 file changed, 47 insertions(+), 23 deletions(-) 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. -- 2.47.3 From fc0a3a8fec96e16f8665bfff7d6ef80488a11b98 Mon Sep 17 00:00:00 2001 From: rektdie Date: Mon, 16 Nov 2026 19:05:20 +0100 Subject: [PATCH 03/19] docs: MCGS plan approved, steps merge into main one by one Co-Authored-By: Claude Opus 5.5 --- docs/mcgs-plan.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/mcgs-plan.md b/docs/mcgs-plan.md index 9592415..be2d0d8 100644 --- a/docs/mcgs-plan.md +++ b/docs/mcgs-plan.md @@ -891,7 +891,11 @@ Answered on 2026-11-16: 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: +4. **Plan approved, including the ordering change.** Compaction moves into step 2 + and step 4 becomes small. +5. **Merge policy:** step by step into `main`. Every step has its own branch and + is merged to `main` only after its SPRT passes (step 1 excepted, see there). + There is no long-lived MCGS integration branch. -4. **Ordering change:** compaction moves into step 2 and step 4 becomes small - (section 5). The plan assumes this until the owner says otherwise. +Until the plan itself is in `main`, step branches start from `mcgs-plan`, so they +carry these docs. The first step merged to `main` (step 2) brings the docs along. -- 2.47.3 From 479f6cfb2f6d26831688f2bb2150e964d74acec9 Mon Sep 17 00:00:00 2001 From: rektdie Date: Mon, 16 Nov 2026 19:22:30 +0100 Subject: [PATCH 04/19] docs: step 1 measurements (stats build) in mcgs-log mcgsstats 1000, 5000 and 5000 16, plus an extra no-GC run at Hash 1024 for the edges-per-node growth ratio. Derived bounds, the ValueHash cross-check (leaf_tt 54-66 % overall, inside 37-85 %) and the arena split input for step 2. Stats-build numbers, local machine. Bench: 663779 Co-Authored-By: Claude Opus 5.5 --- docs/mcgs-log.md | 269 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 269 insertions(+) diff --git a/docs/mcgs-log.md b/docs/mcgs-log.md index 9cc7f03..1326f56 100644 --- a/docs/mcgs-log.md +++ b/docs/mcgs-log.md @@ -5,3 +5,272 @@ only from results the owner provides. | step | branch | commit | bench | SPRT (link, TC, bounds) | outcome | | --- | --- | --- | --- | --- | --- | +| 1 | `mcgs-stats` | `bec9871` | 663779 (normal and `STATS=1` builds) | none (never merged) | measurement only; the branch stays on its own | + +## Step 1 measurements + +All numbers below come from the **stats build** (`make STATS=1`) at `bec9871`, on +the owner's Windows machine, 2026-11-16. Rates, cycle shares and playouts per +second are local measurements of that build. They say nothing about strength. + +**Stats-build overhead.** The key maps and timers slow the search down. Over the +16 positions, the normal build ran: + +- 811k playouts/s at 1000 ms (12.7M playouts); +- 770k playouts/s at 5000 ms (61.3M playouts). + +The stats build ran 498k/s and 474k/s, about 61 % of that. A stats-build +5000 ms tree is about the size of a normal-build 3 s tree. + +**Definitions** (plan section 4, with these choices made explicit): + +- A *tree node* is a node MCGS would create: the root, plus every + first-visited position that is not a path-dependent draw. Repetition and + 50-move leaves are never graph nodes, so they are not counted. +- `newleaf` = playouts that end at such a first visit. +- `lf_tt` (`leaf_tt`) = new leaves whose key already had a tree node, as a + percentage of new leaves. That is the denominator the ValueHash comment uses + ("leaf evaluations"). Per playout it is about 0.55× that. +- `vh` = ValueHash hits as a percentage of all first visits. +- `exp_dup` = expansions of a key that already had an expanded node, as a + percentage of expansions. +- `path_tt` = playouts with at least one path node whose key has ≥ 2 tree nodes. + `inner` is the same count without the new leaf. +- `dup` = tree nodes / distinct keys. +- `r_tree` = child slots / visited nodes: edges per node in the step 2 layout. +- `r_grph` = child slots counted once per distinct expanded key / distinct keys, + which approximates edges per node after merging. +- The key maps are rebuilt from the tree after root expansion, reroot and every + GC. The end-of-search figures are taken after the last GC. + +Each run searched the 16 bench positions, each with a fresh `Searcher` (so no +reuse), at Hash 64 unless stated otherwise. + +### `mcgsstats 1000` (Hash 64) + +``` +pos playouts po/s newleaf lf_tt tt_exp vh exp_dup path_tt inner rep r50 dup r_tree r_grph gc + 1 249792 254889 249757 51.8 34.0 50.8 47.8 95.8 95.0 11 0 1.965 15.74 17.14 1 + 2 171008 174497 170960 23.8 15.1 22.9 22.1 92.9 92.6 16 0 1.278 14.88 15.37 1 + 3 250240 255346 250197 56.4 38.1 56.1 53.0 89.6 88.4 41 0 2.080 13.04 14.37 2 + 4 277376 283036 277372 76.8 58.3 76.5 74.2 95.4 94.7 2 0 4.076 14.73 15.45 2 + 5 232512 237257 232455 40.4 25.7 39.2 36.1 87.0 85.3 56 0 1.605 16.64 17.95 1 + 6 202944 207085 201798 32.1 20.5 30.7 29.9 88.4 87.4 206 0 1.430 15.48 16.08 1 + 7 192064 195983 191629 30.0 18.6 29.0 28.8 89.0 88.2 392 0 1.386 16.16 16.71 1 + 8 199808 203885 199106 23.2 14.5 22.5 20.9 80.5 79.4 684 0 1.263 16.85 17.67 1 + 9 252928 258089 250454 39.8 25.7 37.6 36.6 91.9 91.0 2418 0 1.546 9.05 9.79 1 + 10 307136 313404 268891 41.7 29.4 36.7 38.6 96.3 96.0 37831 0 1.716 11.09 11.75 0 + 11 886848 904946 451555 91.2 78.0 86.3 90.5 100.0 100.0 432838 0 11.403 4.09 7.98 0 + 12 821440 838204 524144 91.2 82.4 86.5 89.4 99.9 99.8 296636 0 11.331 3.56 4.61 0 + 13 224384 228963 223701 24.5 15.0 21.5 22.1 74.6 72.8 616 0 1.325 13.93 14.44 0 + 14 244992 247716 243015 31.4 20.2 29.7 28.3 88.4 87.6 1975 0 1.379 11.49 12.22 2 + 15 679936 693812 672593 93.8 75.5 88.5 88.9 99.7 99.6 6524 0 14.199 3.09 7.59 1 + 16 2625600 2679183 14470 34.0 21.3 32.7 29.9 99.3 99.3 2562358 0 1.515 12.70 13.58 0 +all 7819008 498375 4422097 60.1 46.5 57.4 56.2 96.0 95.6 3342604 0 2.536 9.47 14.03 14 +``` + +### `mcgsstats 5000` (Hash 64) + +``` +pos playouts po/s newleaf lf_tt tt_exp vh exp_dup path_tt inner rep r50 dup r_tree r_grph gc + 1 1016192 204054 1015943 50.2 30.0 56.2 43.9 97.9 97.5 81 0 1.778 6.46 7.19 12 + 2 786880 156874 785729 19.9 10.8 24.0 16.3 96.6 96.5 535 0 1.210 6.26 6.44 9 + 3 1186880 238329 1186600 63.6 39.6 71.3 57.6 95.0 94.4 252 0 2.407 8.97 10.20 17 + 4 1244480 249895 1244387 73.5 50.5 80.4 67.0 97.6 97.3 77 0 3.885 9.09 11.53 16 + 5 1053568 211009 1052812 43.8 25.2 49.8 36.8 92.9 92.0 743 0 1.649 5.94 6.57 13 + 6 914112 183556 904648 33.9 19.1 36.8 28.1 94.3 93.9 4722 0 1.438 7.00 7.61 9 + 7 958720 192514 944891 31.5 18.2 37.0 27.4 96.1 95.8 13719 0 1.405 9.56 9.98 10 + 8 944000 189558 936972 22.9 12.5 28.0 18.4 92.4 92.0 6815 0 1.242 7.42 7.90 11 + 9 1159680 230828 1143522 40.5 25.2 42.0 35.0 93.9 93.3 15583 0 1.518 4.35 4.75 8 + 10 1658304 332992 1265760 51.5 34.4 47.7 43.9 99.1 99.0 389253 0 1.844 5.52 6.50 7 + 11 4141760 831678 1755422 92.2 78.4 86.9 90.5 100.0 100.0 2366999 0 12.889 2.80 6.53 4 + 12 3398208 682371 1913929 93.7 83.7 87.5 91.7 100.0 100.0 1307918 0 13.707 2.57 4.14 3 + 13 973888 195559 955354 27.2 15.4 28.6 22.3 89.5 88.9 14102 0 1.328 6.27 6.78 7 + 14 1050432 210930 1035983 27.2 14.8 32.5 21.1 94.5 94.2 14413 0 1.318 7.58 8.20 12 + 15 3230592 648713 3202909 96.0 78.0 90.9 89.9 99.9 99.9 24843 0 19.104 2.93 7.39 15 + 16 14102272 2831781 41850 40.1 25.6 38.1 35.1 99.9 99.8 13855364 0 1.670 12.31 13.34 0 +all 37819968 474094 19386711 60.7 45.0 61.5 57.2 98.3 98.2 18015419 0 2.674 5.04 7.38 153 +``` + +### `mcgsstats 5000 16` (Hash 16, GC-heavy) + +``` +pos playouts po/s newleaf lf_tt tt_exp vh exp_dup path_tt inner rep r50 dup r_tree r_grph gc + 1 1047040 210248 1046869 42.5 20.8 54.9 33.1 94.6 93.8 37 0 1.689 5.27 5.92 60 + 2 792384 159113 791393 15.4 6.8 24.6 10.7 96.4 96.2 378 0 1.219 3.98 4.12 41 + 3 1216576 243851 1216235 56.4 29.2 69.6 45.7 94.4 93.6 258 0 2.067 3.92 4.32 83 + 4 1238592 248713 1238497 63.9 36.2 76.5 54.4 97.0 96.5 16 0 2.992 6.02 7.54 79 + 5 1056896 211972 1055994 34.6 16.2 48.0 25.0 90.8 89.7 838 0 1.428 3.61 3.97 64 + 6 853312 171347 847890 15.9 7.1 27.9 10.8 93.8 93.3 2705 0 1.149 3.51 3.61 45 + 7 948608 190139 945462 27.8 14.0 39.4 21.2 97.1 96.8 2859 0 1.422 3.57 3.67 51 + 8 930112 186769 926062 14.7 6.9 29.2 10.1 89.1 88.5 3640 0 1.145 5.08 5.31 51 + 9 1138688 228652 1130927 28.9 15.0 37.8 21.7 89.0 87.9 7255 0 1.290 2.67 2.83 42 + 10 1390144 279145 1170515 38.4 20.6 36.6 27.7 98.7 98.6 215548 0 1.560 3.03 3.44 34 + 11 4220352 847460 1785559 89.4 74.6 84.0 86.6 100.0 100.0 2421567 0 11.163 1.27 2.38 25 + 12 3396352 681998 1876547 89.9 75.6 81.8 85.2 100.0 100.0 1494614 0 8.520 1.83 3.00 24 + 13 980480 196883 960668 18.4 9.0 29.6 13.1 86.2 85.5 14413 0 1.152 3.95 4.18 37 + 14 1125632 225622 1093084 23.9 10.8 36.7 16.2 93.4 93.0 32457 0 1.279 3.19 3.39 61 + 15 3027584 607948 3012539 93.1 65.9 81.6 79.3 99.9 99.9 13000 0 9.931 1.59 5.07 67 + 16 14088960 2829108 41827 40.2 25.7 34.5 35.3 99.9 99.8 13842528 0 1.673 12.29 13.33 0 +all 37451712 469831 19140068 53.6 35.9 57.6 48.9 97.7 97.5 18052113 0 2.162 3.09 4.25 764 +``` + +### Extra: `mcgsstats 5000 1024` (no GC) + +Not in the plan. GC prunes child slots, so the end-of-search `r` at Hash 64 +(153 GCs) is a post-pruning figure. At Hash 1024 no GC happens, and `r` is the +ratio at which an arena fills. + +``` +pos playouts po/s newleaf lf_tt tt_exp vh exp_dup path_tt inner rep r50 dup r_tree r_grph gc + 1 1108224 222534 1107765 58.2 41.7 56.9 55.7 98.3 98.0 77 0 2.391 18.88 19.93 0 + 2 797824 160205 794007 18.7 11.5 18.3 17.5 97.4 97.3 2446 0 1.231 20.02 20.27 0 + 3 1261888 253391 1261542 71.8 57.0 70.8 70.1 95.2 94.8 270 0 3.546 20.37 21.55 0 + 4 1263936 253802 1263722 77.1 62.6 76.4 76.1 97.9 97.7 214 0 4.373 20.66 21.31 0 + 5 1150592 231042 1149845 53.9 38.8 52.4 51.3 94.6 93.9 747 0 2.168 19.50 20.45 0 + 6 972288 195238 967436 39.8 27.2 38.8 38.0 94.4 93.9 2466 0 1.660 19.58 20.01 0 + 7 994816 199762 994059 41.5 28.7 40.4 40.5 97.7 97.5 554 0 1.709 19.98 20.18 0 + 8 972480 195277 966716 26.4 17.0 25.8 24.6 92.8 92.3 5155 0 1.359 20.98 21.51 0 + 9 1183744 237699 1162150 42.6 28.8 41.9 39.8 96.0 95.5 20460 0 1.743 13.17 13.81 0 + 10 1859456 373384 1267715 55.9 42.9 54.2 53.1 98.5 98.4 586712 0 2.268 10.90 11.72 0 + 11 4432384 890036 1785406 93.7 83.5 89.6 93.1 100.0 100.0 2625372 0 15.750 4.41 8.97 0 + 12 3578688 718612 2007906 94.5 86.8 90.8 93.5 100.0 100.0 1367082 0 18.339 3.59 5.31 0 + 13 1042880 209413 1022986 31.7 21.7 30.9 29.5 89.2 88.5 15776 0 1.465 14.12 14.90 0 + 14 1226432 246271 1212002 39.7 28.1 38.7 37.7 96.5 96.3 14361 0 1.658 19.99 20.44 0 + 15 4031168 809471 3983269 98.0 89.9 96.6 96.6 100.0 99.9 44174 0 49.578 5.45 9.66 0 + 16 14052352 2821757 41766 40.1 25.6 39.4 35.1 99.9 99.8 13806006 0 1.669 12.29 13.33 0 +all 39929152 501118 20988292 66.0 54.8 64.6 63.8 98.5 98.4 18491872 0 2.938 13.04 18.13 0 +``` + +### Totals + +| counter | 1000 ms | 5000 ms | 5000 ms, Hash 16 | 5000 ms, Hash 1024 | +| --- | ---: | ---: | ---: | ---: | +| playouts | 7,819,008 | 37,819,968 | 37,451,712 | 39,929,152 | +| new leaves (% of playouts) | 56.6 % | 51.3 % | 51.1 % | 52.6 % | +| `leaf_tt` (% of new leaves) | **60.1 %** | **60.7 %** | **53.6 %** | **66.0 %** | +| `leaf_tt` (% of playouts) | 34.0 % | 31.1 % | 27.4 % | 34.7 % | +| `leaf_tt_expanded` (% of new leaves) | 46.5 % | 45.0 % | 35.9 % | 54.8 % | +| `vh_hits` (% of first visits) | 57.4 % | 61.6 % | 57.6 % | 64.6 % | +| `leaf_tt_eval` (% of value calls) | 7.4 % | 13.2 % | 18.4 % | 2.1 % | +| value calls (% of playouts) | 23.7 % | 19.4 % | 21.3 % | 18.3 % | +| `exp_dup` (% of expansions) | 56.2 % | 57.2 % | 48.9 % | 63.8 % | +| `path_tt` / `inner` (% of playouts) | 96.0 / 95.6 % | 98.3 / 98.2 % | 97.7 / 97.5 % | 98.5 / 98.4 % | +| `rep_draws` (% of playouts) | 42.7 % | 47.6 % | 48.2 % | 46.3 % | +| `rep_draws` without position 16 | 780,246 | 4,160,055 | 4,209,585 | 4,685,866 | +| `r50_draws` | 0 | 0 | 0 | 0 | +| GC runs | 14 | 153 | 764 | 0 | +| `dup` (tree nodes / distinct keys) | 2.54 | 2.67 | 2.16 | 2.94 | +| visited / allocated | 10.6 % | 19.8 % | 32.4 % | 7.7 % | +| `r_tree` (edges per node) | 9.47 | 5.04 | 3.09 | **13.04** | +| `r_graph` (edges per distinct key) | 14.03 | 7.38 | 4.25 | **18.13** | + +`tt_halfmove_hist`: the halfmove clock at `leaf_tt` hits, as a share of hits. + +| halfmove | 1000 ms | 5000 ms | 5000 ms, Hash 16 | 5000 ms, Hash 1024 | +| --- | ---: | ---: | ---: | ---: | +| 0 | 22.5 % | 22.2 % | 21.0 % | 22.0 % | +| 1–3 | 28.4 % | 27.9 % | 26.0 % | 28.0 % | +| 4–7 | 36.5 % | 34.6 % | 38.6 % | 29.8 % | +| 8–15 | 12.4 % | 15.0 % | 14.0 % | 19.8 % | +| 16–31 | 0.24 % | 0.38 % | 0.38 % | 0.35 % | +| 32–63 | 0 | 0 | 0 | 0 | +| ≥ 64 | 0 | 0 | 0 | 0 | + +Time split, as a share of `playout()` cycles (rdtsc, stats build). `vhash` is +also counted inside `backprop` (the store) and in leaf evaluation (the probe). + +| part | 1000 ms | 5000 ms | 5000 ms, Hash 16 | 5000 ms, Hash 1024 | +| --- | ---: | ---: | ---: | ---: | +| value (net + qsearch) | 23.0 % | 18.9 % | 20.1 % | 18.2 % | +| policy | 13.9 % | 14.0 % | 15.5 % | 12.2 % | +| movegen | 5.4 % | 5.2 % | 5.5 % | 5.0 % | +| `select_child` | 28.0 % | 30.7 % | 28.8 % | 32.3 % | +| backprop loop | 11.1 % | 11.7 % | 11.1 % | 12.8 % | +| ValueHash probe + store | 6.2 % | 6.3 % | 5.9 % | 6.7 % | +| `make_move` | 5.3 % | 5.7 % | 5.6 % | 5.7 % | + +### Derived bounds (stats build) + +The table gives the search time MCGS could free, as a share of playout time. +`f_value` is applied per value call and `f_policy` per expansion, because +those are what the timers cover. + +| | 1000 ms | 5000 ms | 5000 ms, Hash 16 | 5000 ms, Hash 1024 | +| --- | ---: | ---: | ---: | ---: | +| plan formula `f_value·max(0, leaf_tt − vh_hits)/value_calls + f_policy·exp_dup/expansions` | 8.96 % | 8.03 % | 7.59 % | 8.16 % | +| exact value term `f_value·leaf_tt_eval/value_calls + f_policy·exp_dup/expansions` | 9.52 % | 10.51 % | 11.28 % | 8.13 % | +| of which policy (`f_policy·exp_dup/expansions`) | 7.82 % | 8.03 % | 7.59 % | 7.75 % | +| cost upper bound `f_select + f_backprop` | 39.1 % | 42.4 % | 39.8 % | 45.1 % | + +- **The saving is mostly policy, not value.** ValueHash already answers almost + every leaf transposition. + - The value evaluations MCGS would still skip (`leaf_tt_eval`: transposed + leaves that missed ValueHash) are 2–18 % of value calls. + - They grow with GC because ValueHash is small: 64 MB / 32 / 12 B ≈ 175k + entries, so entries get overwritten. + - About 55 % of expansions repeat an already-expanded key, and those policy + calls are what MCGS saves. +- **The plan formula's value term is 0 at 5000 ms (Hash 64 and Hash 16)**, + because `vh_hits > leaf_tt` there. After GC, ValueHash also answers positions + that GC dropped from the tree, which `leaf_tt` does not count. The exact + counter `leaf_tt_eval` is the right numerator, so the second row is the bound + to use. +- **The cost bound is loose.** `select_child` is about 30 % of playout time + today. The recompute per path node costs about one more `select_child` pass, + so the real added cost is below roughly 40 %. Steps 2 and 3 measure it. None + of these bounds covers what sharing subtree statistics is worth; only the SPRT + measures that. +- **Shared structure is everywhere.** + - 96–99 % of playouts pass through a node whose key has at least two tree + nodes. + - On average there are 2.2–2.9 tree nodes per distinct position. +- **Variant 5d (window key for halfmove ≥ T).** + - No `leaf_tt` hit had halfmove ≥ 32, and 0.24–0.38 % had 16–31. So T = 16 + would lose under 0.4 % of the merges here, and T ≥ 32 none. + - That says little: every bench position starts with halfmove 0–8, so long + reversible stretches are under-represented. `r50_draws` is 0 for the same + reason. +- **Repetition draws are common: 43–48 % of playouts.** + - Position 16 (`6k1/6p1/8/6KQ/1r6/q2b4/8/8 w`) alone has 2.6M of the 3.3M at + 1000 ms and 13.9M of the 18.0M at 5000 ms. It is a perpetual-check position + where 98 % of playouts end in a repetition. + - Without it there are still 0.8M (1 s) to 4.7M (5 s) repetition-draw + playouts, mostly in positions 10–12. + - So the per-edge draw counts of 3.5 will get real use. + +### Cross-check against the ValueHash comment (37–85 %) + +The comment in `mcts.h` says 37–85 % of leaf evaluations in a 5-second search +repeat a position already evaluated. Measured `leaf_tt` over all positions: + +- 60.1 % at 1000 ms; +- 60.7 % at 5000 ms; +- 53.6 % at Hash 16; +- 66.0 % without GC. + +All four are inside the range. Per position the spread is wider, 15–98 %: + +- Low: the open middlegames 2 and 8, at 15–26 %. +- High: the pawn endgames 11 and 12 and the rook endgame 15, at 89–98 %. + +The comment does not say which positions it measured, so a wider spread per +position is plausible. `vh_hits` stays within a few points of `leaf_tt` in every +row, which is consistent with the counters being right. + +### Edges per node for the arena split (step 2) + +| measurement | `r_tree` (edges per visited node) | `r_graph` (per distinct key) | +| --- | ---: | ---: | +| 5000 ms, Hash 1024, no GC (growth ratio) | **13.0** (per position 3.6–21.0; middlegames 18.9–21.0, endgames 11/12/15 3.6–5.5) | 18.1 | +| 5000 ms, Hash 64, end of search after 153 GCs | 5.0 (2.6–12.3) | 7.4 | +| 1000 ms, Hash 64 (14 GCs) | 9.5 | 14.0 | +| 5000 ms, Hash 16 (764 GCs) | 3.1 | 4.3 | + +- With 16 B edges and 32 B nodes, the edge-to-node arena byte ratio is `r/2`: + 6.5 at r = 13, about 10 for middlegames at r ≈ 20. +- GC keeps pruned nodes and drops their edges, so `r` right after a collection + is far below the ratio at which the arenas fill between collections. +- The no-GC figure decides which arena fills first. Step 2 should size for it, + or for the middlegame value, and check that the 5000 ms Hash 64 runs do not + hit GC on the node arena first. -- 2.47.3 From 18911b0388041a2461f43ba06afb9081c4ccdcb7 Mon Sep 17 00:00:00 2001 From: rektdie Date: Mon, 16 Nov 2026 19:25:11 +0100 Subject: [PATCH 05/19] tests: add Chess960 perft suite (fischer.epd, 960 positions, D1-D6) sha256 4bc384f273d8ce9312bfde78484dce503c8d1b51b43aacc6352646b3c270b3cd. Run with: perftfile tests/fischer.epd 5 Co-Authored-By: Claude Opus 5.5 --- tests/fischer.epd | 960 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 960 insertions(+) create mode 100644 tests/fischer.epd diff --git a/tests/fischer.epd b/tests/fischer.epd new file mode 100644 index 0000000..d15d589 --- /dev/null +++ b/tests/fischer.epd @@ -0,0 +1,960 @@ +bqnb1rkr/pp3ppp/3ppn2/2p5/5P2/P2P4/NPP1P1PP/BQ1BNRKR w HFhf - 2 9 ;D1 21 ;D2 528 ;D3 12189 ;D4 326672 ;D5 8146062 ;D6 227689589 +2nnrbkr/p1qppppp/8/1ppb4/6PP/3PP3/PPP2P2/BQNNRBKR w HEhe - 1 9 ;D1 21 ;D2 807 ;D3 18002 ;D4 667366 ;D5 16253601 ;D6 590751109 +b1q1rrkb/pppppppp/3nn3/8/P7/1PPP4/4PPPP/BQNNRKRB w GE - 1 9 ;D1 20 ;D2 479 ;D3 10471 ;D4 273318 ;D5 6417013 ;D6 177654692 +qbbnnrkr/2pp2pp/p7/1p2pp2/8/P3PP2/1PPP1KPP/QBBNNR1R w hf - 0 9 ;D1 22 ;D2 593 ;D3 13440 ;D4 382958 ;D5 9183776 ;D6 274103539 +1nbbnrkr/p1p1ppp1/3p4/1p3P1p/3Pq2P/8/PPP1P1P1/QNBBNRKR w HFhf - 0 9 ;D1 28 ;D2 1120 ;D3 31058 ;D4 1171749 ;D5 34030312 ;D6 1250970898 +qnbnr1kr/ppp1b1pp/4p3/3p1p2/8/2NPP3/PPP1BPPP/QNB1R1KR w HEhe - 1 9 ;D1 29 ;D2 899 ;D3 26578 ;D4 824055 ;D5 24851983 ;D6 775718317 +q1bnrkr1/ppppp2p/2n2p2/4b1p1/2NP4/8/PPP1PPPP/QNB1RRKB w ge - 1 9 ;D1 30 ;D2 860 ;D3 24566 ;D4 732757 ;D5 21093346 ;D6 649209803 +qbn1brkr/ppp1p1p1/2n4p/3p1p2/P7/6PP/QPPPPP2/1BNNBRKR w HFhf - 0 9 ;D1 25 ;D2 635 ;D3 17054 ;D4 465806 ;D5 13203304 ;D6 377184252 +qnnbbrkr/1p2ppp1/2pp3p/p7/1P5P/2NP4/P1P1PPP1/Q1NBBRKR w HFhf - 0 9 ;D1 24 ;D2 572 ;D3 15243 ;D4 384260 ;D5 11110203 ;D6 293989890 +qn1rbbkr/ppp2p1p/1n1pp1p1/8/3P4/P6P/1PP1PPPK/QNNRBB1R w hd - 2 9 ;D1 28 ;D2 811 ;D3 23175 ;D4 679699 ;D5 19836606 ;D6 594527992 +qnr1bkrb/pppp2pp/3np3/5p2/8/P2P2P1/NPP1PP1P/QN1RBKRB w GDg - 3 9 ;D1 33 ;D2 823 ;D3 26895 ;D4 713420 ;D5 23114629 ;D6 646390782 +qb1nrkbr/1pppp1p1/1n3p2/p1B4p/8/3P1P1P/PPP1P1P1/QBNNRK1R w HEhe - 0 9 ;D1 31 ;D2 855 ;D3 25620 ;D4 735703 ;D5 21796206 ;D6 651054626 +qnnbrk1r/1p1ppbpp/2p5/p4p2/2NP3P/8/PPP1PPP1/Q1NBRKBR w HEhe - 0 9 ;D1 26 ;D2 790 ;D3 21238 ;D4 642367 ;D5 17819770 ;D6 544866674 +1qnrkbbr/1pppppp1/p1n4p/8/P7/1P1N1P2/2PPP1PP/QN1RKBBR w HDhd - 0 9 ;D1 37 ;D2 883 ;D3 32187 ;D4 815535 ;D5 29370838 ;D6 783201510 +qn1rkrbb/pp1p1ppp/2p1p3/3n4/4P2P/2NP4/PPP2PP1/Q1NRKRBB w FDfd - 1 9 ;D1 24 ;D2 585 ;D3 14769 ;D4 356950 ;D5 9482310 ;D6 233468620 +bb1qnrkr/pp1p1pp1/1np1p3/4N2p/8/1P4P1/P1PPPP1P/BBNQ1RKR w HFhf - 0 9 ;D1 29 ;D2 864 ;D3 25747 ;D4 799727 ;D5 24219627 ;D6 776836316 +bnqbnr1r/p1p1ppkp/3p4/1p4p1/P7/3NP2P/1PPP1PP1/BNQB1RKR w HF - 0 9 ;D1 26 ;D2 889 ;D3 24353 ;D4 832956 ;D5 23701014 ;D6 809194268 +bnqnrbkr/1pp2pp1/p7/3pP2p/4P1P1/8/PPPP3P/BNQNRBKR w HEhe d6 0 9 ;D1 31 ;D2 984 ;D3 28677 ;D4 962591 ;D5 29032175 ;D6 1008880643 +b1qnrrkb/ppp1pp1p/n2p1Pp1/8/8/P7/1PPPP1PP/BNQNRKRB w GE - 0 9 ;D1 20 ;D2 484 ;D3 10532 ;D4 281606 ;D5 6718715 ;D6 193594729 +n1bqnrkr/pp1ppp1p/2p5/6p1/2P2b2/PN6/1PNPPPPP/1BBQ1RKR w HFhf - 2 9 ;D1 23 ;D2 732 ;D3 17746 ;D4 558191 ;D5 14481581 ;D6 457140569 +n1bb1rkr/qpnppppp/2p5/p7/P1P5/5P2/1P1PPRPP/NQBBN1KR w Hhf - 1 9 ;D1 27 ;D2 697 ;D3 18724 ;D4 505089 ;D5 14226907 ;D6 400942568 +nqb1rbkr/pppppp1p/4n3/6p1/4P3/1NP4P/PP1P1PP1/1QBNRBKR w HEhe - 1 9 ;D1 28 ;D2 641 ;D3 18811 ;D4 456916 ;D5 13780398 ;D6 354122358 +n1bnrrkb/pp1pp2p/2p2p2/6p1/5B2/3P4/PPP1PPPP/NQ1NRKRB w GE - 2 9 ;D1 28 ;D2 606 ;D3 16883 ;D4 381646 ;D5 10815324 ;D6 254026570 +nbqnbrkr/2ppp1p1/pp3p1p/8/4N2P/1N6/PPPPPPP1/1BQ1BRKR w HFhf - 0 9 ;D1 26 ;D2 626 ;D3 17268 ;D4 437525 ;D5 12719546 ;D6 339132046 +nq1bbrkr/pp2nppp/2pp4/4p3/1PP1P3/1B6/P2P1PPP/NQN1BRKR w HFhf - 2 9 ;D1 21 ;D2 504 ;D3 11812 ;D4 302230 ;D5 7697880 ;D6 207028745 +nqnrb1kr/2pp1ppp/1p1bp3/p1B5/5P2/3N4/PPPPP1PP/NQ1R1BKR w HDhd - 0 9 ;D1 30 ;D2 672 ;D3 19307 ;D4 465317 ;D5 13454573 ;D6 345445468 +nqn2krb/p1prpppp/1pbp4/7P/5P2/8/PPPPPKP1/NQNRB1RB w g - 3 9 ;D1 21 ;D2 461 ;D3 10608 ;D4 248069 ;D5 6194124 ;D6 152861936 +nb1n1kbr/ppp1rppp/3pq3/P3p3/8/4P3/1PPPRPPP/NBQN1KBR w Hh - 1 9 ;D1 19 ;D2 566 ;D3 11786 ;D4 358337 ;D5 8047916 ;D6 249171636 +nqnbrkbr/1ppppp1p/p7/6p1/6P1/P6P/1PPPPP2/NQNBRKBR w HEhe - 1 9 ;D1 20 ;D2 382 ;D3 8694 ;D4 187263 ;D5 4708975 ;D6 112278808 +nq1rkb1r/pp1pp1pp/1n2bp1B/2p5/8/5P1P/PPPPP1P1/NQNRKB1R w HDhd - 2 9 ;D1 24 ;D2 809 ;D3 20090 ;D4 673811 ;D5 17647882 ;D6 593457788 +nqnrkrb1/pppppp2/7p/4b1p1/8/PN1NP3/1PPP1PPP/1Q1RKRBB w FDfd - 1 9 ;D1 26 ;D2 683 ;D3 18102 ;D4 473911 ;D5 13055173 ;D6 352398011 +bb1nqrkr/1pp1ppp1/pn5p/3p4/8/P2NNP2/1PPPP1PP/BB2QRKR w HFhf - 0 9 ;D1 29 ;D2 695 ;D3 21193 ;D4 552634 ;D5 17454857 ;D6 483785639 +bnn1qrkr/pp1ppp1p/2p5/b3Q1p1/8/5P1P/PPPPP1P1/BNNB1RKR w HFhf - 2 9 ;D1 44 ;D2 920 ;D3 35830 ;D4 795317 ;D5 29742670 ;D6 702867204 +bnnqrbkr/pp1p2p1/2p1p2p/5p2/1P5P/1R6/P1PPPPP1/BNNQRBK1 w Ehe - 0 9 ;D1 33 ;D2 1022 ;D3 32724 ;D4 1024721 ;D5 32898113 ;D6 1047360456 +b1nqrkrb/2pppppp/p7/1P6/1n6/P4P2/1P1PP1PP/BNNQRKRB w GEge - 0 9 ;D1 23 ;D2 638 ;D3 15744 ;D4 446539 ;D5 11735969 ;D6 344211589 +n1bnqrkr/3ppppp/1p6/pNp1b3/2P3P1/8/PP1PPP1P/NBB1QRKR w HFhf - 1 9 ;D1 29 ;D2 728 ;D3 20768 ;D4 532084 ;D5 15621236 ;D6 415766465 +n2bqrkr/p1p1pppp/1pn5/3p1b2/P6P/1NP5/1P1PPPP1/1NBBQRKR w HFhf - 3 9 ;D1 20 ;D2 533 ;D3 12152 ;D4 325059 ;D5 8088751 ;D6 223068417 +nnbqrbkr/1pp1p1p1/p2p4/5p1p/2P1P3/N7/PPQP1PPP/N1B1RBKR w HEhe - 0 9 ;D1 27 ;D2 619 ;D3 18098 ;D4 444421 ;D5 13755384 ;D6 357222394 +nnbqrkr1/pp1pp2p/2p2b2/5pp1/1P5P/4P1P1/P1PP1P2/NNBQRKRB w GEge - 1 9 ;D1 32 ;D2 1046 ;D3 33721 ;D4 1111186 ;D5 36218182 ;D6 1202830851 +nb1qbrkr/p1pppp2/1p1n2pp/8/1P6/2PN3P/P2PPPP1/NB1QBRKR w HFhf - 0 9 ;D1 25 ;D2 521 ;D3 14021 ;D4 306427 ;D5 8697700 ;D6 201455191 +nnq1brkr/pp1pppp1/8/2p4P/8/5K2/PPPbPP1P/NNQBBR1R w hf - 0 9 ;D1 23 ;D2 724 ;D3 18263 ;D4 571072 ;D5 15338230 ;D6 484638597 +nnqrbb1r/pppppk2/5pp1/7p/1P6/3P2PP/P1P1PP2/NNQRBBKR w HD - 0 9 ;D1 30 ;D2 717 ;D3 21945 ;D4 547145 ;D5 17166700 ;D6 450069742 +nnqr1krb/p1p1pppp/2bp4/8/1p1P4/4P3/PPP2PPP/NNQRBKRB w GDgd - 0 9 ;D1 25 ;D2 873 ;D3 20796 ;D4 728628 ;D5 18162741 ;D6 641708630 +nbnqrkbr/p2ppp2/1p4p1/2p4p/3P3P/3N4/PPP1PPPR/NB1QRKB1 w Ehe - 0 9 ;D1 24 ;D2 589 ;D3 15190 ;D4 382317 ;D5 10630667 ;D6 279474189 +n1qbrkbr/p1ppp2p/2n2pp1/1p6/1P6/2P3P1/P2PPP1P/NNQBRKBR w HEhe - 0 9 ;D1 22 ;D2 592 ;D3 14269 ;D4 401976 ;D5 10356818 ;D6 301583306 +2qrkbbr/ppn1pppp/n1p5/3p4/5P2/P1PP4/1P2P1PP/NNQRKBBR w HDhd - 1 9 ;D1 27 ;D2 750 ;D3 20584 ;D4 605458 ;D5 16819085 ;D6 516796736 +1nqr1rbb/pppkp1pp/1n3p2/3p4/1P6/5P1P/P1PPPKP1/NNQR1RBB w - - 1 9 ;D1 24 ;D2 623 ;D3 15921 ;D4 429446 ;D5 11594634 ;D6 322745925 +bbn1rqkr/pp1pp2p/4npp1/2p5/1P6/2BPP3/P1P2PPP/1BNNRQKR w HEhe - 0 9 ;D1 23 ;D2 730 ;D3 17743 ;D4 565340 ;D5 14496370 ;D6 468608864 +bn1brqkr/pppp2p1/3npp2/7p/PPP5/8/3PPPPP/BNNBRQKR w HEhe - 0 9 ;D1 25 ;D2 673 ;D3 17835 ;D4 513696 ;D5 14284338 ;D6 434008567 +bn1rqbkr/ppp1ppp1/1n6/2p4p/7P/3P4/PPP1PPP1/BN1RQBKR w HDhd - 0 9 ;D1 25 ;D2 776 ;D3 20562 ;D4 660217 ;D5 18486027 ;D6 616653869 +bnnr1krb/ppp2ppp/3p4/3Bp3/q1P3PP/8/PP1PPP2/BNNRQKR1 w GDgd - 0 9 ;D1 29 ;D2 1040 ;D3 30772 ;D4 1053113 ;D5 31801525 ;D6 1075147725 +1bbnrqkr/pp1ppppp/8/2p5/n7/3PNPP1/PPP1P2P/NBB1RQKR w HEhe - 1 9 ;D1 24 ;D2 598 ;D3 15673 ;D4 409766 ;D5 11394778 ;D6 310589129 +nnbbrqkr/p2ppp1p/1pp5/8/6p1/N1P5/PPBPPPPP/N1B1RQKR w HEhe - 0 9 ;D1 26 ;D2 530 ;D3 14031 ;D4 326312 ;D5 8846766 ;D6 229270702 +nnbrqbkr/2p1p1pp/p4p2/1p1p4/8/NP6/P1PPPPPP/N1BRQBKR w HDhd - 0 9 ;D1 17 ;D2 496 ;D3 10220 ;D4 303310 ;D5 7103549 ;D6 217108001 +nnbrqk1b/pp2pprp/2pp2p1/8/3PP1P1/8/PPP2P1P/NNBRQRKB w d - 1 9 ;D1 33 ;D2 820 ;D3 27856 ;D4 706784 ;D5 24714401 ;D6 645835197 +1bnrbqkr/ppnpp1p1/2p2p1p/8/1P6/4PPP1/P1PP3P/NBNRBQKR w HDhd - 0 9 ;D1 27 ;D2 705 ;D3 19760 ;D4 548680 ;D5 15964771 ;D6 464662032 +n1rbbqkr/pp1pppp1/7p/P1p5/1n6/2PP4/1P2PPPP/NNRBBQKR w HChc - 0 9 ;D1 22 ;D2 631 ;D3 14978 ;D4 431801 ;D5 10911545 ;D6 320838556 +n1rqb1kr/p1pppp1p/1pn4b/3P2p1/P7/1P6/2P1PPPP/NNRQBBKR w HChc - 0 9 ;D1 24 ;D2 477 ;D3 12506 ;D4 263189 ;D5 7419372 ;D6 165945904 +nnrqbkrb/pppp1pp1/7p/4p3/6P1/2N2B2/PPPPPP1P/NR1QBKR1 w Ggc - 2 9 ;D1 29 ;D2 658 ;D3 19364 ;D4 476620 ;D5 14233587 ;D6 373744834 +n1nrqkbr/ppb2ppp/3pp3/2p5/2P3P1/5P2/PP1PPB1P/NBNRQK1R w HDhd - 1 9 ;D1 32 ;D2 801 ;D3 25861 ;D4 681428 ;D5 22318948 ;D6 619857455 +2rbqkbr/p1pppppp/1nn5/1p6/7P/P4P2/1PPPP1PB/NNRBQK1R w HChc - 2 9 ;D1 27 ;D2 647 ;D3 18030 ;D4 458057 ;D5 13189156 ;D6 354689323 +nn1qkbbr/pp2ppp1/2rp4/2p4p/P2P4/1N5P/1PP1PPP1/1NRQKBBR w HCh - 1 9 ;D1 24 ;D2 738 ;D3 18916 ;D4 586009 ;D5 16420659 ;D6 519075930 +nnrqk1bb/p1ppp2p/5rp1/1p3p2/1P4P1/5P1P/P1PPP3/NNRQKRBB w FCc - 1 9 ;D1 25 ;D2 795 ;D3 20510 ;D4 648945 ;D5 17342527 ;D6 556144017 +bb1nrkqr/ppppn2p/4ppp1/8/1P4P1/4P3/P1PPKP1P/BBNNR1QR w he - 0 9 ;D1 29 ;D2 664 ;D3 20024 ;D4 498376 ;D5 15373803 ;D6 406016364 +bnnbrkqr/1p1ppp2/8/p1p3pp/1P6/N4P2/PBPPP1PP/2NBRKQR w HEhe - 0 9 ;D1 31 ;D2 770 ;D3 24850 ;D4 677212 ;D5 22562080 ;D6 662029574 +1nnrkbqr/p1pp1ppp/4p3/1p6/1Pb1P3/6PB/P1PP1P1P/BNNRK1QR w HDhd - 0 9 ;D1 27 ;D2 776 ;D3 22133 ;D4 641002 ;D5 19153245 ;D6 562738257 +bnr1kqrb/pppp1pp1/1n5p/4p3/P3P3/3P2P1/1PP2P1P/BNNRKQRB w GDg - 0 9 ;D1 26 ;D2 624 ;D3 16411 ;D4 435426 ;D5 11906515 ;D6 338092952 +nbbnrkqr/p1ppp1pp/1p3p2/8/2P5/4P3/PP1P1PPP/NBBNRKQR w HEhe - 1 9 ;D1 25 ;D2 624 ;D3 15561 ;D4 419635 ;D5 10817378 ;D6 311138112 +nn1brkqr/pp1bpppp/8/2pp4/P4P2/1PN5/2PPP1PP/N1BBRKQR w HEhe - 1 9 ;D1 23 ;D2 659 ;D3 16958 ;D4 476567 ;D5 13242252 ;D6 373557073 +n1brkbqr/ppp1pp1p/6pB/3p4/2Pn4/8/PP2PPPP/NN1RKBQR w HDhd - 0 9 ;D1 32 ;D2 1026 ;D3 30360 ;D4 978278 ;D5 29436320 ;D6 957904151 +nnbrkqrb/p2ppp2/Q5pp/1pp5/4PP2/2N5/PPPP2PP/N1BRK1RB w GDgd - 0 9 ;D1 36 ;D2 843 ;D3 29017 ;D4 715537 ;D5 24321197 ;D6 630396940 +nbnrbk1r/pppppppq/8/7p/8/1N2QPP1/PPPPP2P/NB1RBK1R w HDhd - 2 9 ;D1 36 ;D2 973 ;D3 35403 ;D4 1018054 ;D5 37143354 ;D6 1124883780 +nnrbbkqr/2pppp1p/p7/6p1/1p2P3/4QPP1/PPPP3P/NNRBBK1R w HChc - 0 9 ;D1 36 ;D2 649 ;D3 22524 ;D4 489526 ;D5 16836636 ;D6 416139320 +nnrkbbqr/1p2pppp/p2p4/2p5/8/1N2P1P1/PPPP1P1P/1NKRBBQR w hc - 0 9 ;D1 26 ;D2 672 ;D3 18136 ;D4 477801 ;D5 13342771 ;D6 363074681 +n1rkbqrb/pp1ppp2/2n3p1/2p4p/P5PP/1P6/2PPPP2/NNRKBQRB w GCgc - 0 9 ;D1 24 ;D2 804 ;D3 20712 ;D4 684001 ;D5 18761475 ;D6 617932151 +nbkr1qbr/1pp1pppp/pn1p4/8/3P2P1/5R2/PPP1PP1P/NBN1KQBR w H - 2 9 ;D1 30 ;D2 627 ;D3 18669 ;D4 423329 ;D5 12815016 ;D6 312798696 +nnr1kqbr/pp1pp1p1/2p5/b4p1p/P7/1PNP4/2P1PPPP/N1RBKQBR w HChc - 1 9 ;D1 12 ;D2 421 ;D3 6530 ;D4 227044 ;D5 4266410 ;D6 149176979 +n1rkqbbr/p1pp1pp1/np2p2p/8/8/N4PP1/PPPPP1BP/N1RKQ1BR w HChc - 0 9 ;D1 27 ;D2 670 ;D3 19119 ;D4 494690 ;D5 14708490 ;D6 397268628 +nnr1qrbb/p2kpppp/1p1p4/2p5/6P1/PP1P4/2P1PP1P/NNRKQRBB w FC - 0 9 ;D1 27 ;D2 604 ;D3 17043 ;D4 409665 ;D5 11993332 ;D6 308518181 +bbnnrkrq/ppp1pp2/6p1/3p4/7p/7P/PPPPPPP1/BBNNRRKQ w ge - 0 9 ;D1 20 ;D2 559 ;D3 12242 ;D4 355326 ;D5 8427161 ;D6 252274233 +bnnbrkr1/ppp2p1p/5q2/3pp1p1/4P3/1N4P1/PPPPRP1P/BN1B1KRQ w Gge - 0 9 ;D1 26 ;D2 1036 ;D3 27228 ;D4 1028084 ;D5 28286576 ;D6 1042120495 +bn1rkbrq/1pppppp1/p6p/1n6/3P4/6PP/PPPRPP2/BNN1KBRQ w Ggd - 2 9 ;D1 29 ;D2 633 ;D3 19278 ;D4 455476 ;D5 14333034 ;D6 361900466 +b1nrkrqb/1p1npppp/p2p4/2p5/5P2/4P2P/PPPP1RP1/BNNRK1QB w Dfd - 1 9 ;D1 25 ;D2 475 ;D3 12603 ;D4 270909 ;D5 7545536 ;D6 179579818 +1bbnrkrq/ppppppp1/8/7p/1n4P1/1PN5/P1PPPP1P/NBBR1KRQ w Gge - 0 9 ;D1 30 ;D2 803 ;D3 25473 ;D4 709716 ;D5 23443854 ;D6 686365049 +nnbbrkrq/2pp1pp1/1p5p/pP2p3/7P/N7/P1PPPPP1/N1BBRKRQ w GEge - 0 9 ;D1 18 ;D2 432 ;D3 9638 ;D4 242350 ;D5 6131124 ;D6 160393505 +nnbrkbrq/1pppp1p1/p7/7p/1P2Pp2/BN6/P1PP1PPP/1N1RKBRQ w GDgd - 0 9 ;D1 27 ;D2 482 ;D3 13441 ;D4 282259 ;D5 8084701 ;D6 193484216 +n1brkrqb/pppp3p/n3pp2/6p1/3P1P2/N1P5/PP2P1PP/N1BRKRQB w FDfd - 0 9 ;D1 28 ;D2 642 ;D3 19005 ;D4 471729 ;D5 14529434 ;D6 384837696 +nbnrbk2/p1pppp1p/1p3qr1/6p1/1B1P4/1N6/PPP1PPPP/1BNR1RKQ w d - 2 9 ;D1 30 ;D2 796 ;D3 22780 ;D4 687302 ;D5 20120565 ;D6 641832725 +nnrbbrkq/1pp2ppp/3p4/p3p3/3P1P2/1P2P3/P1P3PP/NNRBBKRQ w GC - 1 9 ;D1 31 ;D2 827 ;D3 24538 ;D4 663082 ;D5 19979594 ;D6 549437308 +nnrkbbrq/1pp2p1p/p2pp1p1/2P5/8/8/PP1PPPPP/NNRKBBRQ w Ggc - 0 9 ;D1 24 ;D2 762 ;D3 19283 ;D4 624598 ;D5 16838099 ;D6 555230555 +nnr1brqb/1ppkp1pp/8/p2p1p2/1P1P4/N1P5/P3PPPP/N1RKBRQB w FC - 1 9 ;D1 23 ;D2 640 ;D3 15471 ;D4 444905 ;D5 11343507 ;D6 334123513 +nbnrkrbq/2ppp2p/p4p2/1P4p1/4PP2/8/1PPP2PP/NBNRKRBQ w FDfd - 0 9 ;D1 31 ;D2 826 ;D3 26137 ;D4 732175 ;D5 23555139 ;D6 686250413 +1nrbkr1q/1pppp1pp/1n6/p4p2/N1b4P/8/PPPPPPPB/N1RBKR1Q w FCfc - 2 9 ;D1 27 ;D2 862 ;D3 24141 ;D4 755171 ;D5 22027695 ;D6 696353497 +nnrkrbbq/pppp2pp/8/4pp2/4P3/P7/1PPPBPPP/NNKRR1BQ w c - 0 9 ;D1 25 ;D2 792 ;D3 19883 ;D4 636041 ;D5 16473376 ;D6 532214177 +n1rk1qbb/pppprpp1/2n4p/4p3/2PP3P/8/PP2PPP1/NNRKRQBB w ECc - 1 9 ;D1 25 ;D2 622 ;D3 16031 ;D4 425247 ;D5 11420973 ;D6 321855685 +bbq1rnkr/pnp1pp1p/1p1p4/6p1/2P5/2Q1P2P/PP1P1PP1/BB1NRNKR w HEhe - 2 9 ;D1 36 ;D2 870 ;D3 30516 ;D4 811047 ;D5 28127620 ;D6 799738334 +bq1brnkr/1p1ppp1p/1np5/p5p1/8/1N5P/PPPPPPP1/BQ1BRNKR w HEhe - 0 9 ;D1 22 ;D2 588 ;D3 13524 ;D4 380068 ;D5 9359618 ;D6 273795898 +bq1rn1kr/1pppppbp/Nn4p1/8/8/P7/1PPPPPPP/BQ1RNBKR w HDhd - 1 9 ;D1 24 ;D2 711 ;D3 18197 ;D4 542570 ;D5 14692779 ;D6 445827351 +bqnr1kr1/pppppp1p/6p1/5n2/4B3/3N2PP/PbPPPP2/BQNR1KR1 w GDgd - 2 9 ;D1 31 ;D2 1132 ;D3 36559 ;D4 1261476 ;D5 43256823 ;D6 1456721391 +qbb1rnkr/ppp3pp/4n3/3ppp2/1P3PP1/8/P1PPPN1P/QBB1RNKR w HEhe - 0 9 ;D1 28 ;D2 696 ;D3 20502 ;D4 541886 ;D5 16492398 ;D6 456983120 +qnbbr1kr/pp1ppp1p/4n3/6p1/2p3P1/2PP1P2/PP2P2P/QNBBRNKR w HEhe - 0 9 ;D1 25 ;D2 655 ;D3 16520 ;D4 450189 ;D5 11767038 ;D6 335414976 +1nbrnbkr/p1ppp1pp/1p6/5p2/4q1PP/3P4/PPP1PP2/QNBRNBKR w HDhd - 1 9 ;D1 30 ;D2 1162 ;D3 33199 ;D4 1217278 ;D5 36048727 ;D6 1290346802 +q1brnkrb/p1pppppp/n7/1p6/P7/3P1P2/QPP1P1PP/1NBRNKRB w GDgd - 0 9 ;D1 32 ;D2 827 ;D3 26106 ;D4 718243 ;D5 23143989 ;D6 673147648 +qbnrb1kr/ppp1pp1p/3p4/2n3p1/1P6/6N1/P1PPPPPP/QBNRB1KR w HDhd - 2 9 ;D1 29 ;D2 751 ;D3 23132 ;D4 610397 ;D5 19555214 ;D6 530475036 +q1rbbnkr/pppp1p2/2n3pp/2P1p3/3P4/8/PP1NPPPP/Q1RBBNKR w HChc - 2 9 ;D1 29 ;D2 806 ;D3 24540 ;D4 687251 ;D5 21694330 ;D6 619907316 +q1r1bbkr/pnpp1ppp/2n1p3/1p6/2P2P2/2N1N3/PP1PP1PP/Q1R1BBKR w HChc - 2 9 ;D1 32 ;D2 1017 ;D3 32098 ;D4 986028 ;D5 31204371 ;D6 958455898 +2rnbkrb/pqppppp1/1pn5/7p/2P5/P1R5/QP1PPPPP/1N1NBKRB w Ggc - 4 9 ;D1 26 ;D2 625 ;D3 16506 ;D4 434635 ;D5 11856964 ;D6 336672890 +qbnr1kbr/p2ppppp/2p5/1p6/4n2P/P4N2/1PPP1PP1/QBNR1KBR w HDhd - 0 9 ;D1 27 ;D2 885 ;D3 23828 ;D4 767273 ;D5 21855658 ;D6 706272554 +qnrbnk1r/pp1pp2p/5p2/2pbP1p1/3P4/1P6/P1P2PPP/QNRBNKBR w HChc - 0 9 ;D1 26 ;D2 954 ;D3 24832 ;D4 892456 ;D5 24415089 ;D6 866744329 +qnrnk1br/p1p2ppp/8/1pbpp3/8/PP2N3/1QPPPPPP/1NR1KBBR w HChc - 0 9 ;D1 26 ;D2 783 ;D3 20828 ;D4 634267 ;D5 17477825 ;D6 539674275 +qnrnkrbb/Bpppp2p/6p1/5p2/5P2/3PP3/PPP3PP/QNRNKR1B w FCfc - 1 9 ;D1 28 ;D2 908 ;D3 25730 ;D4 861240 ;D5 25251641 ;D6 869525254 +bbnqrn1r/ppppp2k/5p2/6pp/7P/1QP5/PP1PPPP1/B1N1RNKR w HE - 0 9 ;D1 33 ;D2 643 ;D3 21790 ;D4 487109 ;D5 16693640 ;D6 410115900 +b1qbrnkr/ppp1pp2/2np4/6pp/4P3/2N4P/PPPP1PP1/BQ1BRNKR w HEhe - 0 9 ;D1 28 ;D2 837 ;D3 24253 ;D4 745617 ;D5 22197063 ;D6 696399065 +bnqr1bkr/pp1ppppp/2p5/4N3/5P2/P7/1PPPPnPP/BNQR1BKR w HDhd - 3 9 ;D1 25 ;D2 579 ;D3 13909 ;D4 341444 ;D5 8601011 ;D6 225530258 +b1qr1krb/pp1ppppp/n2n4/8/2p5/2P3P1/PP1PPP1P/BNQRNKRB w GDgd - 0 9 ;D1 28 ;D2 707 ;D3 19721 ;D4 549506 ;D5 15583376 ;D6 468399900 +nbbqr1kr/1pppp1pp/8/p1n2p2/4P3/PN6/1PPPQPPP/1BB1RNKR w HEhe - 0 9 ;D1 30 ;D2 745 ;D3 23416 ;D4 597858 ;D5 19478789 ;D6 515473678 +nqbbrn1r/p1pppp1k/1p4p1/7p/4P3/1R3B2/PPPP1PPP/NQB2NKR w H - 0 9 ;D1 24 ;D2 504 ;D3 13512 ;D4 317355 ;D5 9002073 ;D6 228726497 +nqbr1bkr/p1p1ppp1/1p1n4/3pN2p/1P6/8/P1PPPPPP/NQBR1BKR w HDhd - 0 9 ;D1 29 ;D2 898 ;D3 26532 ;D4 809605 ;D5 24703467 ;D6 757166494 +nqbrn1rb/pppp1kp1/5p1p/4p3/P4B2/3P2P1/1PP1PP1P/NQ1RNKRB w GD - 0 9 ;D1 34 ;D2 671 ;D3 22332 ;D4 473110 ;D5 15556806 ;D6 353235120 +nb1r1nkr/ppp1ppp1/2bp4/7p/3P2qP/P6R/1PP1PPP1/NBQRBNK1 w Dhd - 1 9 ;D1 38 ;D2 1691 ;D3 60060 ;D4 2526992 ;D5 88557078 ;D6 3589649998 +n1rbbnkr/1p1pp1pp/p7/2p1qp2/1B3P2/3P4/PPP1P1PP/NQRB1NKR w HChc - 0 9 ;D1 24 ;D2 913 ;D3 21595 ;D4 807544 ;D5 19866918 ;D6 737239330 +nqrnbbkr/p2p1p1p/1pp5/1B2p1p1/1P3P2/4P3/P1PP2PP/NQRNB1KR w HChc - 0 9 ;D1 33 ;D2 913 ;D3 30159 ;D4 843874 ;D5 28053260 ;D6 804687975 +nqr1bkrb/ppp1pp2/2np2p1/P6p/8/2P4P/1P1PPPP1/NQRNBKRB w GCgc - 0 9 ;D1 24 ;D2 623 ;D3 16569 ;D4 442531 ;D5 12681936 ;D6 351623879 +nb1rnkbr/pqppppp1/1p5p/8/1PP4P/8/P2PPPP1/NBQRNKBR w HDhd - 1 9 ;D1 31 ;D2 798 ;D3 24862 ;D4 694386 ;D5 22616076 ;D6 666227466 +nqrbnkbr/2p1p1pp/3p4/pp3p2/6PP/3P1N2/PPP1PP2/NQRB1KBR w HChc - 0 9 ;D1 24 ;D2 590 ;D3 14409 ;D4 383690 ;D5 9698432 ;D6 274064911 +nqrnkbbr/pp1p1p1p/4p1p1/1p6/8/5P1P/P1PPP1P1/NQRNKBBR w HChc - 0 9 ;D1 30 ;D2 1032 ;D3 31481 ;D4 1098116 ;D5 34914919 ;D6 1233362066 +nqrnkrbb/p2ppppp/1p6/2p5/2P3P1/5P2/PP1PPN1P/NQR1KRBB w FCfc - 1 9 ;D1 30 ;D2 775 ;D3 23958 ;D4 668000 ;D5 21141738 ;D6 621142773 +bbnrqrk1/pp2pppp/4n3/2pp4/P7/1N5P/BPPPPPP1/B2RQNKR w HD - 2 9 ;D1 23 ;D2 708 ;D3 17164 ;D4 554089 ;D5 14343443 ;D6 481405144 +bnr1qnkr/p1pp1p1p/1p4p1/4p1b1/2P1P3/1P6/PB1P1PPP/1NRBQNKR w HChc - 1 9 ;D1 30 ;D2 931 ;D3 29249 ;D4 921746 ;D5 30026687 ;D6 968109774 +b1rqnbkr/ppp1ppp1/3p3p/2n5/P3P3/2NP4/1PP2PPP/B1RQNBKR w HChc - 0 9 ;D1 24 ;D2 596 ;D3 15533 ;D4 396123 ;D5 11099382 ;D6 294180723 +bnrqnr1b/pp1pkppp/2p1p3/P7/2P5/7P/1P1PPPP1/BNRQNKRB w GC - 0 9 ;D1 24 ;D2 572 ;D3 15293 ;D4 390903 ;D5 11208688 ;D6 302955778 +n1brq1kr/bppppppp/p7/8/4P1Pn/8/PPPP1P2/NBBRQNKR w HDhd - 0 9 ;D1 20 ;D2 570 ;D3 13139 ;D4 371247 ;D5 9919113 ;D6 284592289 +1rbbqnkr/ppn1ppp1/3p3p/2p5/3P4/1N4P1/PPPBPP1P/1R1BQNKR w HBhb - 0 9 ;D1 29 ;D2 1009 ;D3 29547 ;D4 1040816 ;D5 31059587 ;D6 1111986835 +nrbq2kr/ppppppb1/5n1p/5Pp1/8/P5P1/1PPPP2P/NRBQNBKR w HBhb - 1 9 ;D1 20 ;D2 520 ;D3 11745 ;D4 316332 ;D5 7809837 ;D6 216997152 +nrb1nkrb/pp3ppp/1qBpp3/2p5/8/P5P1/1PPPPP1P/NRBQNKR1 w GBgb - 2 9 ;D1 32 ;D2 850 ;D3 25642 ;D4 734088 ;D5 21981567 ;D6 664886187 +1br1bnkr/ppqppp1p/1np3p1/8/1PP4P/4N3/P2PPPP1/NBRQB1KR w HChc - 1 9 ;D1 32 ;D2 798 ;D3 24765 ;D4 691488 ;D5 22076141 ;D6 670296871 +nrqbb1kr/1p1pp1pp/2p3n1/p4p2/3PP3/P5N1/1PP2PPP/NRQBB1KR w HBhb - 0 9 ;D1 32 ;D2 791 ;D3 26213 ;D4 684890 ;D5 23239122 ;D6 634260266 +nrqn1bkr/ppppp1pp/4b3/8/4P1p1/5P2/PPPP3P/NRQNBBKR w HBhb - 0 9 ;D1 29 ;D2 687 ;D3 20223 ;D4 506088 ;D5 15236287 ;D6 398759980 +nrqnbrkb/pppp1p2/4p2p/3B2p1/8/1P4P1/PQPPPP1P/NR1NBKR1 w GB - 0 9 ;D1 37 ;D2 764 ;D3 27073 ;D4 610950 ;D5 21284835 ;D6 514864869 +nbrq1kbr/Bp3ppp/2pnp3/3p4/5P2/2P4P/PP1PP1P1/NBRQNK1R w HChc - 0 9 ;D1 40 ;D2 1271 ;D3 48022 ;D4 1547741 ;D5 56588117 ;D6 1850696281 +nrqbnkbr/1p2ppp1/p1p4p/3p4/1P6/8/PQPPPPPP/1RNBNKBR w HBhb - 0 9 ;D1 28 ;D2 757 ;D3 23135 ;D4 668025 ;D5 21427496 ;D6 650939962 +nrqn1bbr/2ppkppp/4p3/pB6/8/2P1P3/PP1P1PPP/NRQNK1BR w HB - 1 9 ;D1 27 ;D2 642 ;D3 17096 ;D4 442653 ;D5 11872805 ;D6 327545120 +nrqnkrb1/p1ppp2p/1p4p1/4bp2/4PP1P/4N3/PPPP2P1/NRQ1KRBB w FBfb - 1 9 ;D1 27 ;D2 958 ;D3 27397 ;D4 960350 ;D5 28520172 ;D6 995356563 +1bnrnqkr/pbpp2pp/8/1p2pp2/P6P/3P1N2/1PP1PPP1/BBNR1QKR w HDhd - 0 9 ;D1 27 ;D2 859 ;D3 23475 ;D4 773232 ;D5 21581178 ;D6 732696327 +b1rbnqkr/1pp1ppp1/2n4p/p2p4/5P2/1PBP4/P1P1P1PP/1NRBNQKR w HChc - 0 9 ;D1 26 ;D2 545 ;D3 14817 ;D4 336470 ;D5 9537260 ;D6 233549184 +1nrnqbkr/p1pppppp/1p6/8/2b2P2/P1N5/1PP1P1PP/BNR1QBKR w HChc - 2 9 ;D1 24 ;D2 668 ;D3 17716 ;D4 494866 ;D5 14216070 ;D6 406225409 +1nrnqkrb/2ppp1pp/p7/1p3p2/5P2/N5K1/PPPPP2P/B1RNQ1RB w gc - 0 9 ;D1 33 ;D2 725 ;D3 23572 ;D4 559823 ;D5 18547476 ;D6 471443091 +nbbr1qkr/p1pppppp/8/1p1n4/3P4/1N3PP1/PPP1P2P/1BBRNQKR w HDhd - 1 9 ;D1 28 ;D2 698 ;D3 20527 ;D4 539625 ;D5 16555068 ;D6 458045505 +1rbbnqkr/1pnppp1p/p5p1/2p5/2P4P/5P2/PP1PP1PR/NRBBNQK1 w Bhb - 1 9 ;D1 24 ;D2 554 ;D3 14221 ;D4 362516 ;D5 9863080 ;D6 269284081 +nrb1qbkr/2pppppp/2n5/p7/2p5/4P3/PPNP1PPP/1RBNQBKR w HBhb - 0 9 ;D1 23 ;D2 618 ;D3 15572 ;D4 443718 ;D5 12044358 ;D6 360311412 +nrb1qkrb/2ppppp1/p3n3/1p1B3p/2P5/6P1/PP1PPPRP/NRBNQK2 w Bgb - 2 9 ;D1 27 ;D2 593 ;D3 16770 ;D4 401967 ;D5 11806808 ;D6 303338935 +nbrn1qkr/ppp1pp2/3p2p1/3Q3P/b7/8/PPPPPP1P/NBRNB1KR w HChc - 2 9 ;D1 39 ;D2 1056 ;D3 40157 ;D4 1133446 ;D5 42201531 ;D6 1239888683 +nr1bbqkr/pp1pp2p/1n3pp1/2p5/8/1P4P1/P1PPPPQP/NRNBBK1R w hb - 0 9 ;D1 25 ;D2 585 ;D3 15719 ;D4 406544 ;D5 11582539 ;D6 320997679 +nr2bbkr/ppp1pppp/1n1p4/8/6PP/1NP4q/PP1PPP2/1RNQBBKR w HBhb - 1 9 ;D1 22 ;D2 742 ;D3 15984 ;D4 545231 ;D5 13287051 ;D6 457010195 +1rnqbkrb/ppp1p1p1/1n3p2/3p3p/P6P/4P3/1PPP1PP1/NRNQBRKB w gb - 0 9 ;D1 22 ;D2 574 ;D3 14044 ;D4 379648 ;D5 9968830 ;D6 281344367 +nb1rqkbr/1pppp1pp/4n3/p4p2/6PP/5P2/PPPPPN2/NBR1QKBR w HCh - 0 9 ;D1 25 ;D2 621 ;D3 16789 ;D4 462600 ;D5 13378840 ;D6 396575613 +nrnbqkbr/2pp2pp/4pp2/pp6/8/1P3P2/P1PPPBPP/NRNBQ1KR w hb - 0 9 ;D1 25 ;D2 656 ;D3 16951 ;D4 466493 ;D5 12525939 ;D6 358763789 +nrnqkbbr/ppppp1p1/7p/5p2/8/P4PP1/NPPPP2P/NR1QKBBR w HBhb - 0 9 ;D1 28 ;D2 723 ;D3 20621 ;D4 547522 ;D5 15952533 ;D6 439046803 +1rnqkr1b/ppppp2p/1n3pp1/8/2P3P1/Pb1N4/1P1PPP1P/NR1QKRBB w FBfb - 0 9 ;D1 26 ;D2 713 ;D3 19671 ;D4 548875 ;D5 15865528 ;D6 454532806 +bbnrnkqr/1pppp1pp/5p2/p7/7P/1P6/PBPPPPPR/1BNRNKQ1 w D - 2 9 ;D1 26 ;D2 649 ;D3 17834 ;D4 502279 ;D5 14375839 ;D6 435585252 +bnrbk1qr/1ppp1ppp/p2np3/8/P7/2N2P2/1PPPP1PP/B1RBNKQR w HC - 0 9 ;D1 26 ;D2 621 ;D3 17569 ;D4 451452 ;D5 13514201 ;D6 364421088 +br1nkbqr/ppppppp1/8/n6p/8/N1P2PP1/PP1PP2P/B1RNKBQR w HCh - 1 9 ;D1 29 ;D2 664 ;D3 20182 ;D4 512316 ;D5 16125924 ;D6 442508159 +bnr1kqrb/pp1pppp1/2n5/2p5/1P4Pp/4N3/P1PPPP1P/BNKR1QRB w gc - 0 9 ;D1 36 ;D2 888 ;D3 31630 ;D4 789863 ;D5 27792175 ;D6 719015345 +1bbrnkqr/pp1p1ppp/2p1p3/1n6/5P2/3Q4/PPPPP1PP/NBBRNK1R w HDhd - 2 9 ;D1 36 ;D2 891 ;D3 31075 ;D4 781792 ;D5 26998966 ;D6 702903862 +nrbbnk1r/pp2pppq/8/2pp3p/3P2P1/1N6/PPP1PP1P/1RBBNKQR w HBhb - 0 9 ;D1 29 ;D2 1036 ;D3 31344 ;D4 1139166 ;D5 35627310 ;D6 1310683359 +nr1nkbqr/ppp3pp/5p2/3pp3/6b1/3PP3/PPP2PPP/NRBNKBQR w hb - 0 9 ;D1 18 ;D2 664 ;D3 13306 ;D4 483892 ;D5 10658989 ;D6 386307449 +nrbnk1rb/ppp1pq1p/3p4/5pp1/2P1P3/1N6/PP1PKPPP/1RBN1QRB w gb - 2 9 ;D1 25 ;D2 966 ;D3 24026 ;D4 920345 ;D5 23957242 ;D6 913710194 +1brnbkqr/pppppp2/6p1/7p/1Pn5/P1NP4/2P1PPPP/NBR1BKQR w HChc - 0 9 ;D1 22 ;D2 627 ;D3 13760 ;D4 395829 ;D5 9627826 ;D6 285900573 +nrnbbk1r/p1pppppq/8/7p/1p6/P5PP/1PPPPPQ1/NRNBBK1R w HBhb - 2 9 ;D1 29 ;D2 888 ;D3 26742 ;D4 874270 ;D5 27229468 ;D6 930799376 +n1nkb1qr/prppppbp/6p1/1p6/2P2P2/P7/1P1PP1PP/NRNKBBQR w HBh - 1 9 ;D1 29 ;D2 804 ;D3 24701 ;D4 688520 ;D5 21952444 ;D6 623156747 +nr2bqrb/ppkpp1pp/1np5/5p1P/5P2/2P5/PP1PP1P1/NRNKBQRB w GB - 0 9 ;D1 22 ;D2 530 ;D3 13055 ;D4 347657 ;D5 9244693 ;D6 264088392 +nbr1kqbr/p3pppp/2ppn3/1p4P1/4P3/1P6/P1PP1P1P/NBRNKQBR w HChc - 1 9 ;D1 23 ;D2 555 ;D3 14291 ;D4 350917 ;D5 9692630 ;D6 247479180 +nr1bkqbr/1p1pp1pp/pnp2p2/8/6P1/P1PP4/1P2PP1P/NRNBKQBR w HBhb - 0 9 ;D1 22 ;D2 565 ;D3 13343 ;D4 365663 ;D5 9305533 ;D6 268612479 +nr1kqbbr/np2pppp/p1p5/1B1p1P2/8/4P3/PPPP2PP/NRNKQ1BR w HBhb - 0 9 ;D1 32 ;D2 730 ;D3 23391 ;D4 556995 ;D5 18103280 ;D6 454569900 +nrnk1rbb/p1p2ppp/3pq3/Qp2p3/1P1P4/8/P1P1PPPP/NRN1KRBB w fb - 2 9 ;D1 28 ;D2 873 ;D3 25683 ;D4 791823 ;D5 23868737 ;D6 747991356 +bbnrnkrq/pp1ppp1p/6p1/2p5/6P1/P5RP/1PPPPP2/BBNRNK1Q w Dgd - 3 9 ;D1 37 ;D2 1260 ;D3 45060 ;D4 1542086 ;D5 54843403 ;D6 1898432768 +bnrb1rkq/ppnpppp1/3Q4/2p4p/7P/N7/PPPPPPP1/B1RBNKR1 w GC - 2 9 ;D1 38 ;D2 878 ;D3 31944 ;D4 800440 ;D5 28784300 ;D6 784569826 +bnrnkbrq/p1ppppp1/1p5p/8/P2PP3/5P2/1PP3PP/BNRNKBRQ w GCgc - 1 9 ;D1 26 ;D2 617 ;D3 16992 ;D4 419099 ;D5 11965544 ;D6 311309576 +bnrnkrqb/pp2p2p/2pp1pp1/8/P7/2PP1P2/1P2P1PP/BNRNKRQB w FCfc - 0 9 ;D1 26 ;D2 721 ;D3 19726 ;D4 560824 ;D5 15966934 ;D6 467132503 +nbbrnkr1/1pppp1p1/p6q/P4p1p/8/5P2/1PPPP1PP/NBBRNRKQ w gd - 2 9 ;D1 18 ;D2 556 ;D3 10484 ;D4 316634 ;D5 6629293 ;D6 202528241 +nrb1nkrq/2pp1ppp/p4b2/1p2p3/P4B2/3P4/1PP1PPPP/NR1BNRKQ w gb - 0 9 ;D1 24 ;D2 562 ;D3 14017 ;D4 355433 ;D5 9227883 ;D6 247634489 +nrbnkbrq/p3p1pp/1p6/2pp1P2/8/3PP3/PPP2P1P/NRBNKBRQ w GBgb - 0 9 ;D1 31 ;D2 746 ;D3 24819 ;D4 608523 ;D5 21019301 ;D6 542954168 +nrbnkrqb/pppp1p1p/4p1p1/8/7P/2P1P3/PPNP1PP1/1RBNKRQB w FBfb - 0 9 ;D1 20 ;D2 459 ;D3 9998 ;D4 242762 ;D5 5760165 ;D6 146614723 +nbrn1krq/ppp1p2p/6b1/3p1pp1/8/4N1PP/PPPPPP2/NBR1BRKQ w gc - 1 9 ;D1 27 ;D2 835 ;D3 23632 ;D4 766397 ;D5 22667987 ;D6 760795567 +nrnbbkrq/p1pp2pp/5p2/1p6/2P1pP1B/1P6/P2PP1PP/NRNB1KRQ w GBgb - 0 9 ;D1 24 ;D2 646 ;D3 16102 ;D4 444472 ;D5 11489727 ;D6 324948755 +nrn1bbrq/1ppkppp1/p2p3p/8/1P3N2/4P3/P1PP1PPP/NR1KBBRQ w GB - 2 9 ;D1 32 ;D2 591 ;D3 18722 ;D4 381683 ;D5 12069159 ;D6 269922838 +n1krbrqb/1ppppppp/p7/8/4n3/P4P1P/1PPPPQP1/NRNKBR1B w FB - 2 9 ;D1 26 ;D2 639 ;D3 16988 ;D4 417190 ;D5 12167153 ;D6 312633873 +n1rnkrbq/1p1ppp1p/8/p1p1b1p1/3PQ1P1/4N3/PPP1PP1P/NBR1KRB1 w FCfc - 0 9 ;D1 35 ;D2 1027 ;D3 35731 ;D4 1040417 ;D5 35738410 ;D6 1060661628 +nrnbkrbq/2pp1pp1/pp6/4p2p/P7/5PPP/1PPPP3/NRNBKRBQ w FBfb - 0 9 ;D1 26 ;D2 628 ;D3 16731 ;D4 436075 ;D5 11920087 ;D6 331498921 +1rnkrbbq/pp1p2pp/1n3p2/1Bp1p3/1P6/1N2P3/P1PP1PPP/1RNKR1BQ w EBeb - 0 9 ;D1 33 ;D2 992 ;D3 32244 ;D4 983481 ;D5 31703749 ;D6 980306735 +nr1krqbb/p1ppppp1/8/1p5p/1Pn5/5P2/P1PPP1PP/NRNKRQBB w EBeb - 0 9 ;D1 24 ;D2 670 ;D3 15985 ;D4 445492 ;D5 11371067 ;D6 325556465 +bbq1rkr1/1ppppppp/p1n2n2/8/2P2P2/1P6/PQ1PP1PP/BB1NRKNR w HEe - 3 9 ;D1 32 ;D2 794 ;D3 26846 ;D4 689334 ;D5 24085223 ;D6 645633370 +b1nbrknr/1qppp1pp/p4p2/1p6/6P1/P2NP3/1PPP1P1P/BQ1BRKNR w HEhe - 1 9 ;D1 25 ;D2 663 ;D3 17138 ;D4 482994 ;D5 13157826 ;D6 389603029 +bqnrk1nr/pp2ppbp/6p1/2pp4/2P5/5P2/PPQPP1PP/B1NRKBNR w HDhd - 0 9 ;D1 26 ;D2 850 ;D3 22876 ;D4 759768 ;D5 21341087 ;D6 719712622 +bqnrknrb/1ppp1p1p/p7/6p1/1P2p3/P1PN4/3PPPPP/BQ1RKNRB w GDgd - 0 9 ;D1 25 ;D2 721 ;D3 19290 ;D4 581913 ;D5 16391601 ;D6 511725087 +q1b1rknr/pp1pppp1/4n2p/2p1b3/1PP5/4P3/PQ1P1PPP/1BBNRKNR w HEhe - 1 9 ;D1 32 ;D2 975 ;D3 32566 ;D4 955493 ;D5 32649943 ;D6 962536105 +qnbbrknr/1p1ppppp/8/p1p5/5P2/PP1P4/2P1P1PP/QNBBRKNR w HEhe - 0 9 ;D1 27 ;D2 573 ;D3 16331 ;D4 391656 ;D5 11562434 ;D6 301166330 +q1brkb1r/p1pppppp/np3B2/8/6n1/1P5N/P1PPPPPP/QN1RKB1R w HDhd - 0 9 ;D1 32 ;D2 984 ;D3 31549 ;D4 1007217 ;D5 32597704 ;D6 1075429389 +qn1rk1rb/p1pppppp/1p2n3/8/2b5/4NPP1/PPPPP1RP/QNBRK2B w Dgd - 4 9 ;D1 22 ;D2 802 ;D3 19156 ;D4 697722 ;D5 17761431 ;D6 650603534 +qbnrbknr/ppp2p1p/8/3pp1p1/1PP1B3/5N2/P2PPPPP/Q1NRBK1R w HDhd - 0 9 ;D1 34 ;D2 943 ;D3 32506 ;D4 930619 ;D5 32523099 ;D6 955802240 +qnrbb1nr/pp1p1ppp/2p2k2/4p3/4P3/5PPP/PPPP4/QNRBBKNR w HC - 0 9 ;D1 20 ;D2 460 ;D3 10287 ;D4 241640 ;D5 5846781 ;D6 140714047 +qnr1bbnr/ppk1p1pp/3p4/2p2p2/8/2P5/PP1PPPPP/QNKRBBNR w - - 1 9 ;D1 19 ;D2 572 ;D3 11834 ;D4 357340 ;D5 7994547 ;D6 243724815 +qnrkbnrb/1p1p1ppp/2p5/4p3/p7/N1BP4/PPP1PPPP/Q1R1KNRB w gc - 0 9 ;D1 27 ;D2 579 ;D3 16233 ;D4 375168 ;D5 10845146 ;D6 268229097 +qbnrkn1r/1pppp1p1/p3bp2/2BN3p/8/5P2/PPPPP1PP/QBNRK2R w HDhd - 0 9 ;D1 40 ;D2 1027 ;D3 38728 ;D4 1059229 ;D5 38511307 ;D6 1104094381 +qnrbknbr/1pp2ppp/4p3/p6N/2p5/8/PPPPPPPP/Q1RBK1BR w HChc - 0 9 ;D1 22 ;D2 510 ;D3 11844 ;D4 300180 ;D5 7403327 ;D6 200581103 +1qkrnbbr/p1pppppp/2n5/1p6/8/5NP1/PPPPPP1P/QNRK1BBR w HC - 4 9 ;D1 24 ;D2 549 ;D3 13987 ;D4 352037 ;D5 9396521 ;D6 255676649 +q1rknr1b/1ppppppb/2n5/p2B3p/8/1PN3P1/P1PPPP1P/Q1RKNRB1 w FCfc - 3 9 ;D1 31 ;D2 924 ;D3 28520 ;D4 861944 ;D5 27463479 ;D6 847726572 +bbnqrk1r/pp1pppp1/2p4p/8/6n1/1N1P1P2/PPP1P1PP/BBQ1RKNR w HEhe - 4 9 ;D1 24 ;D2 804 ;D3 20147 ;D4 666341 ;D5 18024195 ;D6 595947631 +bn1brknr/ppp1p1pp/5p2/3p4/6qQ/3P3P/PPP1PPP1/BN1BRKNR w HEhe - 4 9 ;D1 25 ;D2 854 ;D3 22991 ;D4 704173 ;D5 20290974 ;D6 600195008 +1nqrkbnr/2pp1ppp/pp2p3/3b4/2P5/N7/PP1PPPPP/B1QRKBNR w HDhd - 0 9 ;D1 22 ;D2 651 ;D3 16173 ;D4 479152 ;D5 13133439 ;D6 390886040 +bnqrk1rb/1pp1pppp/p2p4/4n3/2PPP3/8/PP3PPP/BNQRKNRB w GDgd - 1 9 ;D1 30 ;D2 950 ;D3 28169 ;D4 889687 ;D5 27610213 ;D6 880739164 +nbb1rknr/1ppq1ppp/3p4/p3p3/4P3/1N2R3/PPPP1PPP/1BBQ1KNR w Hhe - 2 9 ;D1 33 ;D2 988 ;D3 31293 ;D4 967575 ;D5 30894863 ;D6 985384035 +nqbbrknr/2ppp2p/pp4p1/5p2/7P/3P1P2/PPPBP1P1/NQ1BRKNR w HEhe - 0 9 ;D1 27 ;D2 492 ;D3 13266 ;D4 276569 ;D5 7583292 ;D6 175376176 +1qbrkb1r/pppppppp/8/3n4/4P1n1/PN6/1PPP1P1P/1QBRKBNR w HDhd - 3 9 ;D1 28 ;D2 800 ;D3 21982 ;D4 630374 ;D5 17313279 ;D6 507140861 +1qbrknrb/1p1ppppp/1np5/8/p4P1P/4P1N1/PPPP2P1/NQBRK1RB w GDgd - 0 9 ;D1 21 ;D2 482 ;D3 10581 ;D4 267935 ;D5 6218644 ;D6 168704845 +nbqrbkr1/ppp1pppp/8/3p4/6n1/2P2PPN/PP1PP2P/NBQRBK1R w HDd - 1 9 ;D1 29 ;D2 921 ;D3 25748 ;D4 840262 ;D5 24138518 ;D6 806554650 +nqrb1knr/1ppbpp1p/p7/3p2p1/2P3P1/5P1P/PP1PP3/NQRBBKNR w HChc - 1 9 ;D1 31 ;D2 803 ;D3 25857 ;D4 665799 ;D5 21998733 ;D6 583349773 +1qrkbbr1/pppp1ppp/1n3n2/4p3/5P2/1N6/PPPPP1PP/1QRKBBNR w HCc - 0 9 ;D1 25 ;D2 715 ;D3 19118 ;D4 556325 ;D5 15514933 ;D6 459533767 +nqrkb1rb/pp2pppp/2p1n3/3p4/3PP1N1/8/PPP2PPP/NQRKB1RB w GCgc - 0 9 ;D1 26 ;D2 795 ;D3 21752 ;D4 679387 ;D5 19185851 ;D6 616508881 +nb1rknbr/pp2ppp1/8/2Bp3p/6P1/2P2P1q/PP1PP2P/NBQRKN1R w HDhd - 0 9 ;D1 35 ;D2 1391 ;D3 43025 ;D4 1726888 ;D5 53033675 ;D6 2139267832 +nqrbkn1r/pp1pp1pp/8/2p2p2/5P2/P3B2P/1PbPP1P1/NQRBKN1R w HChc - 0 9 ;D1 23 ;D2 758 ;D3 19439 ;D4 653854 ;D5 18296195 ;D6 628403401 +nqrknbbr/pp1pppp1/7p/2p5/7P/1P1N4/P1PPPPPB/NQRK1B1R w HChc - 2 9 ;D1 29 ;D2 824 ;D3 23137 ;D4 683686 ;D5 19429491 ;D6 595493802 +1qrknrbb/B1p1pppp/8/1p1p4/2n2P2/1P6/P1PPP1PP/NQRKNR1B w FCfc - 0 9 ;D1 28 ;D2 771 ;D3 20237 ;D4 581721 ;D5 16065378 ;D6 483037840 +bbnrqk1r/1ppppppp/8/7n/1p6/P6P/1BPPPPP1/1BNRQKNR w HDhd - 0 9 ;D1 25 ;D2 601 ;D3 15471 ;D4 396661 ;D5 10697065 ;D6 289472497 +bnrbqknr/ppp3p1/3ppp1Q/7p/3P4/1P6/P1P1PPPP/BNRB1KNR w HChc - 0 9 ;D1 32 ;D2 845 ;D3 26876 ;D4 742888 ;D5 23717883 ;D6 682154649 +bn1qkb1r/pprppppp/8/2p5/2PPP1n1/8/PPR2PPP/BN1QKBNR w Hh - 1 9 ;D1 32 ;D2 856 ;D3 27829 ;D4 768595 ;D5 25245957 ;D6 727424329 +1nrqknrb/p1pp1ppp/1p2p3/3N4/5P1P/5b2/PPPPP3/B1RQKNRB w GCgc - 2 9 ;D1 33 ;D2 873 ;D3 27685 ;D4 779473 ;D5 25128076 ;D6 745401024 +nbbrqrk1/pppppppp/8/2N1n3/P7/6P1/1PPPPP1P/1BBRQKNR w HD - 3 9 ;D1 25 ;D2 555 ;D3 14339 ;D4 342296 ;D5 9153089 ;D6 234841945 +1rbbqknr/1ppp1pp1/1n2p3/p6p/4P1P1/P6N/1PPP1P1P/NRBBQK1R w HBhb - 0 9 ;D1 25 ;D2 693 ;D3 18652 ;D4 528070 ;D5 15133381 ;D6 439344945 +nrq1kbnr/p1pbpppp/3p4/1p6/6P1/1N3N2/PPPPPP1P/1RBQKB1R w HBhb - 4 9 ;D1 24 ;D2 648 ;D3 16640 ;D4 471192 ;D5 12871967 ;D6 380436777 +nr1qknr1/p1pppp1p/b5p1/1p6/8/P4PP1/1bPPP1RP/NRBQKN1B w Bgb - 0 9 ;D1 18 ;D2 533 ;D3 11215 ;D4 331243 ;D5 7777833 ;D6 234905172 +nbrqbknr/1ppp2pp/8/4pp2/p2PP1P1/7N/PPP2P1P/NBRQBK1R w HChc - 0 9 ;D1 29 ;D2 803 ;D3 24416 ;D4 706648 ;D5 22305910 ;D6 672322762 +nr1b1k1r/ppp1pppp/2bp1n2/6P1/2P3q1/5P2/PP1PP2P/NRQBBKNR w HBhb - 1 9 ;D1 27 ;D2 1199 ;D3 30908 ;D4 1296241 ;D5 35121759 ;D6 1418677099 +nrqkbbnr/2pppp1p/p7/1p6/2P1Pp2/8/PPNP2PP/1RQKBBNR w HBhb - 0 9 ;D1 28 ;D2 613 ;D3 17874 ;D4 432750 ;D5 13097064 ;D6 345294379 +1rqkbnrb/pp1ppp1p/1n4p1/B1p5/3PP3/4N3/PPP2PPP/NRQK2RB w GBgb - 0 9 ;D1 33 ;D2 723 ;D3 23991 ;D4 590970 ;D5 19715083 ;D6 535650233 +nbrqkn1r/1pppp2p/5pp1/p2b4/5P2/P2PN3/1PP1P1PP/NBRQK1BR w HChc - 2 9 ;D1 23 ;D2 607 ;D3 15482 ;D4 400970 ;D5 11026383 ;D6 290708878 +nrqbknbr/pp1pppp1/8/2p4p/P3PP2/8/1PPP2PP/NRQBKNBR w HBhb - 1 9 ;D1 26 ;D2 700 ;D3 19371 ;D4 556026 ;D5 16058815 ;D6 485460242 +nrqknbbr/p2pppp1/1pp5/6Qp/3P4/1P3P2/P1P1P1PP/NR1KNBBR w HBhb - 0 9 ;D1 40 ;D2 905 ;D3 32932 ;D4 829746 ;D5 29263502 ;D6 791963709 +nrqknrbb/1p3ppp/p2p4/2p1p3/1P6/3PP1P1/P1P2P1P/NRQKNRBB w FBfb - 0 9 ;D1 29 ;D2 780 ;D3 22643 ;D4 654495 ;D5 19532077 ;D6 593181101 +1bnrkqnr/p1pppp2/7p/1p4p1/4b3/7N/PPPP1PPP/BBNRKQ1R w HDhd - 0 9 ;D1 25 ;D2 725 ;D3 19808 ;D4 565006 ;D5 16661676 ;D6 487354613 +bnrbkq1r/pp2p1pp/5n2/2pp1p2/P7/N1PP4/1P2PPPP/B1RBKQNR w HChc - 1 9 ;D1 24 ;D2 745 ;D3 18494 ;D4 584015 ;D5 15079602 ;D6 488924040 +2rkqbnr/p1pppppp/2b5/1pn5/1P3P1Q/2B5/P1PPP1PP/1NRK1BNR w HChc - 3 9 ;D1 33 ;D2 904 ;D3 30111 ;D4 840025 ;D5 28194726 ;D6 801757709 +bnrkqnrb/2pppp2/8/pp4pp/1P5P/6P1/P1PPPPB1/BNRKQNR1 w GCgc - 0 9 ;D1 34 ;D2 1059 ;D3 34090 ;D4 1054311 ;D5 33195397 ;D6 1036498304 +1bbrkq1r/pppp2pp/1n2pp1n/8/2PP4/1N4P1/PP2PP1P/1BBRKQNR w HDhd - 1 9 ;D1 33 ;D2 891 ;D3 28907 ;D4 814247 ;D5 26970098 ;D6 788040469 +nrbbkqnr/1p2pp1p/p1p3p1/3p4/8/1PP5/P2PPPPP/NRBBKQNR w HBhb - 0 9 ;D1 21 ;D2 567 ;D3 13212 ;D4 376487 ;D5 9539687 ;D6 284426039 +1rbkqbr1/ppp1pppp/1n5n/3p4/3P4/1PP3P1/P3PP1P/NRBKQBNR w HBb - 1 9 ;D1 27 ;D2 752 ;D3 20686 ;D4 606783 ;D5 16986290 ;D6 521817800 +nrbkq1rb/1ppp1pp1/4p1n1/p6p/2PP4/5P2/PPK1P1PP/NRB1QNRB w gb - 0 9 ;D1 35 ;D2 697 ;D3 23678 ;D4 505836 ;D5 16906409 ;D6 390324794 +nbrkbqnr/p2pp1p1/5p2/1pp4p/7P/3P2P1/PPP1PP2/NBKRBQNR w hc - 0 9 ;D1 25 ;D2 679 ;D3 17223 ;D4 484921 ;D5 12879258 ;D6 376652259 +nrkb1qnr/ppppp1p1/6bp/5p2/1PP1P1P1/8/P2P1P1P/NRKBBQNR w HBhb - 1 9 ;D1 32 ;D2 761 ;D3 24586 ;D4 632916 ;D5 20671433 ;D6 568524724 +nrk1bbnr/p1q1pppp/1ppp4/8/3P3P/4K3/PPP1PPP1/NR1QBBNR w hb - 0 9 ;D1 30 ;D2 719 ;D3 21683 ;D4 541389 ;D5 16278120 ;D6 423649784 +nrkqbr1b/1pppp1pp/5pn1/p6N/1P3P2/8/P1PPP1PP/NRKQB1RB w GBb - 0 9 ;D1 26 ;D2 494 ;D3 13815 ;D4 296170 ;D5 8763742 ;D6 206993496 +nbrkq2r/pppp1bpp/4p1n1/5p2/7P/2P3N1/PP1PPPP1/NBKRQ1BR w hc - 0 9 ;D1 27 ;D2 701 ;D3 19536 ;D4 535052 ;D5 15394667 ;D6 443506342 +nrkbqnbr/2ppp2p/pp6/5pp1/P1P5/8/1P1PPPPP/NRKBQNBR w HBhb - 0 9 ;D1 21 ;D2 487 ;D3 11341 ;D4 285387 ;D5 7218486 ;D6 193586674 +nr1qnbbr/pk1pppp1/1pp4p/8/3P4/5P1P/PPP1P1P1/NRKQNBBR w HB - 0 9 ;D1 22 ;D2 546 ;D3 13615 ;D4 352855 ;D5 9587439 ;D6 259830255 +nrkq1rbb/pp1ppp1p/2pn4/8/PP3Pp1/7P/2PPP1P1/NRKQNRBB w FBfb - 0 9 ;D1 26 ;D2 839 ;D3 22075 ;D4 723845 ;D5 19867117 ;D6 658535326 +b2rknqr/pp1ppppp/8/2P5/n7/P7/1PPNPPPb/BBNRK1QR w HDhd - 2 9 ;D1 24 ;D2 699 ;D3 19523 ;D4 575172 ;D5 17734818 ;D6 535094237 +bnrbknqr/pp2p2p/2p3p1/3p1p2/8/3P4/PPPNPPPP/B1RBKNQR w HChc - 0 9 ;D1 23 ;D2 580 ;D3 14320 ;D4 385917 ;D5 10133092 ;D6 288041554 +bnrknb1r/pppp2pp/8/4pp2/6P1/3P3P/qPP1PPQ1/BNRKNB1R w HChc - 0 9 ;D1 28 ;D2 1100 ;D3 31813 ;D4 1217514 ;D5 36142423 ;D6 1361341249 +b1rknqrb/ppp1p1p1/2np1p1p/8/4N3/6PQ/PPPPPP1P/B1RKN1RB w GCgc - 0 9 ;D1 36 ;D2 629 ;D3 23082 ;D4 453064 ;D5 16897544 ;D6 367503974 +nb1rknqr/pbppp2p/6p1/1p3p2/5P2/3KP3/PPPP2PP/NBBR1NQR w hd - 2 9 ;D1 18 ;D2 557 ;D3 9779 ;D4 300744 ;D5 5822387 ;D6 180936551 +nr1bknqr/1ppb1ppp/p7/3pp3/B7/2P3NP/PP1PPPP1/NRB1K1QR w HBhb - 2 9 ;D1 28 ;D2 688 ;D3 19541 ;D4 519785 ;D5 15153092 ;D6 425149249 +nrbkn2r/pppp1pqp/4p1p1/8/3P2P1/P3B3/P1P1PP1P/NR1KNBQR w HBhb - 1 9 ;D1 32 ;D2 808 ;D3 25578 ;D4 676525 ;D5 22094260 ;D6 609377239 +nrbknqrb/2p1ppp1/1p6/p2p2Bp/1P6/3P1P2/P1P1P1PP/NR1KNQRB w GBgb - 0 9 ;D1 30 ;D2 625 ;D3 18288 ;D4 418895 ;D5 12225742 ;D6 301834282 +nbr1knqr/1pp1p1pp/3p1pb1/8/7P/5P2/PPPPPQP1/NBRKBN1R w HC - 2 9 ;D1 29 ;D2 863 ;D3 25767 ;D4 800239 ;D5 24965592 ;D6 799182442 +n1kbbnqr/prp2ppp/1p1p4/4p3/1P2P3/3P1B2/P1P2PPP/NRK1BNQR w HBh - 2 9 ;D1 26 ;D2 653 ;D3 17020 ;D4 449719 ;D5 12187583 ;D6 336872952 +nrknbbqr/pp3p1p/B3p1p1/2pp4/4P3/2N3P1/PPPP1P1P/NRK1B1QR w HBhb - 0 9 ;D1 29 ;D2 683 ;D3 19755 ;D4 501807 ;D5 14684565 ;D6 394951291 +n1knbqrb/pr1p1ppp/Qp6/2p1p3/4P3/6P1/PPPP1P1P/NRKNB1RB w GBg - 2 9 ;D1 31 ;D2 552 ;D3 17197 ;D4 371343 ;D5 11663330 ;D6 283583340 +nbrknqbr/p3p1pp/1p1p1p2/2p5/2Q1PP2/8/PPPP2PP/NBRKN1BR w HChc - 0 9 ;D1 37 ;D2 913 ;D3 32470 ;D4 825748 ;D5 28899548 ;D6 759875563 +nrkb1qbr/pp1pppp1/5n2/7p/2p5/1N1NPP2/PPPP2PP/1RKB1QBR w HBhb - 0 9 ;D1 25 ;D2 712 ;D3 18813 ;D4 543870 ;D5 15045589 ;D6 445074372 +nrk2bbr/pppqpppp/3p4/8/1P3nP1/3P4/P1P1PP1P/NRKNQBBR w HBhb - 1 9 ;D1 24 ;D2 814 ;D3 19954 ;D4 670162 ;D5 17603960 ;D6 592121050 +nrknqrbb/1p2ppp1/2pp4/Q6p/P2P3P/8/1PP1PPP1/NRKN1RBB w FBfb - 0 9 ;D1 34 ;D2 513 ;D3 16111 ;D4 303908 ;D5 9569590 ;D6 206509331 +bbnrk1rq/pp2p1pp/2ppn3/5p2/8/3NNP1P/PPPPP1P1/BB1RK1RQ w GDgd - 1 9 ;D1 28 ;D2 697 ;D3 20141 ;D4 517917 ;D5 15301879 ;D6 410843713 +bnrbknrq/ppppp2p/6p1/5p2/4QPP1/8/PPPPP2P/BNRBKNR1 w GCgc - 0 9 ;D1 37 ;D2 901 ;D3 32612 ;D4 877372 ;D5 31385912 ;D6 903831981 +bnkrnbrq/ppppp1p1/B6p/5p2/8/4P3/PPPP1PPP/BNKRN1RQ w - - 0 9 ;D1 26 ;D2 417 ;D3 11124 ;D4 217095 ;D5 5980981 ;D6 133080499 +bnrk1rqb/2pppp1p/3n4/pp4p1/3Q1P2/2N3P1/PPPPP2P/B1RKNR1B w FCfc - 0 9 ;D1 49 ;D2 1655 ;D3 74590 ;D4 2512003 ;D5 107234294 ;D6 3651608327 +nbbrk1rq/pp2pppp/2pp4/8/2P2n2/6N1/PP1PP1PP/NBBRKR1Q w Dgd - 0 9 ;D1 28 ;D2 960 ;D3 26841 ;D4 884237 ;D5 26083252 ;D6 846682836 +nrbb2rq/pppk1ppp/4p1n1/3p4/6P1/1BP5/PP1PPPQP/NRB1KNR1 w GB - 0 9 ;D1 28 ;D2 735 ;D3 22048 ;D4 593839 ;D5 18588316 ;D6 512048946 +nrbk1brq/p1ppppp1/7p/1p6/4P1nP/P7/1PPP1PP1/NRBKNBRQ w GBgb - 0 9 ;D1 22 ;D2 572 ;D3 12739 ;D4 351494 ;D5 8525056 ;D6 247615348 +nrbk1rqb/1pp2ppp/5n2/p2pp3/5B2/1N1P2P1/PPP1PP1P/1R1KNRQB w FBfb - 0 9 ;D1 35 ;D2 927 ;D3 31559 ;D4 849932 ;D5 28465693 ;D6 783048748 +nbrkb1rq/p1pp1ppp/4n3/4p3/Pp6/6N1/1PPPPPPP/NBRKBRQ1 w Cgc - 0 9 ;D1 20 ;D2 456 ;D3 10271 ;D4 247733 ;D5 6124625 ;D6 154766108 +nrkb1nrq/p2pp1pp/1pp2p2/7b/6PP/5P2/PPPPP2N/NRKBB1RQ w GBgb - 0 9 ;D1 21 ;D2 479 ;D3 11152 ;D4 264493 ;D5 6696458 ;D6 165253524 +nr1nbbr1/pppkpp1p/6p1/3p4/P6P/1P6/1RPPPPP1/N1KNBBRQ w G - 1 9 ;D1 20 ;D2 498 ;D3 11304 ;D4 288813 ;D5 7197322 ;D6 188021682 +nrknbrqb/3p1ppp/ppN1p3/8/6P1/8/PPPPPP1P/1RKNBRQB w FBfb - 0 9 ;D1 32 ;D2 526 ;D3 17267 ;D4 319836 ;D5 10755190 ;D6 220058991 +nbrkn1bq/p1pppr1p/1p6/5pp1/8/1N2PP2/PPPP2PP/1BKRNRBQ w c - 1 9 ;D1 19 ;D2 491 ;D3 10090 ;D4 277313 ;D5 6230616 ;D6 180748649 +nrkbnrbq/ppppppp1/8/8/7p/PP3P2/2PPPRPP/NRKBN1BQ w Bfb - 0 9 ;D1 16 ;D2 353 ;D3 6189 ;D4 156002 ;D5 3008668 ;D6 82706705 +nrknrbbq/p4ppp/2p1p3/1p1p4/1P2P3/2P5/P1NP1PPP/1RKNRBBQ w EBeb - 0 9 ;D1 29 ;D2 728 ;D3 21915 ;D4 587668 ;D5 18231199 ;D6 511686397 +nrknr1bb/pppp1p2/7p/2qPp1p1/8/1P5P/P1P1PPP1/NRKNRQBB w EBeb - 0 9 ;D1 20 ;D2 714 ;D3 14336 ;D4 500458 ;D5 11132758 ;D6 386064577 +bbqnrrkn/ppp2p1p/3pp1p1/8/1PP5/2Q5/P1BPPPPP/B2NRKRN w GE - 0 9 ;D1 39 ;D2 593 ;D3 23446 ;D4 424799 ;D5 16764576 ;D6 346185058 +bqn1rkrn/p1p2ppp/1p1p4/4p3/3PP2b/8/PPP2PPP/BQNBRKRN w GEge - 2 9 ;D1 25 ;D2 773 ;D3 20042 ;D4 616817 ;D5 16632403 ;D6 515838333 +bqnrkb1n/p1p1pprp/3p4/1p2P1p1/2PP4/8/PP3PPP/BQNRKBRN w GDd - 1 9 ;D1 31 ;D2 860 ;D3 28102 ;D4 810379 ;D5 27233018 ;D6 813751250 +bqr1krnb/ppppppp1/7p/3n4/1P4P1/P4N2/2PPPP1P/BQNRKR1B w FDf - 3 9 ;D1 31 ;D2 709 ;D3 22936 ;D4 559830 ;D5 18608857 ;D6 480498340 +qbbn1krn/pp3ppp/4r3/2ppp3/P1P4P/8/1P1PPPP1/QBBNRKRN w GEg - 1 9 ;D1 26 ;D2 775 ;D3 21100 ;D4 649673 ;D5 18476807 ;D6 582542257 +qnbbrkrn/1p1pp2p/p7/2p2pp1/8/4P2P/PPPP1PPK/QNBBRR1N w ge - 0 9 ;D1 25 ;D2 599 ;D3 15139 ;D4 389104 ;D5 10260500 ;D6 279222412 +qnbrkbrn/1ppp2p1/p3p2p/5p2/P4P2/1P6/2PPP1PP/QNBRKBRN w GDgd - 0 9 ;D1 27 ;D2 588 ;D3 16735 ;D4 394829 ;D5 11640416 ;D6 293541380 +1nbrkrnb/p1pppp1p/1pq3p1/8/4P3/P1P4N/1P1P1PPP/QNBRKR1B w FDfd - 1 9 ;D1 18 ;D2 609 ;D3 11789 ;D4 406831 ;D5 8604788 ;D6 299491047 +qb1r1krn/pppp2pp/1n2ppb1/4P3/7P/8/PPPP1PP1/QBNRBKRN w GDgd - 0 9 ;D1 20 ;D2 578 ;D3 12205 ;D4 349453 ;D5 7939483 ;D6 229142178 +qnr1bkrn/p3pppp/1bpp4/1p6/2P2PP1/8/PP1PPN1P/QNRBBKR1 w GCgc - 0 9 ;D1 30 ;D2 865 ;D3 26617 ;D4 771705 ;D5 24475596 ;D6 719842237 +1nkrbbrn/qppppppp/8/8/p2P4/1P5P/P1P1PPP1/QNKRBBRN w - - 0 9 ;D1 27 ;D2 672 ;D3 18371 ;D4 505278 ;D5 14065717 ;D6 410130412 +1qrkbrnb/ppp1p1pp/n2p4/5p2/4N3/8/PPPPPPPP/Q1RKBRNB w Ffc - 2 9 ;D1 25 ;D2 718 ;D3 18573 ;D4 536771 ;D5 14404324 ;D6 424279467 +q1nrkrbn/pp1pppp1/2p4p/8/P7/5Pb1/BPPPPNPP/Q1NRKRB1 w FDfd - 0 9 ;D1 22 ;D2 558 ;D3 12911 ;D4 336042 ;D5 8516966 ;D6 228074630 +qnrbkrbn/1p1p1pp1/p1p5/4p2p/8/3P1P2/PPP1P1PP/QNRBKRBN w FCfc - 0 9 ;D1 28 ;D2 669 ;D3 17713 ;D4 440930 ;D5 12055174 ;D6 313276304 +qnrkr1bn/p1pp1ppp/8/1p2p3/3P1P2/bP4P1/P1P1P2P/QNRKRBBN w ECec - 1 9 ;D1 23 ;D2 845 ;D3 20973 ;D4 759778 ;D5 19939053 ;D6 718075943 +q1krrnbb/p1p1pppp/2np4/1pB5/5P2/8/PPPPP1PP/QNRKRN1B w EC - 0 9 ;D1 29 ;D2 776 ;D3 21966 ;D4 631941 ;D5 18110831 ;D6 549019739 +bbn1rkrn/pp1p1ppp/8/2p1p1q1/6P1/P7/BPPPPP1P/B1NQRKRN w GEge - 0 9 ;D1 26 ;D2 936 ;D3 25177 ;D4 906801 ;D5 24984621 ;D6 901444251 +bn1brkrn/pp1qpp1p/2p3p1/3p4/1PPP4/P7/4PPPP/BNQBRKRN w GEge - 1 9 ;D1 29 ;D2 755 ;D3 22858 ;D4 645963 ;D5 20128587 ;D6 600207069 +b2rkbrn/p1pppppp/qp6/8/1n6/2B2P2/P1PPP1PP/1NQRKBRN w GDgd - 0 9 ;D1 24 ;D2 878 ;D3 21440 ;D4 791007 ;D5 20840078 ;D6 775795187 +b2rkrnb/pqp1pppp/n7/1p1p4/P7/N1P2N2/1P1PPPPP/B1QRKR1B w FDfd - 4 9 ;D1 26 ;D2 724 ;D3 19558 ;D4 571891 ;D5 16109522 ;D6 492933398 +1bbqrkrn/ppppp1p1/8/5p1p/P1n3P1/3P4/1PP1PP1P/NBBQRRKN w ge - 1 9 ;D1 25 ;D2 678 ;D3 17351 ;D4 461211 ;D5 12173245 ;D6 329661421 +nqb1rrkn/ppp1bppp/3pp3/8/3P4/1P6/PQP1PPPP/N1BBRRKN w - - 1 9 ;D1 23 ;D2 503 ;D3 12465 ;D4 290341 ;D5 7626054 ;D6 188215608 +nqbrkbr1/p1pppppp/1p6/2N2n2/2P5/5P2/PP1PP1PP/1QBRKBRN w GDgd - 1 9 ;D1 29 ;D2 688 ;D3 20289 ;D4 506302 ;D5 15167248 ;D6 399015237 +nqbrkrn1/1ppppp2/6pp/p7/1P6/2Q5/P1PPPPPP/N1BRKRNB w FDfd - 0 9 ;D1 36 ;D2 602 ;D3 20985 ;D4 397340 ;D5 13706856 ;D6 291708797 +nbqrbrkn/pp1p1pp1/2p5/4p2p/2P3P1/1P3P2/P2PP2P/NBQRBKRN w GD - 0 9 ;D1 34 ;D2 655 ;D3 22581 ;D4 474396 ;D5 16613630 ;D6 379344541 +nqrbbrkn/1p1pppp1/8/p1p4p/4P2P/1N4P1/PPPP1P2/1QRBBKRN w GC - 0 9 ;D1 23 ;D2 597 ;D3 14468 ;D4 400357 ;D5 10096863 ;D6 294900903 +nqrkbbrn/2p1p1pp/pp1p1p2/8/P2N4/2P5/1P1PPPPP/1QRKBBRN w GCgc - 0 9 ;D1 32 ;D2 744 ;D3 23310 ;D4 550728 ;D5 17597164 ;D6 428786656 +n1krbrnb/q1pppppp/p7/1p6/3Q4/2P2P2/PP1PP1PP/N1RKBRNB w FC - 1 9 ;D1 43 ;D2 1038 ;D3 41327 ;D4 1074450 ;D5 40918952 ;D6 1126603824 +nb1rkrbn/p1pp1p1p/qp6/4p1p1/5PP1/P7/1PPPPB1P/NBQRKR1N w FDfd - 2 9 ;D1 26 ;D2 645 ;D3 16463 ;D4 445464 ;D5 11911314 ;D6 342563372 +nqr1krbn/pppp1ppp/8/8/3pP3/5P2/PPPb1NPP/NQRBKRB1 w FCfc - 3 9 ;D1 2 ;D2 51 ;D3 1047 ;D4 27743 ;D5 612305 ;D6 17040200 +n1rkrbbn/pqppppp1/7p/1p6/8/1NPP4/PP1KPPPP/1QR1RBBN w ec - 0 9 ;D1 25 ;D2 674 ;D3 17553 ;D4 505337 ;D5 13421727 ;D6 403551903 +1qrkrnbb/1p1p1ppp/pnp1p3/8/3PP3/P6P/1PP2PP1/NQRKRNBB w ECec - 0 9 ;D1 24 ;D2 688 ;D3 17342 ;D4 511444 ;D5 13322502 ;D6 403441498 +1bnrqkrn/2ppppp1/p7/1p1b3p/3PP1P1/8/PPPQ1P1P/BBNR1KRN w GDgd - 1 9 ;D1 35 ;D2 925 ;D3 32238 ;D4 857060 ;D5 30458921 ;D6 824344087 +bnrbqkr1/ppp2pp1/6n1/3pp2p/1P6/2N3N1/P1PPPPPP/B1RBQRK1 w gc - 0 9 ;D1 23 ;D2 704 ;D3 17345 ;D4 539587 ;D5 14154852 ;D6 450893738 +1nrqkbrn/p1pppppp/8/1p1b4/P6P/5P2/1PPPP1P1/BNRQKBRN w GCgc - 1 9 ;D1 19 ;D2 505 ;D3 10619 ;D4 281422 ;D5 6450025 ;D6 175593967 +b1rqkrnb/ppppppp1/8/6p1/3n4/NP6/P1PPPP1P/B1RQKRNB w FCfc - 0 9 ;D1 25 ;D2 614 ;D3 15578 ;D4 377660 ;D5 10391021 ;D6 259629603 +nbbrqkrn/ppp3p1/3pp3/5p1p/1P2P3/P7/2PPQPPP/NBBR1KRN w GDgd - 0 9 ;D1 30 ;D2 833 ;D3 25719 ;D4 717713 ;D5 22873901 ;D6 649556666 +nr1bqrk1/ppp1pppp/6n1/3pP3/8/5PQb/PPPP2PP/NRBB1KRN w GB - 3 9 ;D1 26 ;D2 734 ;D3 20161 ;D4 582591 ;D5 17199594 ;D6 512134836 +1rbqkbr1/ppppp1pp/1n6/4np2/3P1P2/6P1/PPPQP2P/NRB1KBRN w GBgb - 1 9 ;D1 27 ;D2 662 ;D3 17897 ;D4 447464 ;D5 13038519 ;D6 338365642 +nr1qkr1b/ppp1pp1p/4bn2/3p2p1/4P3/1Q6/PPPP1PPP/NRB1KRNB w FBfb - 4 9 ;D1 33 ;D2 939 ;D3 30923 ;D4 942138 ;D5 30995969 ;D6 991509814 +nb1qbkrn/pprp1pp1/7p/2p1pB2/Q1PP4/8/PP2PPPP/N1R1BKRN w GCg - 2 9 ;D1 47 ;D2 1128 ;D3 50723 ;D4 1306753 ;D5 56747878 ;D6 1560584212 +nrqb1rkn/pp2pppp/2bp4/2p5/6P1/2P3N1/PP1PPP1P/NRQBBRK1 w - - 3 9 ;D1 24 ;D2 828 ;D3 21148 ;D4 723705 ;D5 19506135 ;D6 668969549 +nrq1bbrn/ppkpp2p/2p3p1/P4p2/8/4P1N1/1PPP1PPP/NRQKBBR1 w GB - 0 9 ;D1 25 ;D2 525 ;D3 13533 ;D4 309994 ;D5 8250997 ;D6 201795680 +Br1kbrn1/pqpppp2/8/6pp/3b2P1/1N6/PPPPPP1P/1RQKBRN1 w FBfb - 3 9 ;D1 20 ;D2 790 ;D3 18175 ;D4 695905 ;D5 17735648 ;D6 669854148 +nbrqkrbn/2p1p1pp/p7/1p1p1p2/4P1P1/5P2/PPPP3P/NBRQKRBN w FCfc - 0 9 ;D1 29 ;D2 771 ;D3 22489 ;D4 647106 ;D5 19192982 ;D6 591335970 +1rqbkrbn/1ppppp1p/1n6/p1N3p1/8/2P4P/PP1PPPP1/1RQBKRBN w FBfb - 0 9 ;D1 29 ;D2 502 ;D3 14569 ;D4 287739 ;D5 8652810 ;D6 191762235 +1rqkrbbn/ppnpp1pp/8/2p5/6p1/3P4/PPP1PPPP/NRK1RBBN w eb - 0 9 ;D1 19 ;D2 531 ;D3 10812 ;D4 300384 ;D5 6506674 ;D6 184309316 +nrqkrnbb/p1pp2pp/5p2/4P3/2p5/4N3/PP1PP1PP/NRQKR1BB w EBeb - 0 9 ;D1 26 ;D2 800 ;D3 23256 ;D4 756695 ;D5 23952941 ;D6 809841274 +bbnrkqrn/pp3pp1/4p2p/2pp4/4P1P1/1PB5/P1PP1P1P/1BNRKQRN w GDgd - 0 9 ;D1 33 ;D2 915 ;D3 30536 ;D4 878648 ;D5 29602610 ;D6 881898159 +bnrbkqr1/1p2pppp/6n1/p1pp4/7P/P3P3/1PPPKPP1/BNRB1QRN w gc - 0 9 ;D1 19 ;D2 457 ;D3 9332 ;D4 238944 ;D5 5356253 ;D6 144653627 +b1rkqbrn/pp1p2pp/2n1p3/2p2p2/3P2PP/8/PPP1PP2/BNKRQBRN w gc - 0 9 ;D1 30 ;D2 985 ;D3 30831 ;D4 1011700 ;D5 32684185 ;D6 1080607773 +b1rkqrnb/2ppppp1/np6/p6p/1P6/P2P3P/2P1PPP1/BNRKQRNB w FCfc - 0 9 ;D1 26 ;D2 692 ;D3 18732 ;D4 517703 ;D5 14561181 ;D6 413226841 +nbbrkqrn/1ppp1p2/p6p/4p1p1/5P2/1P5P/P1PPPNP1/NBBRKQR1 w GDgd - 0 9 ;D1 22 ;D2 561 ;D3 13222 ;D4 367487 ;D5 9307003 ;D6 273928315 +nrbbkqrn/p1pppppp/8/1p6/4P3/7Q/PPPP1PPP/NRBBK1RN w GBgb - 0 9 ;D1 38 ;D2 769 ;D3 28418 ;D4 632310 ;D5 23091070 ;D6 560139600 +nrbkqbrn/1pppp2p/8/p4pp1/P4PQ1/8/1PPPP1PP/NRBK1BRN w GBgb - 0 9 ;D1 23 ;D2 507 ;D3 13067 ;D4 321423 ;D5 8887567 ;D6 237475184 +nr1kqr1b/pp2pppp/5n2/2pp4/P5b1/5P2/1PPPPRPP/NRBK1QNB w Bfb - 2 9 ;D1 18 ;D2 626 ;D3 12386 ;D4 434138 ;D5 9465555 ;D6 335004239 +nbkrbqrn/1pppppp1/8/4P2p/pP6/P7/2PP1PPP/NBRKBQRN w GC - 0 9 ;D1 22 ;D2 329 ;D3 8475 ;D4 148351 ;D5 4160034 ;D6 82875306 +nrkb1qrn/pp1pp1pp/8/5p1b/P1p4P/6N1/1PPPPPP1/NRKBBQR1 w GBgb - 2 9 ;D1 16 ;D2 479 ;D3 9037 ;D4 275354 ;D5 5862341 ;D6 184959796 +1rkq1brn/ppppp1pp/1n6/3b1p2/3N3P/5P2/PPPPP1P1/1RKQBBRN w GBgb - 3 9 ;D1 23 ;D2 614 ;D3 15324 ;D4 418395 ;D5 11090645 ;D6 313526088 +nrk1brnb/pp1ppppp/2p5/3q4/5P2/PP6/1KPPP1PP/NR1QBRNB w fb - 1 9 ;D1 25 ;D2 942 ;D3 21765 ;D4 792179 ;D5 19318837 ;D6 685549171 +nbrkqr1n/1pppp2p/p4pp1/2Bb4/5P2/6P1/PPPPP2P/NBRKQ1RN w Cfc - 2 9 ;D1 30 ;D2 841 ;D3 24775 ;D4 677876 ;D5 20145765 ;D6 557578726 +n1kbqrbn/2p1pppp/1r6/pp1p4/P7/3P4/1PP1PPPP/NRKBQRBN w FBf - 2 9 ;D1 21 ;D2 591 ;D3 14101 ;D4 394289 ;D5 10295086 ;D6 292131422 +nrkqrbb1/ppp1pppp/3p4/8/4P3/2Pn1P2/PP4PP/NRKQRBBN w EBeb - 0 9 ;D1 4 ;D2 88 ;D3 3090 ;D4 73414 ;D5 2640555 ;D6 66958031 +nrkqrnbb/ppppp1p1/7p/1P3p2/3P4/2P5/P3PPPP/NRKQRNBB w EBeb - 0 9 ;D1 29 ;D2 689 ;D3 21091 ;D4 508789 ;D5 16226660 ;D6 408570219 +bbnr1rqn/pp2pkpp/2pp1p2/8/4P1P1/8/PPPP1P1P/BBNRKRQN w FD - 0 9 ;D1 21 ;D2 463 ;D3 11135 ;D4 256244 ;D5 6826249 ;D6 165025370 +bnrbk1qn/1pppprpp/8/p4p1P/6P1/3P4/PPP1PP2/BNRBKRQN w FCc - 0 9 ;D1 22 ;D2 459 ;D3 11447 ;D4 268157 ;D5 7371098 ;D6 190583454 +1nrkrbqn/p1pp1ppp/4p3/1p6/1PP5/6PB/P2PPPbP/BNRKR1QN w ECec - 0 9 ;D1 30 ;D2 931 ;D3 29012 ;D4 887414 ;D5 28412902 ;D6 869228014 +b1rkr1nb/pppppqp1/n4B2/7p/8/1P4P1/P1PPPP1P/1NKRRQNB w ec - 1 9 ;D1 36 ;D2 934 ;D3 31790 ;D4 930926 ;D5 30392925 ;D6 952871799 +nbbrkrqn/p1ppp1p1/8/1p3p1p/2P3PP/8/PP1PPPQ1/NBBRKR1N w FDfd - 0 9 ;D1 34 ;D2 938 ;D3 31848 ;D4 921716 ;D5 31185844 ;D6 944483246 +1rbbkrqn/ppp1pp2/1n1p2p1/7p/P3P1P1/3P4/1PP2P1P/NRBBKRQN w FBfb - 0 9 ;D1 26 ;D2 646 ;D3 18083 ;D4 472744 ;D5 14006203 ;D6 384101783 +nrbkrbq1/Qpppp1pp/2n5/5p2/P4P2/6N1/1PPPP1PP/NRBKRB2 w EBeb - 1 9 ;D1 27 ;D2 619 ;D3 16713 ;D4 421845 ;D5 11718463 ;D6 313794027 +1rbkr1nb/pppp1qpp/1n6/4pp2/1PP1P3/8/PB1P1PPP/NR1KRQNB w EBeb - 1 9 ;D1 32 ;D2 1029 ;D3 32970 ;D4 1080977 ;D5 35483796 ;D6 1181835398 +nbrk1rqn/p1ppp2p/1p6/5ppb/8/1N2P2P/PPPP1PP1/1BKRBRQN w fc - 0 9 ;D1 18 ;D2 594 ;D3 12350 ;D4 408544 ;D5 9329122 ;D6 315021712 +nrkbbrqn/3pppp1/7p/ppp5/P7/1N5P/1PPPPPP1/1RKBBRQN w FBfb - 0 9 ;D1 19 ;D2 417 ;D3 9026 ;D4 218513 ;D5 5236331 ;D6 137024458 +nrkr1bqn/ppp1pppp/3p4/1b6/7P/P7/1PPPPPP1/NRKRBBQN w DBdb - 1 9 ;D1 17 ;D2 457 ;D3 9083 ;D4 243872 ;D5 5503579 ;D6 150091997 +nrkrbqnb/p4ppp/1p2p3/2pp4/6P1/2P2N2/PPNPPP1P/1RKRBQ1B w DBdb - 0 9 ;D1 27 ;D2 755 ;D3 21012 ;D4 620093 ;D5 17883987 ;D6 547233320 +nbkrr1bn/ppB2ppp/4p3/2qp4/4P3/5P2/PPPP2PP/NBRKRQ1N w EC - 1 9 ;D1 37 ;D2 1473 ;D3 51939 ;D4 1956521 ;D5 68070015 ;D6 2490912491 +n1kbrqbn/p1pp1pp1/4p2p/2B5/1r3P2/8/PPPPP1PP/NRKBRQ1N w EBe - 2 9 ;D1 30 ;D2 1029 ;D3 30874 ;D4 1053163 ;D5 32318550 ;D6 1106487743 +nrkrqbbn/2pppp1p/8/pp6/1P1P2p1/P5P1/2P1PP1P/NRKRQBBN w DBdb - 0 9 ;D1 22 ;D2 421 ;D3 10034 ;D4 221927 ;D5 5754555 ;D6 141245633 +nrkr1nbb/1ppp2pp/p3q3/4pp2/2P5/P3P3/1PKP1PPP/NR1RQNBB w db - 0 9 ;D1 22 ;D2 619 ;D3 13953 ;D4 411392 ;D5 9905109 ;D6 301403003 +bbnrkrnq/1pp1p2p/6p1/p2p1p2/8/1P2P3/P1PP1PPP/BBNRKRNQ w FDfd - 0 9 ;D1 27 ;D2 805 ;D3 21915 ;D4 688224 ;D5 19133881 ;D6 620749189 +bnrbkrn1/pp1ppp2/2p3pp/8/2Pq4/P4PP1/1P1PP2P/BNRBKRNQ w FCfc - 1 9 ;D1 20 ;D2 770 ;D3 16593 ;D4 577980 ;D5 13581691 ;D6 456736500 +b1rkrbnq/1pp1pppp/2np4/p5N1/8/1P2P3/P1PP1PPP/BNRKRB1Q w ECec - 0 9 ;D1 37 ;D2 740 ;D3 27073 ;D4 581744 ;D5 21156664 ;D6 485803600 +b1krrnqb/pp1ppp1p/n1p3p1/2N5/6P1/8/PPPPPP1P/B1RKRNQB w EC - 0 9 ;D1 34 ;D2 850 ;D3 28494 ;D4 752350 ;D5 25360295 ;D6 698159474 +1bbr1rnq/ppppkppp/8/3np3/4P3/3P4/PPP1KPPP/NBBRR1NQ w - - 1 9 ;D1 27 ;D2 704 ;D3 18290 ;D4 480474 ;D5 12817011 ;D6 341026662 +nrbbk1nq/p1p1prpp/1p6/N2p1p2/P7/8/1PPPPPPP/R1BBKRNQ w Fb - 2 9 ;D1 23 ;D2 552 ;D3 13710 ;D4 348593 ;D5 9236564 ;D6 248469879 +1rbkrb1q/1pppp1pp/1n5n/p4p2/P3P3/1P6/2PPNPPP/NRBKRB1Q w EBeb - 1 9 ;D1 22 ;D2 415 ;D3 10198 ;D4 217224 ;D5 5735644 ;D6 135295774 +nrbkr1qb/1pp1pppp/6n1/p2p4/2P1P3/1N4N1/PP1P1PPP/1RBKR1QB w EBeb - 0 9 ;D1 27 ;D2 709 ;D3 19126 ;D4 506214 ;D5 14192779 ;D6 380516508 +nbrkbrnq/p3p1pp/1pp2p2/3p4/1PP5/4P3/P1KP1PPP/NBR1BRNQ w fc - 0 9 ;D1 24 ;D2 715 ;D3 18009 ;D4 535054 ;D5 14322279 ;D6 427269976 +nrk1brnq/pp1p1pp1/7p/b1p1p3/1P6/6P1/P1PPPPQP/NRKBBRN1 w FBfb - 2 9 ;D1 29 ;D2 675 ;D3 20352 ;D4 492124 ;D5 15316285 ;D6 389051744 +nrkr1bnq/1p2pppp/p2p4/1bp5/PP6/1R5N/2PPPPPP/N1KRBB1Q w Ddb - 2 9 ;D1 27 ;D2 744 ;D3 20494 ;D4 571209 ;D5 16188945 ;D6 458900901 +nrk1b1qb/pppn1ppp/3rp3/3p4/2P3P1/3P4/PPN1PP1P/1RKRBNQB w DBb - 3 9 ;D1 35 ;D2 941 ;D3 33203 ;D4 935791 ;D5 33150360 ;D6 968024386 +nb1rrnbq/ppkp1ppp/8/2p1p3/P7/1N2P3/1PPP1PPP/1BKRRNBQ w - - 1 9 ;D1 19 ;D2 451 ;D3 9655 ;D4 235472 ;D5 5506897 ;D6 139436165 +nrkbrnbq/4pppp/1ppp4/p7/2P1P3/3P2N1/PP3PPP/NRKBR1BQ w EBeb - 0 9 ;D1 29 ;D2 591 ;D3 17132 ;D4 384358 ;D5 11245508 ;D6 270967202 +nrkrnbbq/3p1ppp/1p6/p1p1p3/3P2P1/P4Q2/1PP1PP1P/NRKRNBB1 w DBdb - 0 9 ;D1 38 ;D2 792 ;D3 28597 ;D4 640961 ;D5 22654797 ;D6 540864616 +nr1rnqbb/ppp1pp1p/3k2p1/3p4/1P5P/3P1N2/P1P1PPP1/NRKR1QBB w DB - 1 9 ;D1 25 ;D2 758 ;D3 18547 ;D4 543643 ;D5 13890077 ;D6 402109399 +bbqrnnkr/1ppp1p1p/5p2/p5p1/P7/1P4P1/2PPPP1P/1BQRNNKR w HDhd - 0 9 ;D1 20 ;D2 322 ;D3 7224 ;D4 145818 ;D5 3588435 ;D6 82754650 +bqrb2k1/pppppppr/5nnp/8/3P1P2/4P1N1/PPP3PP/BQRBN1KR w HCc - 1 9 ;D1 25 ;D2 597 ;D3 15872 ;D4 397970 ;D5 11162476 ;D6 295682250 +bqrnn1kr/1pppbppp/8/4p3/1p6/2P1N2P/P2PPPP1/BQR1NBKR w HChc - 1 9 ;D1 34 ;D2 921 ;D3 31695 ;D4 864023 ;D5 30126510 ;D6 850296236 +bqr1nkr1/pppppp2/2n3p1/7p/1P1b1P2/8/PQP1P1PP/B1RNNKRB w GCgc - 0 9 ;D1 23 ;D2 788 ;D3 21539 ;D4 686795 ;D5 20849374 ;D6 645694580 +qbbrnn1r/1pppp1pk/p7/5p1p/P2P3P/3N4/1PP1PPP1/QBBR1NKR w HD - 0 9 ;D1 34 ;D2 713 ;D3 24475 ;D4 562189 ;D5 19494094 ;D6 482645160 +qrbb2kr/p1pppppp/1p1n4/8/1P3n2/P7/Q1PPP1PP/1RBBNNKR w HBhb - 0 9 ;D1 28 ;D2 977 ;D3 26955 ;D4 949925 ;D5 27802999 ;D6 992109168 +qrb2bkr/1pp1pppp/2np1n2/pN6/3P4/4B3/PPP1PPPP/QR2NBKR w HBhb - 0 9 ;D1 27 ;D2 730 ;D3 20534 ;D4 585091 ;D5 17005916 ;D6 507008968 +qrbnnkrb/pp2pp1p/8/2pp2p1/7P/P1P5/QP1PPPP1/1RBNNKRB w GBgb - 0 9 ;D1 24 ;D2 813 ;D3 21142 ;D4 707925 ;D5 19615756 ;D6 655850285 +1brnb1kr/p1pppppp/1p6/8/4q2n/1P2P1P1/PNPP1P1P/QBR1BNKR w HChc - 3 9 ;D1 17 ;D2 734 ;D3 13462 ;D4 530809 ;D5 11032633 ;D6 416356876 +1rnbbnkr/1pp1pppp/1q1p4/p7/4P3/5PN1/PPPP1BPP/QRNB2KR w HBhb - 1 9 ;D1 26 ;D2 809 ;D3 21764 ;D4 706677 ;D5 20292750 ;D6 675408811 +qrnnbb1Q/ppp1pk1p/3p2p1/5p2/PP6/5P2/2PPP1PP/1RNNBBKR w HB - 0 9 ;D1 37 ;D2 751 ;D3 27902 ;D4 603931 ;D5 22443036 ;D6 515122176 +qrnnbkrb/p3p1pp/3p1p2/1pp5/PP2P3/8/2PP1PPP/QRNNBRKB w gb - 0 9 ;D1 30 ;D2 906 ;D3 27955 ;D4 872526 ;D5 27658191 ;D6 890966633 +qbrnnkbr/1p2pp1p/p1p3p1/3p4/6P1/P1N4P/1PPPPP2/QBR1NKBR w HChc - 0 9 ;D1 26 ;D2 701 ;D3 18930 ;D4 521377 ;D5 14733245 ;D6 416881799 +qr1b1kbr/1p1ppppp/1n1n4/p1p5/4P3/5NPP/PPPP1P2/QRNB1KBR w HBhb - 1 9 ;D1 26 ;D2 649 ;D3 17235 ;D4 451997 ;D5 12367604 ;D6 342165821 +qrnnkb1r/1pppppp1/7p/p4b2/4P3/5P1P/PPPP2PR/QRNNKBB1 w Bhb - 1 9 ;D1 34 ;D2 941 ;D3 31720 ;D4 901240 ;D5 30307554 ;D6 888709821 +qr1nkrbb/p2ppppp/1pp5/8/3Pn3/1NP3P1/PP2PP1P/QR1NKRBB w FBfb - 1 9 ;D1 19 ;D2 505 ;D3 11107 ;D4 294251 ;D5 7046501 ;D6 190414579 +bbrqn1kr/1pppp1pp/4n3/5p2/p5P1/3P4/PPP1PPKP/BBRQNN1R w hc - 0 9 ;D1 24 ;D2 573 ;D3 12963 ;D4 335845 ;D5 8191054 ;D6 227555387 +brqb1nkr/pppppp1p/8/4N1pn/5P2/6P1/PPPPP2P/BRQB1NKR w HBhb - 0 9 ;D1 26 ;D2 550 ;D3 14338 ;D4 331666 ;D5 8903754 ;D6 223437427 +brqnn1kr/pp3ppp/2pbp3/3p4/8/2NPP3/PPP1BPPP/BRQ1N1KR w HBhb - 0 9 ;D1 27 ;D2 780 ;D3 20760 ;D4 589328 ;D5 16243731 ;D6 463883447 +brq1nkrb/ppp2ppp/8/n2pp2P/P7/4P3/1PPP1PP1/BRQNNKRB w GBgb - 1 9 ;D1 17 ;D2 426 ;D3 8295 ;D4 235162 ;D5 5048497 ;D6 153986034 +rbbqn1kr/pp2p1pp/6n1/2pp1p2/2P4P/P7/BP1PPPP1/R1BQNNKR w HAha - 0 9 ;D1 27 ;D2 916 ;D3 25798 ;D4 890435 ;D5 26302461 ;D6 924181432 +1qbbn1kr/1ppppppp/r3n3/8/p1P5/P7/1P1PPPPP/RQBBNNKR w HAh - 1 9 ;D1 29 ;D2 817 ;D3 24530 ;D4 720277 ;D5 22147642 ;D6 670707652 +rqbnnbkr/ppp1ppp1/7p/3p4/PP6/7P/1NPPPPP1/RQB1NBKR w HAa - 1 9 ;D1 23 ;D2 572 ;D3 14509 ;D4 381474 ;D5 10416981 ;D6 288064942 +r1bnnkrb/q1ppp1pp/p7/1p3pB1/2P1P3/3P4/PP3PPP/RQ1NNKRB w GAga - 2 9 ;D1 31 ;D2 925 ;D3 27776 ;D4 860969 ;D5 26316355 ;D6 843078864 +rbqnb1kr/ppppp1pp/5p2/5N2/7P/1n3P2/PPPPP1P1/RBQNB1KR w HAha - 1 9 ;D1 32 ;D2 864 ;D3 27633 ;D4 766551 ;D5 24738875 ;D6 707188107 +rqnbbn1r/ppppppp1/6k1/8/6Pp/2PN4/PP1PPPKP/RQ1BBN1R w - - 0 9 ;D1 27 ;D2 566 ;D3 15367 ;D4 347059 ;D5 9714509 ;D6 234622128 +rqnnbbkr/p1p2pp1/1p1p3p/4p3/4NP2/6P1/PPPPP2P/RQN1BBKR w HAha - 0 9 ;D1 27 ;D2 631 ;D3 17923 ;D4 452734 ;D5 13307890 ;D6 356279813 +1qnnbrkb/rppp1ppp/p3p3/8/4P3/2PP1P2/PP4PP/RQNNBKRB w GA - 1 9 ;D1 24 ;D2 479 ;D3 12135 ;D4 271469 ;D5 7204345 ;D6 175460841 +rbqnn1br/p1pppk1p/1p4p1/5p2/8/P1P2P2/1PBPP1PP/R1QNNKBR w HA - 0 9 ;D1 31 ;D2 756 ;D3 23877 ;D4 625194 ;D5 20036784 ;D6 554292502 +rqnbnkbr/1ppppp2/p5p1/8/1P4p1/4PP2/P1PP3P/RQNBNKBR w HAha - 0 9 ;D1 24 ;D2 715 ;D3 18536 ;D4 575589 ;D5 16013189 ;D6 515078271 +rq1nkbbr/1p2pppp/p2n4/2pp4/1P4P1/P2N4/2PPPP1P/RQ1NKBBR w HAha - 1 9 ;D1 27 ;D2 694 ;D3 19840 ;D4 552904 ;D5 16685687 ;D6 494574415 +r1nnkrbb/pp1pppp1/2p3q1/7p/8/1PPP3P/P3PPP1/RQNNKRBB w FAfa - 1 9 ;D1 18 ;D2 520 ;D3 10808 ;D4 329085 ;D5 7508201 ;D6 235103697 +bbrnqk1r/pppp3p/6p1/4pp2/3P2P1/8/PPP1PP1P/BBRN1NKR w HC - 0 9 ;D1 22 ;D2 566 ;D3 12965 ;D4 362624 ;D5 8721079 ;D6 259069471 +brnb1nkr/pppqpp2/3p2pp/8/3PP3/1P6/PBP2PPP/1RNBQNKR w HBhb - 0 9 ;D1 32 ;D2 859 ;D3 28517 ;D4 817464 ;D5 27734108 ;D6 829785474 +brnq1b1r/ppp1ppkp/3p1np1/8/8/5P1P/PPPPPKPR/BRNQNB2 w - - 0 9 ;D1 21 ;D2 511 ;D3 10951 ;D4 273756 ;D5 6372681 ;D6 167139732 +brnq1rkb/1pppppp1/3n3p/p7/8/P4NP1/1PPPPPRP/BRNQ1K1B w B - 0 9 ;D1 25 ;D2 548 ;D3 14049 ;D4 341208 ;D5 9015901 ;D6 235249649 +rbb1qnkr/p1ppp1pp/1p3p2/6n1/8/1PN1P2P/P1PP1PP1/RBB1QNKR w HAha - 0 9 ;D1 25 ;D2 673 ;D3 16412 ;D4 467660 ;D5 12099119 ;D6 361714466 +rnbb1nkr/1ppp1ppp/4p3/p5q1/6P1/1PP5/PB1PPP1P/RN1BQNKR w HAha - 1 9 ;D1 19 ;D2 663 ;D3 14149 ;D4 489653 ;D5 11491355 ;D6 399135495 +rnbqnbkr/1pp1p2p/3p1p2/p5p1/5PP1/2P5/PPNPP2P/RNBQ1BKR w HAha - 0 9 ;D1 24 ;D2 647 ;D3 16679 ;D4 461931 ;D5 12649636 ;D6 361157611 +rnb2krb/pppqppnp/8/3p2p1/1P4P1/7P/P1PPPPB1/RNBQNKR1 w GAga - 1 9 ;D1 24 ;D2 722 ;D3 18749 ;D4 605229 ;D5 16609220 ;D6 563558512 +rbnqb1kr/pppn1pp1/3p3p/4p3/1P6/P7/R1PPPPPP/1BNQBNKR w Hha - 1 9 ;D1 20 ;D2 538 ;D3 12277 ;D4 345704 ;D5 8687621 ;D6 255304141 +rnqb1nkr/p1pbp1pp/8/1pPp1p2/P2P4/8/1P2PPPP/RNQBBNKR w HAha - 1 9 ;D1 35 ;D2 764 ;D3 26952 ;D4 632796 ;D5 22592380 ;D6 564255328 +rnq1bbkr/1p1ppp1p/4n3/p1p3p1/P1PP4/8/RP2PPPP/1NQNBBKR w Hha - 0 9 ;D1 29 ;D2 709 ;D3 21296 ;D4 570580 ;D5 17597398 ;D6 506140370 +1nqnbkrb/1pppp2p/r7/p4pp1/3P4/8/PPPBPPPP/RNQNK1RB w g - 0 9 ;D1 27 ;D2 1028 ;D3 28534 ;D4 1050834 ;D5 30251988 ;D6 1096869832 +rbnqnkbr/p1pp1p1p/8/1p2p3/3P2pP/2P5/PP2PPP1/RBNQNKBR w HAha - 0 9 ;D1 32 ;D2 832 ;D3 27120 ;D4 750336 ;D5 24945574 ;D6 724171581 +rnq1nkbr/1p1p1ppp/2p1pb2/p7/7P/2P5/PPNPPPPB/RNQB1K1R w HAha - 2 9 ;D1 31 ;D2 779 ;D3 24010 ;D4 638640 ;D5 19919434 ;D6 551494771 +rnqnk1br/p1ppp1bp/1p3p2/6p1/4N3/P5P1/1PPPPP1P/R1QNKBBR w HAha - 2 9 ;D1 25 ;D2 717 ;D3 19396 ;D4 576577 ;D5 16525239 ;D6 507175842 +rnq1krbb/p1p1pppp/8/1p1p4/1n5B/2N2P2/PPPPP1PP/RNQ1KR1B w FAfa - 0 9 ;D1 28 ;D2 867 ;D3 24029 ;D4 735686 ;D5 21112751 ;D6 654808184 +bbrnnqkr/1pp1pppp/3p4/p7/P3P3/7P/1PPP1PP1/BBRNNQKR w HChc - 0 9 ;D1 24 ;D2 405 ;D3 11025 ;D4 210557 ;D5 6196438 ;D6 131401224 +brnbnqkr/p1ppp3/1p5p/5Pp1/5P2/3N4/PPPPP2P/BRNB1QKR w HBhb g6 0 9 ;D1 25 ;D2 785 ;D3 21402 ;D4 698331 ;D5 20687969 ;D6 695850727 +br1nqbkr/1ppppp2/pn6/6pp/2PP4/1N4P1/PP2PP1P/BR1NQBKR w HBhb - 0 9 ;D1 25 ;D2 596 ;D3 16220 ;D4 421882 ;D5 12185361 ;D6 337805606 +1rnnqkrb/p2ppp1p/1pp5/2N3p1/8/1P6/P1PPPPKP/BR1NQ1RB w gb - 0 9 ;D1 38 ;D2 960 ;D3 34831 ;D4 913665 ;D5 32490040 ;D6 880403591 +rbbnnqkr/pp3pp1/2p1p3/3p3p/3P3P/1PP5/P3PPP1/RBBNNQKR w HAha - 0 9 ;D1 30 ;D2 785 ;D3 23079 ;D4 656618 ;D5 19885037 ;D6 599219582 +rn1bnqkr/p1ppppp1/8/1p5p/P4P1P/3N4/1PPPP1b1/RNBB1QKR w HAha - 0 9 ;D1 27 ;D2 752 ;D3 21735 ;D4 613194 ;D5 18862234 ;D6 547415271 +1nbnqbkr/1p1p1ppp/r3p3/p1p5/P3P3/3Q4/1PPP1PPP/RNBN1BKR w HAh - 2 9 ;D1 33 ;D2 721 ;D3 24278 ;D4 572535 ;D5 19648535 ;D6 496023732 +rnbnqkrb/2pppppp/1p6/p7/1PP5/4N2P/P2PPPP1/RNB1QKRB w GAg - 0 9 ;D1 23 ;D2 570 ;D3 14225 ;D4 374196 ;D5 10022614 ;D6 279545007 +rbnnbq1r/ppppppkp/6p1/N7/4P3/P7/1PPP1PPP/RB1NBQKR w HA - 5 9 ;D1 27 ;D2 620 ;D3 18371 ;D4 440594 ;D5 13909432 ;D6 349478320 +r1nbbqkr/pppppp1p/8/8/1n3Pp1/3N1QP1/PPPPP2P/RN1BB1KR w HAha - 0 9 ;D1 31 ;D2 791 ;D3 25431 ;D4 682579 ;D5 22408813 ;D6 636779732 +rnq1bbkr/pp1p1ppp/2pnp3/8/7P/1QP5/PP1PPPPR/RNN1BBK1 w Aha - 2 9 ;D1 28 ;D2 559 ;D3 16838 ;D4 390887 ;D5 12242780 ;D6 315431511 +rnnqbrkb/2ppppp1/1p1N4/p6p/4P3/8/PPPP1PPP/R1NQBKRB w GA - 0 9 ;D1 32 ;D2 638 ;D3 20591 ;D4 438792 ;D5 14395828 ;D6 331782223 +rbnnq1br/pppp1kp1/4pp2/7p/PP6/2PP4/4PPPP/RBNNQKBR w HA - 0 9 ;D1 21 ;D2 521 ;D3 12201 ;D4 320429 ;D5 8239159 ;D6 227346638 +rnnbqkbr/p2ppp2/7p/1pp3p1/2P2N2/8/PP1PPPPP/RN1BQKBR w HAha - 0 9 ;D1 25 ;D2 528 ;D3 13896 ;D4 326094 ;D5 9079829 ;D6 232750602 +rnn1kbbr/ppppqp2/6p1/2N1p2p/P7/2P5/1P1PPPPP/RN1QKBBR w HAha - 2 9 ;D1 27 ;D2 801 ;D3 22088 ;D4 707078 ;D5 20334071 ;D6 682580976 +rnnqkrbb/p1p1p1pp/1p3p2/8/3p2Q1/P1P1P3/1P1P1PPP/RNN1KRBB w FAfa - 0 9 ;D1 37 ;D2 1014 ;D3 34735 ;D4 998999 ;D5 32921537 ;D6 988770109 +bbrnk1qr/1pppppp1/p4n1p/8/P2P2N1/8/1PP1PPPP/BBR1NKQR w HC - 1 9 ;D1 21 ;D2 481 ;D3 11213 ;D4 279993 ;D5 7015419 ;D6 187564853 +brnbnkqr/1pp1p1p1/p2p1p2/7p/1P4PP/8/PBPPPP2/1RNBNKQR w HBhb - 0 9 ;D1 31 ;D2 743 ;D3 24260 ;D4 660177 ;D5 22391185 ;D6 653721389 +br2kbqr/ppppp1pp/3n1p2/3P4/3n3P/3N4/PPP1PPP1/BR1NKBQR w HBhb - 3 9 ;D1 25 ;D2 872 ;D3 22039 ;D4 748726 ;D5 20281962 ;D6 685749952 +br1nkqrb/ppppppp1/8/7p/4P3/n1P2PP1/PP1P3P/BRNNKQRB w GBgb - 0 9 ;D1 28 ;D2 607 ;D3 16934 ;D4 396483 ;D5 11607818 ;D6 294181806 +rbbn1kqr/pp1pp1p1/2pn3p/5p2/5P2/1P1N4/PNPPP1PP/RBB2KQR w HAha - 1 9 ;D1 27 ;D2 725 ;D3 21543 ;D4 616082 ;D5 19239812 ;D6 581716972 +rnbbnk1r/pp1ppp1p/6q1/2p5/PP4p1/4P3/2PP1PPP/RNBBNKQR w HAha - 1 9 ;D1 25 ;D2 1072 ;D3 26898 ;D4 1088978 ;D5 28469879 ;D6 1122703887 +rnbnkbqr/1pp3pp/3p4/p3pp2/3P2P1/2N1N3/PPP1PP1P/R1B1KBQR w HAha - 0 9 ;D1 31 ;D2 1028 ;D3 32907 ;D4 1095472 ;D5 36025223 ;D6 1211187800 +r1bnkqrb/1ppppppp/p3n3/8/6P1/4N3/PPPPPPRP/RNB1KQ1B w Aga - 1 9 ;D1 23 ;D2 457 ;D3 11416 ;D4 250551 ;D5 6666787 ;D6 159759052 +rbn1bkqr/p1pp1pp1/1pn5/4p2p/7P/1PBP4/P1P1PPP1/RBNN1KQR w HAha - 0 9 ;D1 23 ;D2 470 ;D3 11649 ;D4 264274 ;D5 6963287 ;D6 172833738 +rnnbbkqr/3ppppp/p7/1pp5/P6P/6P1/1PPPPP2/RNNBBKQR w HAha - 0 9 ;D1 26 ;D2 569 ;D3 15733 ;D4 375556 ;D5 11008114 ;D6 284485303 +r1nk1bqr/1pppp1pp/2n5/p4p1b/5P2/1N4B1/PPPPP1PP/RN1K1BQR w HAha - 2 9 ;D1 25 ;D2 824 ;D3 21983 ;D4 738366 ;D5 20904119 ;D6 716170771 +r1nkbqrb/p2pppp1/npp4p/8/4PP2/2N4P/PPPP2P1/R1NKBQRB w GAga - 0 9 ;D1 31 ;D2 548 ;D3 17480 ;D4 349633 ;D5 11469548 ;D6 255067638 +rbnnkqbr/ppppp2p/5p2/6p1/2P1B3/P6P/1P1PPPP1/R1NNKQBR w HAha - 1 9 ;D1 31 ;D2 809 ;D3 24956 ;D4 680747 ;D5 21247414 ;D6 606221516 +1r1bkqbr/pppp1ppp/2nnp3/8/2P5/N4P2/PP1PP1PP/1RNBKQBR w Hh - 0 9 ;D1 28 ;D2 810 ;D3 22844 ;D4 694599 ;D5 20188622 ;D6 636748147 +rn1kqbbr/p1pppp1p/1p4p1/1n6/1P2P3/4Q2P/P1PP1PP1/RNNK1BBR w HAha - 1 9 ;D1 39 ;D2 848 ;D3 30100 ;D4 724426 ;D5 25594662 ;D6 659615710 +rn1kqrbb/pppppppp/8/8/2nP2P1/1P2P3/P1P2P1P/RNNKQRBB w FAfa - 1 9 ;D1 29 ;D2 766 ;D3 21701 ;D4 567971 ;D5 16944425 ;D6 456898648 +b1rnnkrq/bpppppp1/7p/8/1p6/2B5/PNPPPPPP/1BR1NKRQ w GCgc - 2 9 ;D1 25 ;D2 667 ;D3 17253 ;D4 472678 ;D5 12865247 ;D6 365621294 +brnb1krq/pppppppp/8/5P2/2P1n2P/8/PP1PP1P1/BRNBNKRQ w GBgb - 1 9 ;D1 23 ;D2 620 ;D3 14882 ;D4 402561 ;D5 10776855 ;D6 300125003 +b1nnkbrq/pr1pppp1/1p5p/2p5/P2N1P2/8/1PPPP1PP/BR1NKBRQ w GBg - 0 9 ;D1 24 ;D2 472 ;D3 12181 ;D4 267398 ;D5 7370758 ;D6 178605165 +br1nkrqb/p1p1p1pp/3n4/1p1p1p2/5N1P/4P3/PPPP1PP1/BR1NKRQB w FBfb - 0 9 ;D1 24 ;D2 775 ;D3 19398 ;D4 624309 ;D5 16429837 ;D6 539767605 +rbbnnkrq/p2pp1pp/2p5/5p2/1pPP1B2/P7/1P2PPPP/RB1NNKRQ w GAga - 0 9 ;D1 34 ;D2 921 ;D3 30474 ;D4 849933 ;D5 28095833 ;D6 806446436 +rnbbnkr1/1p1ppp1p/2p3p1/p7/2Pq4/1P1P4/P2BPPPP/RN1BNKRQ w GAga - 2 9 ;D1 26 ;D2 1139 ;D3 29847 ;D4 1204863 ;D5 32825932 ;D6 1281760240 +1rbnkbrq/pppppp2/n5pp/2P5/P7/4N3/1P1PPPPP/RNB1KBRQ w GAg - 2 9 ;D1 23 ;D2 574 ;D3 14146 ;D4 391413 ;D5 10203438 ;D6 301874034 +1nbnkr1b/rppppppq/p7/7p/1P5P/3P2P1/P1P1PP2/RNBNKRQB w FAf - 1 9 ;D1 33 ;D2 823 ;D3 26696 ;D4 724828 ;D5 23266182 ;D6 672294132 +rbn1bkrq/ppppp3/4n2p/5pp1/1PN5/2P5/P2PPPPP/RBN1BKRQ w GAga - 0 9 ;D1 27 ;D2 859 ;D3 24090 ;D4 796482 ;D5 23075785 ;D6 789152120 +r1nbbkrq/1ppp2pp/2n2p2/p3p3/5P2/1N4BP/PPPPP1P1/RN1B1KRQ w GAga - 0 9 ;D1 25 ;D2 774 ;D3 20141 ;D4 618805 ;D5 16718577 ;D6 515864053 +rnnkbbrq/1pppp1p1/5p2/7p/p6P/3N1P2/PPPPP1PQ/RN1KBBR1 w GAga - 0 9 ;D1 29 ;D2 673 ;D3 20098 ;D4 504715 ;D5 15545590 ;D6 416359581 +r1nkbrqb/pppp1p2/n3p1p1/7p/2P2P2/1P6/P2PPQPP/RNNKBR1B w FAfa - 0 9 ;D1 27 ;D2 722 ;D3 21397 ;D4 593762 ;D5 18742426 ;D6 537750982 +rbnnkr1q/1ppp2pp/p4p2/P2bp3/4P2P/8/1PPP1PP1/RBNNKRBQ w FAfa - 1 9 ;D1 26 ;D2 848 ;D3 23387 ;D4 741674 ;D5 21591790 ;D6 675163653 +rn1bkrb1/1ppppp1p/pn4p1/8/P2q3P/3P4/NPP1PPP1/RN1BKRBQ w FAfa - 1 9 ;D1 22 ;D2 803 ;D3 18322 ;D4 632920 ;D5 15847763 ;D6 536419559 +rn1krbbq/pppp1npp/4pp2/8/4P2P/3P2P1/PPP2P2/RNNKRBBQ w EAea - 1 9 ;D1 29 ;D2 810 ;D3 23968 ;D4 670500 ;D5 20361517 ;D6 575069358 +rnn1rqbb/ppkp1pp1/2p1p2p/2P5/8/3P1P2/PP2P1PP/RNNKRQBB w EA - 0 9 ;D1 22 ;D2 506 ;D3 11973 ;D4 292344 ;D5 7287368 ;D6 189865944 +bbqr1knr/pppppp1p/8/4n1p1/2P1P3/6P1/PPQP1P1P/BB1RNKNR w HDhd - 0 9 ;D1 26 ;D2 650 ;D3 18253 ;D4 481200 ;D5 14301029 ;D6 394943978 +bq1bnknr/pprppp1p/8/2p3p1/4PPP1/8/PPPP3P/BQRBNKNR w HCh - 0 9 ;D1 24 ;D2 548 ;D3 14021 ;D4 347611 ;D5 9374021 ;D6 250988458 +bqrnkb1r/1p2pppp/p1pp3n/5Q2/2P4P/5N2/PP1PPPP1/B1RNKB1R w HChc - 0 9 ;D1 46 ;D2 823 ;D3 33347 ;D4 673905 ;D5 26130444 ;D6 582880996 +bq1rknrb/pppppp1p/4n3/6p1/4P1P1/3P1P2/PPP4P/BQRNKNRB w GCg - 0 9 ;D1 23 ;D2 618 ;D3 14815 ;D4 419474 ;D5 10606831 ;D6 315124518 +q1brnknr/pp1pp1p1/8/2p2p1p/5b2/P4N2/1PPPP1PP/QBBRK1NR w hd - 0 9 ;D1 22 ;D2 675 ;D3 15778 ;D4 473994 ;D5 12077228 ;D6 368479752 +qrbbnknr/1p1ppp1p/p1p5/8/1P2P1p1/3P1B2/P1P2PPP/QRB1NKNR w HBhb - 0 9 ;D1 32 ;D2 722 ;D3 24049 ;D4 569905 ;D5 19584539 ;D6 484814878 +qrb1kbnr/p3pppp/2n5/1ppp4/7P/3P1P2/PPP1P1PR/QRBNKBN1 w Bhb - 0 9 ;D1 26 ;D2 831 ;D3 22606 ;D4 724505 ;D5 20500804 ;D6 662608969 +qrbnknrb/ppp1pp2/6p1/7p/PPNp4/8/2PPPPPP/QRB1KNRB w GBgb - 0 9 ;D1 31 ;D2 840 ;D3 26762 ;D4 742772 ;D5 24422614 ;D6 701363800 +qbrnbknr/pp1pp1pp/8/2p2p2/3Q4/PP6/2PPPPPP/1BRNBKNR w HChc - 0 9 ;D1 38 ;D2 1121 ;D3 39472 ;D4 1198438 ;D5 41108769 ;D6 1285503872 +qr1bbk1r/pppppp1p/1n6/5np1/4B3/1PP5/P2PPPPP/QRN1BKNR w HBhb - 0 9 ;D1 25 ;D2 694 ;D3 16938 ;D4 472950 ;D5 12164609 ;D6 345122090 +qrnkbbnr/1p1pp2p/p7/2p1Npp1/6P1/7P/PPPPPP2/QR1KBBNR w HBhb - 0 9 ;D1 27 ;D2 586 ;D3 16348 ;D4 393391 ;D5 11409633 ;D6 298054792 +qrnkbnrb/pp1p1p2/2p1p1pp/4N3/P4P2/8/1PPPP1PP/QR1KBNRB w GBgb - 0 9 ;D1 32 ;D2 645 ;D3 20737 ;D4 460319 ;D5 15037464 ;D6 358531599 +qbrnknbr/1pppppp1/p6p/8/1P6/3PP3/PQP2PPP/1BRNKNBR w HChc - 3 9 ;D1 26 ;D2 595 ;D3 16755 ;D4 415022 ;D5 12214768 ;D6 323518628 +qrnbk1br/1ppppp1p/p5p1/8/4Pn2/4K1P1/PPPP1P1P/QRNB1NBR w hb - 0 9 ;D1 24 ;D2 609 ;D3 13776 ;D4 359415 ;D5 8538539 ;D6 230364479 +qrnk1bbr/1pnp1ppp/p1p1p3/8/3Q4/1P1N3P/P1PPPPP1/1RNK1BBR w HBhb - 0 9 ;D1 43 ;D2 1106 ;D3 42898 ;D4 1123080 ;D5 41695761 ;D6 1113836402 +qrnknrb1/pppppp2/8/6pp/4P2P/3P1P2/PbP3P1/QRNKNRBB w FBfb - 0 9 ;D1 24 ;D2 658 ;D3 17965 ;D4 488373 ;D5 14457245 ;D6 400971226 +bbrqnrk1/ppp2ppp/7n/3pp3/8/P4N1N/1PPPPPPP/BBRQ1RK1 w - - 1 9 ;D1 22 ;D2 503 ;D3 12078 ;D4 310760 ;D5 8080951 ;D6 224960353 +brqbnk1r/1ppp1ppp/8/p3pn2/8/2PP1P2/PP2PKPP/BRQBN1NR w hb - 1 9 ;D1 25 ;D2 745 ;D3 19387 ;D4 570459 ;D5 15520298 ;D6 460840861 +brqnkbnr/pp2pp1p/3p4/2p5/5p2/3P3P/PPP1PPP1/B1RNKBNR w Hhb - 0 9 ;D1 19 ;D2 516 ;D3 10755 ;D4 312996 ;D5 6995034 ;D6 214340699 +brq1kn1b/1ppppprp/2n3p1/p7/P1N5/6P1/1PPPPP1P/BRQNK1RB w GBb - 2 9 ;D1 29 ;D2 557 ;D3 16739 ;D4 352277 ;D5 10840256 ;D6 249999654 +rbbq1k1r/ppp1pppp/7n/1n1p4/5P2/P2P4/1PPBP1PP/RB1QNKNR w HAha - 1 9 ;D1 25 ;D2 769 ;D3 20110 ;D4 638340 ;D5 17438715 ;D6 570893953 +r1bbnk1r/qpp1pppp/p6n/3p4/1P6/5N1P/P1PPPPP1/RQBBK1NR w ha - 0 9 ;D1 23 ;D2 728 ;D3 18209 ;D4 587364 ;D5 16053564 ;D6 529082811 +rqbnkbnr/1pp2p1p/3p4/p3p1p1/8/2P2P2/PP1PPNPP/RQBNKB1R w HAha - 0 9 ;D1 26 ;D2 772 ;D3 21903 ;D4 653704 ;D5 19571559 ;D6 593915677 +r1bnknrb/pqppp1p1/1p5p/5p2/7P/3P2N1/PPP1PPP1/RQBNK1RB w GAga - 2 9 ;D1 27 ;D2 748 ;D3 20291 ;D4 597105 ;D5 16324542 ;D6 506453626 +rbqnbknr/pp1pppp1/8/2p5/3P3p/5N1P/PPP1PPPR/RBQNBK2 w Aha - 0 9 ;D1 30 ;D2 859 ;D3 26785 ;D4 819631 ;D5 26363334 ;D6 842796987 +rqnbbrk1/ppppppp1/8/5n1p/3P3P/2B3P1/PPP1PP2/RQNB1KNR w HA - 0 9 ;D1 22 ;D2 505 ;D3 11452 ;D4 283464 ;D5 7055215 ;D6 186760784 +rqnkbbnr/pp2p1p1/8/2pp1p1p/3PPP2/8/PPP1N1PP/RQNKBB1R w HAha - 0 9 ;D1 28 ;D2 832 ;D3 23142 ;D4 722857 ;D5 20429246 ;D6 663183060 +rqnkbnr1/pppp2bp/6p1/4pp2/1P2P3/3NN3/P1PP1PPP/RQ1KB1RB w GAga - 0 9 ;D1 28 ;D2 641 ;D3 18835 ;D4 459993 ;D5 14038570 ;D6 364210162 +rbq2kbr/pppppppp/2n5/P7/3P1n2/2P5/1P2PPPP/RBQNKNBR w HA - 1 9 ;D1 31 ;D2 889 ;D3 27028 ;D4 766181 ;D5 24299415 ;D6 692180754 +rq1bkn1r/ppppp2p/3n4/5pp1/2b3P1/1N1P1P2/PPP1P2P/RQ1BKNBR w HAha - 1 9 ;D1 28 ;D2 810 ;D3 22667 ;D4 657520 ;D5 18719949 ;D6 556282676 +r1nknbbr/p2ppp1p/1pp3p1/8/1P6/4P3/P1PPNPPq/R1QKNBBR w HAha - 0 9 ;D1 24 ;D2 797 ;D3 22144 ;D4 719069 ;D5 21862776 ;D6 716521139 +rqnknrbb/ppp1p3/5ppp/2Np4/2P5/4P3/PP1P1PPP/RQNK1RBB w FAfa - 0 9 ;D1 34 ;D2 686 ;D3 23277 ;D4 515541 ;D5 17664543 ;D6 423574794 +1brnqknr/2p1pppp/p2p4/1P6/6P1/4Nb2/PP1PPP1P/BBR1QKNR w HChc - 1 9 ;D1 34 ;D2 1019 ;D3 32982 ;D4 1003103 ;D5 33322477 ;D6 1043293394 +brn1qknr/1p1pppp1/pb5p/Q1p5/3P3P/8/PPP1PPPR/BRNB1KN1 w Bhb - 2 9 ;D1 32 ;D2 642 ;D3 20952 ;D4 464895 ;D5 15454749 ;D6 371861782 +brnqkbnr/pppppp2/8/6pp/6P1/P2P1P2/1PP1P2P/BRNQKBNR w HBhb - 0 9 ;D1 20 ;D2 441 ;D3 9782 ;D4 240220 ;D5 5770284 ;D6 153051835 +2nqknrb/1rpppppp/5B2/pp6/1PP1b3/3P4/P3PPPP/1RNQKNRB w GBg - 1 9 ;D1 35 ;D2 1042 ;D3 36238 ;D4 1101159 ;D5 38505058 ;D6 1202668717 +rb1nqknr/1pp1pppp/8/3p4/p2P4/6PN/PPPQPP1P/RBBN1K1R w HAha - 0 9 ;D1 29 ;D2 692 ;D3 21237 ;D4 555018 ;D5 17820605 ;D6 497251206 +rnbbqknr/pppp4/5p2/4p1pp/P7/2N2PP1/1PPPP2P/R1BBQKNR w HAha - 0 9 ;D1 23 ;D2 595 ;D3 14651 ;D4 415772 ;D5 10881112 ;D6 329010121 +rn1qkbnr/p1p1pp1p/bp4p1/3p4/1P6/4P3/P1PP1PPP/RNBQKBNR w HAha - 0 9 ;D1 30 ;D2 794 ;D3 24319 ;D4 690811 ;D5 21657601 ;D6 647745807 +r1bqk1rb/pppnpppp/5n2/3p4/2P3PP/2N5/PP1PPP2/R1BQKNRB w GAga - 1 9 ;D1 32 ;D2 821 ;D3 27121 ;D4 733155 ;D5 24923473 ;D6 710765657 +rbnqbknr/1p1ppp1p/6p1/p1p5/7P/3P4/PPP1PPP1/RBNQBKNR w HAha - 0 9 ;D1 24 ;D2 720 ;D3 18842 ;D4 575027 ;D5 15992882 ;D6 501093456 +r1qbbk1r/pp1ppppp/n1p5/5n2/B1P3P1/8/PP1PPP1P/RNQ1BKNR w HAha - 0 9 ;D1 27 ;D2 831 ;D3 22293 ;D4 698986 ;D5 19948650 ;D6 637973209 +rnqkbb1r/p1pppppp/8/8/1p4n1/PP4PP/2PPPP2/RNQKBBNR w HAha - 0 9 ;D1 18 ;D2 463 ;D3 9519 ;D4 256152 ;D5 6065231 ;D6 172734380 +rnqk1nrb/pppbpp2/7p/3p2p1/4B3/2N1N1P1/PPPPPP1P/R1QKB1R1 w GAga - 0 9 ;D1 34 ;D2 1171 ;D3 38128 ;D4 1318217 ;D5 42109356 ;D6 1465473753 +rbnqknbr/1pp1ppp1/3p4/7p/p2P2PP/2P5/PP2PP2/RBNQKNBR w HAha - 0 9 ;D1 32 ;D2 867 ;D3 28342 ;D4 798722 ;D5 26632459 ;D6 781067145 +rn1bknbr/pq2pppp/1p6/2pp4/P7/1P1P4/2PNPPPP/RNQBK1BR w HAha - 0 9 ;D1 24 ;D2 627 ;D3 16652 ;D4 462942 ;D5 13200921 ;D6 385193532 +r1qk1bbr/ppp1pp1p/2np1n2/6p1/2PP4/3BP3/PP3PPP/RNQKN1BR w HAha - 2 9 ;D1 31 ;D2 992 ;D3 30213 ;D4 986631 ;D5 30397368 ;D6 1011631987 +r1qknrbb/pppp1p2/2n3p1/4p2p/8/QPP5/P1NPPPPP/RN1K1RBB w FAfa - 2 9 ;D1 30 ;D2 702 ;D3 21563 ;D4 532939 ;D5 16813114 ;D6 438096194 +bbkr1qnr/2pppppp/2n5/pp6/8/PPN5/1BPPPPPP/1BR1KQNR w HC - 2 9 ;D1 25 ;D2 573 ;D3 15183 ;D4 380910 ;D5 10554668 ;D6 283975400 +1rnbkqnr/1bpppppp/1p6/7P/p2P4/5P2/PPP1P1P1/BRNBKQNR w HBhb - 0 9 ;D1 21 ;D2 503 ;D3 11790 ;D4 301084 ;D5 7679979 ;D6 207799378 +brnkqbnr/2p1pppp/1p6/3p4/1pP5/P6P/3PPPP1/BRNKQBNR w HBhb - 0 9 ;D1 28 ;D2 743 ;D3 21054 ;D4 587192 ;D5 17354516 ;D6 507176753 +br1kqnrb/npp1pppp/8/3p4/p4N2/PP6/2PPPPPP/BR1KQNRB w GBgb - 0 9 ;D1 31 ;D2 808 ;D3 25585 ;D4 698475 ;D5 22376575 ;D6 640362920 +rbbnkq1r/pppppp1p/7n/6p1/P5P1/2P2N2/1P1PPP1P/RBBNKQ1R w HAha - 1 9 ;D1 29 ;D2 580 ;D3 17585 ;D4 404831 ;D5 12730970 ;D6 325226128 +rnbbk1nr/pp2qppp/2ppp3/8/3P4/P1N4N/1PP1PPPP/R1BBKQ1R w HAha - 0 9 ;D1 29 ;D2 838 ;D3 24197 ;D4 721884 ;D5 21100580 ;D6 646624429 +rnbk1b1r/ppppn1pp/4pp2/7q/7P/P5PB/1PPPPP2/RNBKQ1NR w HAha - 3 9 ;D1 20 ;D2 729 ;D3 16633 ;D4 576199 ;D5 14507076 ;D6 498621813 +r2kqnrb/pbppppp1/np5p/8/4Q1P1/3P4/PPP1PP1P/RNBK1NRB w GAga - 2 9 ;D1 47 ;D2 1219 ;D3 55009 ;D4 1486353 ;D5 65239153 ;D6 1834391369 +rbnkbq1r/p1p2ppp/1p2pn2/3p4/P3P3/3P4/1PP1KPPP/RBN1BQNR w ha - 2 9 ;D1 29 ;D2 923 ;D3 27179 ;D4 883866 ;D5 26202752 ;D6 868565895 +rk1bb1nr/ppppqppp/n7/1N2p3/6P1/7N/PPPPPP1P/R1KBBQ1R w HA - 6 9 ;D1 27 ;D2 703 ;D3 19478 ;D4 559525 ;D5 16049807 ;D6 492966455 +rnkqbbnr/p1ppp2p/1p4p1/8/1B3p1P/2NP4/PPP1PPP1/R1KQ1BNR w HAha - 0 9 ;D1 29 ;D2 610 ;D3 18855 ;D4 438277 ;D5 14020041 ;D6 355083962 +rnkqb1rb/pp1p1ppp/4p3/2P3n1/8/1PP5/P3PPPP/RNKQBNRB w GAga - 0 9 ;D1 29 ;D2 675 ;D3 20699 ;D4 535821 ;D5 17000613 ;D6 476598337 +rb1kqnbr/pp1pp1p1/1np2p2/7p/P1P3PP/8/1P1PPP2/RBNKQNBR w HAha - 0 9 ;D1 31 ;D2 1077 ;D3 33661 ;D4 1183381 ;D5 37415304 ;D6 1328374620 +rnkbq1br/ppp2ppp/3p4/Q3p1n1/5P2/3P2P1/PPP1P2P/RNKB1NBR w HAha - 0 9 ;D1 41 ;D2 1201 ;D3 46472 ;D4 1420367 ;D5 52991625 ;D6 1675608008 +rn1qnbbr/pp2pppp/2ppk3/8/2PP4/3Q1N2/PP2PPPP/RNK2BBR w HA - 1 9 ;D1 34 ;D2 666 ;D3 22474 ;D4 472299 ;D5 15860369 ;D6 353831792 +rnkqnr1b/ppppp1pp/5p2/8/Q1P2P2/8/PP1P2PP/RbK1NRBB w FAfa - 0 9 ;D1 36 ;D2 876 ;D3 31987 ;D4 788580 ;D5 29022529 ;D6 736717252 +bbrn1nqr/ppp1k1pp/5p2/3pp3/7P/3PN3/PPP1PPP1/BBRK1NQR w - - 1 9 ;D1 24 ;D2 583 ;D3 15063 ;D4 383532 ;D5 10522064 ;D6 280707118 +brnbkn1r/1pppp1p1/4q3/p4p1p/7P/1N3P2/PPPPP1PQ/BR1BKN1R w HBhb - 2 9 ;D1 27 ;D2 935 ;D3 26120 ;D4 885699 ;D5 26000648 ;D6 873063158 +br1knbqr/pp2p1pp/1n6/2pp1p2/6P1/2P4B/PP1PPPQP/BRNKN2R w HBhb - 0 9 ;D1 27 ;D2 681 ;D3 19202 ;D4 510687 ;D5 14954779 ;D6 415624943 +brnk1qrb/p1ppppp1/1p5p/8/P3n3/1N4P1/1PPPPPRP/BR1KNQ1B w Bgb - 0 9 ;D1 22 ;D2 638 ;D3 13991 ;D4 412346 ;D5 9760752 ;D6 293499724 +rbbnknqr/pppp3p/5pp1/8/1P1pP3/7P/P1P2PP1/RBBNKNQR w HAha - 0 9 ;D1 29 ;D2 756 ;D3 21616 ;D4 614074 ;D5 17602252 ;D6 528140595 +1nbbknqr/rpp1ppp1/1Q1p3p/p7/2P2PP1/8/PP1PP2P/RNBBKN1R w HAh - 2 9 ;D1 37 ;D2 977 ;D3 34977 ;D4 944867 ;D5 33695089 ;D6 940198007 +rnb2bqr/ppkpppp1/3n3p/2p5/6PP/2N2P2/PPPPP3/R1BKNBQR w HA - 2 9 ;D1 30 ;D2 647 ;D3 20365 ;D4 467780 ;D5 15115531 ;D6 369257622 +rn1k1qrb/p1pppppp/bp6/8/4n3/P4BPP/1PPPPP2/RNBKNQR1 w GAga - 2 9 ;D1 22 ;D2 670 ;D3 14998 ;D4 451517 ;D5 11199653 ;D6 339919682 +rb2bnqr/nppkpppp/3p4/p7/1P6/P2N2P1/2PPPP1P/RB1KBNQR w HA - 3 9 ;D1 22 ;D2 479 ;D3 11475 ;D4 264739 ;D5 6831555 ;D6 167329117 +r1kbb1qr/2pppppp/np2n3/p7/2P3P1/8/PP1PPPQP/RNKBBN1R w HAha - 1 9 ;D1 32 ;D2 723 ;D3 23953 ;D4 581832 ;D5 19472074 ;D6 504622114 +rnknbb1r/p1ppp1pp/8/1p1P1p1q/8/P1P5/1P2PPPP/RNKNBBQR w HAha - 1 9 ;D1 19 ;D2 607 ;D3 12733 ;D4 417451 ;D5 9753617 ;D6 325177085 +rnkn1qrb/pp1bp1pp/2p5/1N1p1p2/8/2P5/PPKPPPPP/R2NBQRB w ga - 2 9 ;D1 27 ;D2 533 ;D3 14549 ;D4 330747 ;D5 9206957 ;D6 232664675 +r1nknqbr/pp2p1pp/2p2p2/3p4/6P1/PP1P4/2P1PP1b/RBNKNQBR w HAha - 0 9 ;D1 20 ;D2 582 ;D3 13777 ;D4 409166 ;D5 10708639 ;D6 326565393 +rnkb1qbr/p1pp1p1p/1p2pn2/1Q4p1/4P3/N4P2/PPPP2PP/R1KBN1BR w HAha - 0 9 ;D1 40 ;D2 1038 ;D3 39356 ;D4 1051441 ;D5 39145902 ;D6 1079612614 +rn2qbbr/1pkppp1p/p3n1p1/8/8/2P2P2/PP1PP1PP/RNKN1BBR w HA - 0 9 ;D1 24 ;D2 605 ;D3 14888 ;D4 385964 ;D5 9687507 ;D6 260874068 +rn1nqrbb/p1kppp1p/8/1pp3p1/1P6/2N1P3/P1PP1PPP/RK1NQRBB w - - 0 9 ;D1 21 ;D2 540 ;D3 12489 ;D4 337997 ;D5 8436136 ;D6 237525904 +bbrnknrq/1pp3pp/p2p1p2/4p3/P7/1P2N3/2PPPPPP/BBRN1RKQ w gc - 0 9 ;D1 24 ;D2 527 ;D3 13900 ;D4 326175 ;D5 9139962 ;D6 226253685 +brnb1nrq/pppp1kpp/4p3/8/5p1P/P1P3P1/1P1PPP2/BRNBKNRQ w GB - 1 9 ;D1 29 ;D2 773 ;D3 23904 ;D4 638768 ;D5 20503775 ;D6 560338709 +br1k1brq/ppppp2p/1n1n1pp1/8/P1P5/3P2P1/1P2PP1P/BRNKNBRQ w GBgb - 0 9 ;D1 28 ;D2 811 ;D3 23550 ;D4 664880 ;D5 19913758 ;D6 565143976 +1r1knrqb/n1pppppp/p1b5/1p6/8/3N1P2/PPPPP1PP/BRNK1RQB w fb - 3 9 ;D1 29 ;D2 753 ;D3 23210 ;D4 620019 ;D5 20044474 ;D6 558383603 +rbbnk1rq/pppppppp/8/3Pn3/8/4P1P1/PPP2P1P/RBBNKNRQ w GAga - 1 9 ;D1 22 ;D2 551 ;D3 12619 ;D4 324608 ;D5 8204171 ;D6 217689974 +rnbbk1rq/2pppp1p/p3n1p1/1p6/P3N3/8/1PPPPPPP/RNBB1KRQ w ga - 0 9 ;D1 26 ;D2 742 ;D3 20061 ;D4 599527 ;D5 16787080 ;D6 525678162 +rnbkn1rq/ppppppb1/6p1/7p/2B2P2/1P2P3/P1PP2PP/RNBKN1RQ w GAga - 1 9 ;D1 28 ;D2 799 ;D3 23210 ;D4 689436 ;D5 20755098 ;D6 639632905 +rn1knrqb/p2pppp1/b1p5/1p5p/2P2P2/1P6/P2PP1PP/RNBKNRQB w FAfa - 1 9 ;D1 30 ;D2 579 ;D3 18481 ;D4 397545 ;D5 13257198 ;D6 311282465 +rbnkbnrq/pp2p1Np/2p2p2/8/3p4/8/PPPPPPPP/RBNKBR1Q w Aga - 0 9 ;D1 23 ;D2 670 ;D3 16435 ;D4 501883 ;D5 13012378 ;D6 411860744 +rk1bbnrq/ppp1pppp/n7/3p4/5P2/3P2NP/PPP1P1P1/RNKBB1RQ w GA - 0 9 ;D1 26 ;D2 597 ;D3 16238 ;D4 402506 ;D5 11269462 ;D6 296701249 +r1knbbrq/pppp2p1/2n1p2p/5p2/4P3/P1PP4/1P3PPP/RNKNBBRQ w GAga - 1 9 ;D1 20 ;D2 596 ;D3 13091 ;D4 399069 ;D5 9416862 ;D6 293659781 +rnknbrqb/p1p1pp1p/3p4/1p1N2p1/8/N7/PPPPPPPP/1RK1BRQB w Ffa - 0 9 ;D1 26 ;D2 724 ;D3 18942 ;D4 552040 ;D5 15257204 ;D6 461293885 +rbnknrb1/1p1ppp1p/p1p3p1/8/1P3P2/1R6/PqPPP1PP/RBNKN1BQ w Afa - 0 9 ;D1 31 ;D2 1183 ;D3 34723 ;D4 1289502 ;D5 38722152 ;D6 1421492227 +rnkbnrbq/2p1ppp1/p7/1p1p3p/3P4/1P4P1/P1P1PP1P/RNKBNRBQ w FAfa - 0 9 ;D1 24 ;D2 506 ;D3 12748 ;D4 301464 ;D5 8086100 ;D6 207129256 +r1knrbbq/pp1ppppp/2p1n3/8/2P3P1/P7/1PKPPP1P/RN1NRBBQ w ea - 0 9 ;D1 28 ;D2 570 ;D3 16037 ;D4 352471 ;D5 10278695 ;D6 242592363 +rnknrq1b/ppp1p1p1/4b3/3p1p1p/6P1/P4P2/1PPPPQ1P/RNKNR1BB w EAea - 2 9 ;D1 30 ;D2 739 ;D3 23124 ;D4 594962 ;D5 19252739 ;D6 521629794 +bbqr1krn/pppp1p1p/5n2/4p1p1/3P4/P3QP2/1PP1P1PP/BB1RNKRN w GDgd - 0 9 ;D1 31 ;D2 799 ;D3 25627 ;D4 674913 ;D5 22172123 ;D6 609277274 +bq1b1krn/pp1ppppp/3n4/2r5/3p3N/6N1/PPP1PPPP/BQRB1KR1 w GCg - 2 9 ;D1 21 ;D2 798 ;D3 18571 ;D4 688429 ;D5 17546069 ;D6 647165916 +bqrnkbrn/2pp1pp1/p7/1p2p2p/1P6/4N3/P1PPPPPP/BQR1KBRN w GCgc - 0 9 ;D1 27 ;D2 783 ;D3 22327 ;D4 670798 ;D5 20059741 ;D6 624462073 +bqr1krnb/1np1pppp/8/pp1p4/8/2P2N2/PP1PPPPP/BQRNKR1B w FCfc - 0 9 ;D1 28 ;D2 636 ;D3 18874 ;D4 461104 ;D5 14237097 ;D6 372181570 +qbb1rkrn/1ppppppp/p7/7n/8/P2P4/1PP1PPPP/QBBRNKRN w Gg - 0 9 ;D1 25 ;D2 547 ;D3 13837 ;D4 332918 ;D5 8849383 ;D6 229112926 +1rbbnkrn/p1p1pp1p/2q5/1p1p2p1/8/2P3P1/PP1PPP1P/QRBBNKRN w GBgb - 2 9 ;D1 24 ;D2 1010 ;D3 24370 ;D4 983770 ;D5 24328258 ;D6 961371180 +qrb1kbrn/ppp1p2p/4npp1/3p4/8/1PP4P/PR1PPPP1/Q1BNKBRN w Ggb - 1 9 ;D1 18 ;D2 451 ;D3 9291 ;D4 247310 ;D5 5568106 ;D6 155744022 +qr2krnb/p1p1pppp/b1np4/1p6/3NP3/7P/PPPP1PP1/QRBNKR1B w FBfb - 2 9 ;D1 25 ;D2 667 ;D3 17081 ;D4 476030 ;D5 12458875 ;D6 361495148 +qbrnbkrn/ppp3pp/3p4/5p2/2P1pP2/6PP/PP1PP3/QBRNBKRN w GCgc - 0 9 ;D1 24 ;D2 650 ;D3 16835 ;D4 445263 ;D5 12187382 ;D6 326834539 +qrnb1krn/ppp1p1pp/5p2/2Np4/b2P4/2P5/PP2PPPP/QR1BBKRN w GBgb - 0 9 ;D1 27 ;D2 641 ;D3 17490 ;D4 432041 ;D5 12103076 ;D6 310695797 +qrnkbbrn/pp2pp2/8/2pp2pp/6PP/3P4/PPPKPP2/QRN1BBRN w gb - 0 9 ;D1 22 ;D2 554 ;D3 13116 ;D4 357404 ;D5 9014737 ;D6 258925091 +qrnkbrnb/p1p1ppp1/1p6/3p4/3P3p/5N1P/PPP1PPP1/QRNKBR1B w FBfb - 0 9 ;D1 24 ;D2 529 ;D3 13205 ;D4 318722 ;D5 8295874 ;D6 213856651 +qbr1krbn/1pppp1pp/p7/5pn1/2PP4/8/PPB1PPPP/Q1RNKRBN w FCfc - 0 9 ;D1 26 ;D2 831 ;D3 21651 ;D4 696830 ;D5 18961456 ;D6 621884383 +1rnbkrbn/1qp1pppp/3p4/pp6/4P3/1NP4P/PP1P1PP1/QR1BKRBN w FBfb - 0 9 ;D1 24 ;D2 597 ;D3 15089 ;D4 404761 ;D5 10832084 ;D6 307793179 +q1rkrbbn/ppp1pppp/8/3p4/1PnP4/P7/1RP1PPPP/Q1NKRBBN w Ee - 1 9 ;D1 20 ;D2 520 ;D3 10769 ;D4 278067 ;D5 6452205 ;D6 170268300 +qrnkrn1b/ppppp1pp/4b3/7P/6p1/P7/1PPPPP2/QRNKRNBB w EBeb - 0 9 ;D1 26 ;D2 566 ;D3 15623 ;D4 381312 ;D5 10940750 ;D6 287987207 +bbr1nkrn/ppp1pppp/3q4/3p4/8/P7/1PPPPPPP/BBRQNRKN w gc - 5 9 ;D1 19 ;D2 661 ;D3 13895 ;D4 460396 ;D5 10870247 ;D6 356399665 +brqbnkrn/pp1pp2p/5pp1/2p5/4P3/P2P1N2/1PP2PPP/BRQB1KRN w GBgb - 0 9 ;D1 27 ;D2 679 ;D3 19916 ;D4 527306 ;D5 16391730 ;D6 455940859 +2qnkbrn/p1pppppp/8/1r6/1p2bP2/7N/PPPPP1PP/BR1QKBRN w GBg - 4 9 ;D1 18 ;D2 774 ;D3 15713 ;D4 635461 ;D5 14371755 ;D6 559579332 +r1qnkr1b/p1pppppp/7n/1p6/8/1P3b1N/PRPPPPPP/B1QNK1RB w f - 5 9 ;D1 21 ;D2 677 ;D3 15437 ;D4 501520 ;D5 12463801 ;D6 410795298 +rbbqn1rn/pppp1pp1/3k4/4p2Q/2PPP3/8/PP3PPP/RBB1NKRN w GA - 1 9 ;D1 40 ;D2 742 ;D3 28757 ;D4 579833 ;D5 21852196 ;D6 471452088 +rqbbnkrn/3pppp1/p1p4p/1p6/5P2/P2N4/1PPPP1PP/RQBBK1RN w ga - 0 9 ;D1 23 ;D2 665 ;D3 16400 ;D4 492544 ;D5 12794736 ;D6 396640086 +r2nkbrn/pp2pppp/8/2ppqb2/2P3P1/5P2/PP1PPN1P/RQB1KBRN w GAga - 3 9 ;D1 28 ;D2 1108 ;D3 31164 ;D4 1194581 ;D5 34780853 ;D6 1292405738 +rqbnk1nb/p1pppr1p/5p2/1p4p1/1PP1P3/8/P2P1PPP/RQBNKRNB w FAa - 1 9 ;D1 26 ;D2 650 ;D3 18208 ;D4 491403 ;D5 14565370 ;D6 416833400 +rbqnb1rn/p1pp1kpp/1p2pp2/8/4P2P/P5P1/1PPP1P2/RBQNBKRN w GA - 0 9 ;D1 20 ;D2 437 ;D3 9423 ;D4 222154 ;D5 5282124 ;D6 132309824 +rqnbbkrn/p1p1pppp/3p4/1p5B/8/1P1NP3/P1PP1PPP/RQ2BKRN w GAga - 0 9 ;D1 30 ;D2 606 ;D3 18382 ;D4 422491 ;D5 12989786 ;D6 326601372 +rqnkbbr1/ppppp1pp/5p2/7n/8/2PNP2P/PP1P1PP1/RQ1KBBRN w GAga - 1 9 ;D1 23 ;D2 482 ;D3 12506 ;D4 297869 ;D5 8430874 ;D6 217797292 +r1nkbrnb/2ppppp1/1q6/pp5p/1P6/P3P3/2PPKPPP/RQN1BRNB w fa - 2 9 ;D1 25 ;D2 827 ;D3 21518 ;D4 701071 ;D5 19290675 ;D6 632892337 +rbqnkrbn/p1ppppp1/7p/1p6/7P/2N1P3/PPPP1PPB/RBQ1KR1N w FAfa - 1 9 ;D1 30 ;D2 627 ;D3 18566 ;D4 440217 ;D5 12976682 ;D6 337377291 +r1nbkrbn/p1qp1ppp/8/1pp1p3/2P1P3/6P1/PP1PBP1P/RQN1KRBN w FAfa - 2 9 ;D1 22 ;D2 616 ;D3 14503 ;D4 431199 ;D5 10850952 ;D6 335943324 +rqnkr1bn/ppp1ppb1/3p2pp/8/P7/2P2P2/1PKPP1PP/RQN1RBBN w ea - 1 9 ;D1 31 ;D2 679 ;D3 21365 ;D4 493500 ;D5 15661072 ;D6 379844460 +r2krnbb/qppp1ppp/1n6/p3p3/PP6/4N3/N1PPPPPP/RQ1KR1BB w EAea - 4 9 ;D1 24 ;D2 645 ;D3 17054 ;D4 487028 ;D5 13837270 ;D6 416239106 +bbr1qk1n/1ppppp1p/2n5/p7/P7/1P2P3/2PP1PrP/1BRNQKRN w GCc - 0 9 ;D1 18 ;D2 520 ;D3 10680 ;D4 304462 ;D5 7215306 ;D6 207612575 +brnbq1rn/2ppppkp/p5p1/1p6/8/1BP3P1/PP1PPP1P/BRN1QRKN w - - 0 9 ;D1 21 ;D2 625 ;D3 13989 ;D4 419667 ;D5 9929336 ;D6 300902534 +brn1kbrn/pp2p1pp/3p4/q1p2p2/2P4P/6P1/PP1PPP2/BRNQKBRN w GBgb - 1 9 ;D1 18 ;D2 477 ;D3 10205 ;D4 273925 ;D5 6720181 ;D6 187205941 +brn1krnb/p3pppp/1qpp4/1p6/2P3P1/1P6/P2PPP1P/BRNQKRNB w FBfb - 1 9 ;D1 30 ;D2 835 ;D3 24761 ;D4 716151 ;D5 21806428 ;D6 654487872 +r1b1qkrn/1p1ppppp/p1p1n3/8/4P3/1PN5/P1PPQPPb/RBB2KRN w GAga - 0 9 ;D1 28 ;D2 825 ;D3 24536 ;D4 716585 ;D5 22079005 ;D6 647939781 +r1bbqk1n/p1pppprp/n7/1p4p1/5P2/2N3N1/PPPPP1PP/1RBBQKR1 w Ga - 4 9 ;D1 25 ;D2 545 ;D3 14657 ;D4 358854 ;D5 10271111 ;D6 273864588 +rnbqkbrn/p1pp1pp1/4p3/7p/2p4P/2P5/PP1PPPP1/R1BQKBRN w GAga - 0 9 ;D1 17 ;D2 445 ;D3 9076 ;D4 255098 ;D5 5918310 ;D6 174733195 +rnbqkrnb/1p1pp1p1/2p4p/p4p2/3P2P1/7N/PPPBPP1P/RN1QKR1B w FAfa - 0 9 ;D1 34 ;D2 746 ;D3 25319 ;D4 623133 ;D5 21285553 ;D6 569141201 +rbnqbkr1/1ppppp2/p5n1/6pp/4P3/1N6/PPPP1PPP/RBQ1BRKN w ga - 2 9 ;D1 18 ;D2 466 ;D3 9683 ;D4 260864 ;D5 6051500 ;D6 170135726 +rnqb1krn/ppppp1p1/7p/7b/P1P2pPP/8/1P1PPP2/RNQBBKRN w GAga - 0 9 ;D1 24 ;D2 575 ;D3 15400 ;D4 385825 ;D5 11039042 ;D6 291243811 +rnqkbbr1/p1pp1ppp/4p3/1p6/P3P2n/5P2/1PPP1NPP/RNQKBBR1 w GAga - 2 9 ;D1 27 ;D2 803 ;D3 22883 ;D4 694449 ;D5 20666099 ;D6 638696065 +rn1kbrnb/1qppp1pp/1p6/p4p2/1B1P4/1P5N/P1P1PPPP/RNQK1R1B w FAfa - 0 9 ;D1 37 ;D2 1209 ;D3 43015 ;D4 1425600 ;D5 49748034 ;D6 1671593862 +rbnqkrbn/Bppp1p2/p5pp/4p3/5P2/6PP/PPPPP3/RBNQKR1N w FAfa - 0 9 ;D1 29 ;D2 720 ;D3 20434 ;D4 534148 ;D5 15384362 ;D6 421343249 +rnqbkr1n/1p1ppbpp/3p1p2/p7/8/1P6/P1PPPPPP/R1QBKRBN w FAfa - 0 9 ;D1 20 ;D2 657 ;D3 14424 ;D4 492678 ;D5 11843134 ;D6 413965054 +rnqkrb1n/ppppp3/6p1/5p1p/2b2P2/P1N5/1PPPP1PP/RQ1KRBBN w EAea - 1 9 ;D1 28 ;D2 749 ;D3 20684 ;D4 543151 ;D5 15379233 ;D6 417191461 +rnqk1nbb/1pp2ppp/3pr3/p3p3/3P1P2/2N3N1/PPP1P1PP/R1QKR1BB w EAa - 1 9 ;D1 29 ;D2 883 ;D3 26412 ;D4 815098 ;D5 25144295 ;D6 789705382 +bbr1kqrn/p1p1ppp1/1p2n2p/3p4/1P1P4/2N5/P1P1PPPP/BBR1KQRN w GCgc - 0 9 ;D1 22 ;D2 485 ;D3 11475 ;D4 271271 ;D5 6825123 ;D6 171793012 +brnbkq1n/ppp1ppr1/7p/3p2p1/2P3PP/8/PPBPPP2/BRN1KQRN w GBb - 2 9 ;D1 30 ;D2 634 ;D3 19017 ;D4 442537 ;D5 13674310 ;D6 345386924 +brnkqbr1/1pppp1pp/5p2/p7/P1P1P2n/8/1P1P1PP1/BRNKQBRN w GBgb - 0 9 ;D1 21 ;D2 504 ;D3 11672 ;D4 305184 ;D5 7778289 ;D6 217596497 +b1rkqrnb/p1ppp1pp/1p1n4/5p2/5P2/PN5P/1PPPP1P1/BR1KQRNB w FBf - 0 9 ;D1 23 ;D2 688 ;D3 17259 ;D4 531592 ;D5 14228372 ;D6 451842354 +1bbnkqrn/rppppp2/p5p1/7p/7P/P1P1P3/1P1P1PP1/RBBNKQRN w GAg - 1 9 ;D1 25 ;D2 450 ;D3 12391 ;D4 263946 ;D5 7752404 ;D6 185393913 +rnbbkqr1/1pppppp1/7p/p3n3/PP5P/8/1BPPPPP1/RN1BKQRN w GAga - 0 9 ;D1 23 ;D2 543 ;D3 12224 ;D4 305812 ;D5 7549008 ;D6 199883770 +r1bkqbrn/ppppp1pp/8/5p2/3nPP2/1P4N1/P1PP2PP/RNBKQBR1 w GAga - 1 9 ;D1 27 ;D2 751 ;D3 21158 ;D4 600417 ;D5 17989920 ;D6 527273615 +rnbkqr1b/1p1pp1pp/p4p1n/2p5/1P5P/N4P2/P1PPP1P1/R1BKQRNB w FAfa - 0 9 ;D1 21 ;D2 498 ;D3 11738 ;D4 302278 ;D5 7808375 ;D6 216224115 +rbnkbqrn/p1p3pp/1p1p4/B3pp2/3P2P1/6N1/PPP1PP1P/RBNK1QR1 w GAga - 0 9 ;D1 34 ;D2 977 ;D3 33464 ;D4 961128 ;D5 33318567 ;D6 978991050 +r1kbbqrn/ppp3pp/2np1p2/1P2p3/3P1P2/8/P1P1P1PP/RNKBBQRN w GAga - 0 9 ;D1 32 ;D2 920 ;D3 28916 ;D4 844881 ;D5 26763259 ;D6 797524786 +rk1qbbrn/p2npppp/1p6/2p4Q/8/4P3/PPPP1PPP/RNK1B1RN w GA - 2 9 ;D1 35 ;D2 657 ;D3 22359 ;D4 495406 ;D5 16662477 ;D6 419496845 +rnk1brnb/pp1p1pp1/8/q1p1p2p/5P2/NP6/P1PPP1PP/R1KQBRNB w FAfa - 1 9 ;D1 26 ;D2 774 ;D3 20215 ;D4 610661 ;D5 16987110 ;D6 523437649 +rb1kqrbn/npp1ppp1/p7/3P3p/2PP4/8/PP3PPP/RBNKQRBN w FAfa - 0 9 ;D1 35 ;D2 775 ;D3 27395 ;D4 661118 ;D5 23983464 ;D6 625669222 +rnkb1rbn/pp1p2pp/8/2p1pp1q/P6P/1PN5/2PPPPP1/R1KBQRBN w FAfa - 1 9 ;D1 22 ;D2 899 ;D3 21188 ;D4 850597 ;D5 21518343 ;D6 857951339 +rnkqrbbn/1pppp1p1/8/p2N1p1p/2P4P/8/PP1PPPP1/R1KQRBBN w EAea - 0 9 ;D1 29 ;D2 585 ;D3 17571 ;D4 393221 ;D5 12238776 ;D6 299752383 +rnk1r1bb/pp1ppppp/1q4n1/2p5/5P1P/3PP3/PPP3P1/RNKQRNBB w EAea - 1 9 ;D1 27 ;D2 884 ;D3 24613 ;D4 811915 ;D5 23698701 ;D6 790239502 +bbrnkrqn/1ppp1p2/6pp/p3p3/5PP1/2PB4/PP1PP2P/B1RNKRQN w FCfc - 0 9 ;D1 37 ;D2 693 ;D3 25425 ;D4 550527 ;D5 20138432 ;D6 481498664 +b1rbkrqn/ppp2ppp/1n2p3/3p4/6P1/2PP4/PP2PP1P/BRNBKRQN w FBf - 1 9 ;D1 21 ;D2 463 ;D3 10610 ;D4 253204 ;D5 6307276 ;D6 159025909 +brnkrb1n/1pp1p1pp/3p4/p1Nq1p2/2P5/8/PP1PPPPP/BRK1RBQN w eb - 2 9 ;D1 27 ;D2 725 ;D3 17842 ;D4 496072 ;D5 12604078 ;D6 362747791 +brn1r1nb/ppppkppp/4p3/8/2PP1P2/8/PP1KP1PP/BRN1RQNB w - - 1 9 ;D1 25 ;D2 623 ;D3 16874 ;D4 426659 ;D5 12290985 ;D6 317097424 +rbb1krqn/1pp1pp1p/p3n1p1/3pP3/8/1PN5/P1PP1PPP/RBB1KRQN w FAfa d6 0 9 ;D1 23 ;D2 529 ;D3 12641 ;D4 310277 ;D5 7861413 ;D6 202594556 +r1bbkrqn/p1pppppp/8/4n3/1p5P/P2P2P1/1PP1PP2/RNBBKRQN w FAfa - 0 9 ;D1 23 ;D2 571 ;D3 13133 ;D4 346793 ;D5 8699448 ;D6 243460643 +rnbkrbqn/p1pp1ppp/4p3/1p6/8/BPN3P1/P1PPPP1P/R2KRBQN w EAea - 2 9 ;D1 29 ;D2 692 ;D3 20014 ;D4 500375 ;D5 14904192 ;D6 386694739 +rnbkrqn1/pppppp2/8/1Q2b1pp/P3P3/5P2/1PPP2PP/RNBKR1NB w EAea - 0 9 ;D1 37 ;D2 1001 ;D3 36440 ;D4 987842 ;D5 35626426 ;D6 993747544 +rbnkbrqn/p1pppp2/7p/1p4pP/3P1P2/8/PPP1P1P1/RBNKBRQN w FAfa - 0 9 ;D1 30 ;D2 564 ;D3 17143 ;D4 381364 ;D5 11859538 ;D6 293703269 +1nkbbrqn/3ppppp/r1p5/pp6/8/4PP2/PPPPN1PP/RNKBBRQ1 w FAf - 2 9 ;D1 26 ;D2 546 ;D3 14641 ;D4 344592 ;D5 9556962 ;D6 245137199 +rnkrbbq1/pppppnp1/7p/8/1B1Q1p2/3P1P2/PPP1P1PP/RNKR1B1N w DAda - 2 9 ;D1 43 ;D2 887 ;D3 36240 ;D4 846858 ;D5 33185346 ;D6 851927292 +1rkrbqnb/pppppp2/2n3p1/7p/3P3P/P4N2/1PP1PPP1/RNKRBQ1B w DAd - 0 9 ;D1 26 ;D2 622 ;D3 16049 ;D4 403921 ;D5 10786140 ;D6 285233838 +rbnkr1bn/pp1pqp1p/2p1p3/6p1/3P4/7P/PPP1PPP1/RBNKRQBN w EAea - 0 9 ;D1 19 ;D2 566 ;D3 12257 ;D4 381197 ;D5 9107175 ;D6 293397389 +r1kbrqb1/pppp2pp/2n1p1n1/5p1B/4PP2/P7/1PPP2PP/RNK1RQBN w EAea - 2 9 ;D1 39 ;D2 1359 ;D3 53626 ;D4 1876028 ;D5 73871486 ;D6 2633945690 +rnkrqbbn/p1p3pp/1p1ppp2/8/1P6/3P2P1/PKP1PP1P/RN1RQBBN w da - 0 9 ;D1 26 ;D2 776 ;D3 20735 ;D4 611907 ;D5 16884013 ;D6 503561996 +rnkrqnbb/ppp2p1p/3p4/4p1p1/3P3P/N1Q5/PPP1PPP1/R1KR1NBB w DAda - 0 9 ;D1 40 ;D2 1175 ;D3 45637 ;D4 1375884 ;D5 52620163 ;D6 1633655838 +bbrnkrn1/p1pppp2/1p6/6pp/3q4/1P3QP1/P1PPPP1P/BBRNKRN1 w FCfc - 0 9 ;D1 34 ;D2 1398 ;D3 45749 ;D4 1712950 ;D5 57268492 ;D6 2059942014 +br1bkrnq/1p2pppp/pnp5/3p4/P1P5/5P2/1P1PPKPP/BRNB1RNQ w fb - 2 9 ;D1 24 ;D2 501 ;D3 12237 ;D4 284936 ;D5 7049659 ;D6 177940764 +brnkrbn1/pppppp1q/B6p/6p1/8/1P2PP2/P1PP2PP/BRNKR1NQ w EBeb - 0 9 ;D1 34 ;D2 815 ;D3 25868 ;D4 700970 ;D5 22006883 ;D6 639803952 +br1krnqb/pppppp1p/1n4p1/8/8/P2NN3/2PPPPPP/BR1K1RQB w Beb - 2 9 ;D1 37 ;D2 1029 ;D3 36748 ;D4 1025712 ;D5 36214583 ;D6 1026195877 +rbbnkr1q/p1p2ppp/1p1ppn2/8/1PP4P/8/P2PPPP1/RBBNKRNQ w FAfa - 0 9 ;D1 28 ;D2 755 ;D3 22623 ;D4 605106 ;D5 18972778 ;D6 513486101 +r1b1krnq/pp2pppp/1bn5/2pp4/4N3/5P2/PPPPPRPP/R1BBK1NQ w Afa - 0 9 ;D1 24 ;D2 705 ;D3 17427 ;D4 532521 ;D5 13532966 ;D6 426443376 +1nbkrbn1/rpppppqp/p7/6p1/4P3/3P2P1/PPP1KP1P/RNB1RBNQ w e - 1 9 ;D1 31 ;D2 800 ;D3 24748 ;D4 693366 ;D5 21193292 ;D6 625757852 +r1bkrnqb/pp3ppp/n1ppp3/8/1P5P/P7/R1PPPPP1/1NBKRNQB w Eea - 0 9 ;D1 21 ;D2 482 ;D3 11417 ;D4 275339 ;D5 7112890 ;D6 180378139 +rbnkbrnq/ppp1p2p/5p2/3p2p1/1B1P4/1N4P1/PPP1PP1P/RB1K1RNQ w FAfa - 0 9 ;D1 33 ;D2 780 ;D3 25532 ;D4 628945 ;D5 20756770 ;D6 535497008 +rnk1brnq/pp1ppppp/2p5/b7/8/1P2P2P/P1PP1PPQ/RNKBBRN1 w FAfa - 3 9 ;D1 29 ;D2 648 ;D3 19043 ;D4 449637 ;D5 13722785 ;D6 341389148 +rnkrbbnq/p1p3pp/5p2/1p1pp3/P7/1PN2P2/2PPP1PP/R1KRBBNQ w DAda - 0 9 ;D1 26 ;D2 827 ;D3 21865 ;D4 683167 ;D5 18916370 ;D6 589161126 +r1krbnqb/p1pp1ppp/2n1p3/8/1p4P1/PPP5/3PPP1P/RNKRBNQB w DAda - 1 9 ;D1 25 ;D2 540 ;D3 14709 ;D4 331332 ;D5 9491817 ;D6 225389422 +rbnkrnbq/ppp1pp2/3p2p1/2N5/P6p/2P5/1P1PPPPP/RB1KRNBQ w EAea - 0 9 ;D1 32 ;D2 790 ;D3 25107 ;D4 661207 ;D5 20906017 ;D6 578332225 +rnkbrn1q/1ppppppb/8/p4N1p/8/P1N5/1PPPPPPP/R1KBR1BQ w EAea - 0 9 ;D1 31 ;D2 691 ;D3 20813 ;D4 510665 ;D5 15308408 ;D6 404129987 +rnkrnbbq/p1p2ppp/3pp3/1p6/6P1/4PQ1B/PPPP1P1P/RNKRN1B1 w DAda - 0 9 ;D1 29 ;D2 558 ;D3 16800 ;D4 352887 ;D5 10825379 ;D6 246965507 +rnkrnqbb/pp2p1p1/3p3p/2p2p2/5P2/1P1N4/P1PPPQPP/RNKR2BB w DAda - 0 9 ;D1 29 ;D2 762 ;D3 23210 ;D4 644936 ;D5 20522675 ;D6 596067005 +bb1rknnr/ppqppppp/8/2p5/3P1N2/1P6/P1P1PPPP/BBQRKN1R w HDhd - 1 9 ;D1 33 ;D2 963 ;D3 32279 ;D4 1000890 ;D5 34552118 ;D6 1124738493 +bqrbknnr/ppp1p2p/8/3p1p2/5p2/P3N2P/1PPPP1P1/BQRBK1NR w HChc - 0 9 ;D1 20 ;D2 398 ;D3 9009 ;D4 194859 ;D5 4834319 ;D6 113660536 +b1rk1bnr/qpp1pppp/p4n2/3p4/3PPP2/7N/PPP3PP/BQRKNB1R w HChc - 1 9 ;D1 25 ;D2 648 ;D3 16587 ;D4 455720 ;D5 12200870 ;D6 351766307 +bqkrnnrb/pppp2p1/4pp2/4P2p/6P1/7P/PPPP1P2/BQRKNNRB w GC - 1 9 ;D1 30 ;D2 493 ;D3 15118 ;D4 280726 ;D5 8786998 ;D6 181492621 +q1brknnr/1p1ppppp/p7/2p5/8/1PPP4/P2RPPPP/QBB1KNNR w Hhd - 0 9 ;D1 25 ;D2 501 ;D3 13206 ;D4 290463 ;D5 7982978 ;D6 192717198 +qrb1k1nr/ppppb1pp/6n1/4ppN1/3P4/4N3/PPP1PPPP/QRBBK2R w HBhb - 2 9 ;D1 31 ;D2 872 ;D3 26191 ;D4 739276 ;D5 22493014 ;D6 646855304 +1rbknbnr/1ppp1pp1/q6p/p3p3/5P2/2PPB3/PP2P1PP/QR1KNBNR w HBhb - 0 9 ;D1 28 ;D2 1020 ;D3 28147 ;D4 984000 ;D5 27484692 ;D6 947786800 +qrbk2rb/1ppp1ppp/5nn1/p3p3/1N6/P7/1PPPPPPP/QRB1KNRB w gb - 0 9 ;D1 23 ;D2 592 ;D3 14398 ;D4 395716 ;D5 10098215 ;D6 293988585 +qbrk1nnr/1pp1pppp/2b5/p2p4/P2P2P1/8/1PP1PP1P/QBKRBNNR w hc - 1 9 ;D1 26 ;D2 654 ;D3 18103 ;D4 471653 ;D5 13740891 ;D6 373081138 +qrkbbnnr/ppp2p1p/4p3/3p2p1/P7/2PP4/1P2PPPP/QRKBBNNR w HBhb - 0 9 ;D1 25 ;D2 626 ;D3 16616 ;D4 431634 ;D5 12079406 ;D6 324006164 +qr1kbbnr/ppp1pp1p/4n1p1/2Pp4/6P1/4N3/PP1PPP1P/QRK1BBNR w HB d6 0 9 ;D1 26 ;D2 699 ;D3 18068 ;D4 497152 ;D5 13353359 ;D6 375702908 +qrk1b1rb/p1pppppp/3nnQ2/1p6/1P3P2/3P4/P1P1P1PP/1RKNBNRB w GBgb - 3 9 ;D1 43 ;D2 1369 ;D3 55463 ;D4 1831200 ;D5 71514365 ;D6 2427477375 +qbrk1nbr/pppp3p/5n2/4ppp1/3P1P2/4N3/PPP1P1PP/QBKRN1BR w hc - 0 9 ;D1 25 ;D2 752 ;D3 20165 ;D4 615263 ;D5 17493373 ;D6 543180234 +qrkb1nbr/1pppppQp/3n4/p7/5p2/1P1N4/P1PPP1PP/1RKB1NBR w HBhb - 0 9 ;D1 45 ;D2 946 ;D3 40100 ;D4 966903 ;D5 39736157 ;D6 1051910977 +qrk1nbbr/ppp1p1p1/4n2p/3p1p2/1P5P/3P2P1/P1P1PP2/QRKNNBBR w HBhb - 1 9 ;D1 32 ;D2 770 ;D3 25367 ;D4 646977 ;D5 21717615 ;D6 577979364 +qrkn1rbb/pp2pppp/2p5/3p4/P2Qn1P1/1P6/2PPPP1P/1RKNNRBB w FBfb - 0 9 ;D1 38 ;D2 943 ;D3 35335 ;D4 868165 ;D5 31909835 ;D6 798405123 +bbrqknnr/ppp4p/3pp3/5pp1/4PP2/5Q2/PPPP2PP/BBR1KNNR w HChc - 0 9 ;D1 36 ;D2 843 ;D3 29974 ;D4 758528 ;D5 26828059 ;D6 723306114 +1rqbkn1r/p1p1pppp/1p5n/P2p4/3Pb1P1/8/1PP1PP1P/BRQBKNNR w HBhb - 0 9 ;D1 23 ;D2 778 ;D3 19482 ;D4 649789 ;D5 17337683 ;D6 579112676 +br1knbnr/1qp1pppp/pp1p4/8/8/PP6/2PPPPPP/BRQKNBNR w HBhb - 2 9 ;D1 26 ;D2 697 ;D3 18835 ;D4 546622 ;D5 15280079 ;D6 473071890 +brqk2rb/ppppp1pp/4np2/8/2n5/3P1Q2/PP2PPPP/BR1KNNRB w GBgb - 0 9 ;D1 32 ;D2 948 ;D3 30434 ;D4 885713 ;D5 29821322 ;D6 874251866 +r1bqknnr/pp1pp1p1/5p1p/2p1b2N/2P5/8/PPQPPPPP/RBB1K1NR w HAha - 0 9 ;D1 31 ;D2 785 ;D3 25549 ;D4 659952 ;D5 22244193 ;D6 592797491 +rqbbknnr/ppppp2p/5pp1/8/8/1P3PP1/PQPPP2P/R1BBKNNR w HAha - 0 9 ;D1 23 ;D2 391 ;D3 10163 ;D4 198450 ;D5 5576671 ;D6 121267576 +rqbknbnr/1pp1p2p/p7/3p1pp1/7N/1PP5/P2PPPPP/RQBK1BNR w HAha - 0 9 ;D1 27 ;D2 676 ;D3 19606 ;D4 522428 ;D5 15955388 ;D6 448477218 +rqb1nnrb/2ppkppp/1p2p3/p7/2PPP3/1P6/P4PPP/RQBKNNRB w GA - 1 9 ;D1 31 ;D2 727 ;D3 22895 ;D4 570647 ;D5 18361051 ;D6 483248153 +rb1kbn1r/p1ppppp1/qp5n/7p/P7/RPP5/3PPPPP/1BQKBNNR w Hha - 2 9 ;D1 29 ;D2 837 ;D3 23815 ;D4 730083 ;D5 21279560 ;D6 682863811 +rqkbb1nr/p1p2ppp/1p1p2n1/3Np3/4P3/5N2/PPPP1PPP/RQKBB2R w HAha - 0 9 ;D1 28 ;D2 717 ;D3 20663 ;D4 550987 ;D5 16347343 ;D6 453153783 +rqknbbr1/p1pppp1p/1p3np1/8/4P3/2P2P1P/PP1P2P1/RQKNBBNR w HAa - 0 9 ;D1 27 ;D2 650 ;D3 18231 ;D4 475303 ;D5 13847463 ;D6 383256006 +r1k1bnrb/1qpppppp/1p2n3/p7/1P5P/6P1/P1PPPP2/RQKNBNR1 w GAga - 1 9 ;D1 24 ;D2 806 ;D3 20693 ;D4 713220 ;D5 19382263 ;D6 686009788 +rb1knnbr/1pp1ppp1/p2p3p/5q2/3B2P1/3P1P2/PPP1P2P/RBQKNN1R w HAha - 0 9 ;D1 34 ;D2 1360 ;D3 44096 ;D4 1605706 ;D5 51973672 ;D6 1837704407 +rqkb1nbr/p1p1ppp1/1p3n1p/2Qp4/8/2P5/PP1PPPPP/R1KBNNBR w HAha - 2 9 ;D1 39 ;D2 983 ;D3 38218 ;D4 940989 ;D5 36347815 ;D6 918801645 +rqknnbbr/2pppp2/pp5p/6p1/1P1P4/4PP2/P1P3PP/RQKNNBBR w HAha - 0 9 ;D1 26 ;D2 628 ;D3 17638 ;D4 464924 ;D5 13787303 ;D6 386125234 +rqkn1rbb/1pp1pppp/p7/3p4/3Pn3/2P1PP2/PP4PP/RQKNNRBB w FAfa - 1 9 ;D1 20 ;D2 527 ;D3 12216 ;D4 321533 ;D5 8082183 ;D6 219311659 +bbrkqn1r/1pppppp1/5n2/p7/1PP2P1p/7N/P2PP1PP/BBRKQN1R w HChc - 1 9 ;D1 36 ;D2 963 ;D3 35291 ;D4 973839 ;D5 35907489 ;D6 1034223364 +brkbqn1r/p2ppppp/7n/1p6/P1p3PP/8/1PPPPP1N/BRKBQ1NR w HBhb - 0 9 ;D1 18 ;D2 583 ;D3 11790 ;D4 394603 ;D5 8858385 ;D6 304339862 +brkq1bnr/pp1ppp1p/8/2p2np1/P7/8/1PPPPPPP/BRKQNBNR w HBhb - 0 9 ;D1 19 ;D2 552 ;D3 11811 ;D4 354260 ;D5 8432183 ;D6 262293169 +brkqnnrb/1ppppppp/8/8/p3P3/5N2/PPPP1PPP/BRKQ1NRB w GBgb - 3 9 ;D1 21 ;D2 397 ;D3 9653 ;D4 204350 ;D5 5489836 ;D6 128389738 +rbbkq1nr/1p2pppp/p1p3nB/3p4/1Q1P4/6N1/PPP1PPPP/RB1K2NR w HAha - 0 9 ;D1 40 ;D2 1132 ;D3 43404 ;D4 1260470 ;D5 47425783 ;D6 1415578783 +rkbbq1nr/1pppp1p1/4np2/p6p/8/PP3P2/1KPPP1PP/R1BBQNNR w ha - 0 9 ;D1 24 ;D2 596 ;D3 15220 ;D4 402121 ;D5 10822049 ;D6 302056813 +r1bqn1nr/pkpppp1p/1p4pb/8/PN6/R7/1PPPPPPP/1KBQ1BNR w H - 2 9 ;D1 33 ;D2 794 ;D3 25450 ;D4 649150 ;D5 20919309 ;D6 561073410 +rkb1nnrb/1pppq1pp/p4p2/4p3/5P2/1P1PB3/P1P1P1PP/RK1QNNRB w GAga - 0 9 ;D1 26 ;D2 625 ;D3 17050 ;D4 442036 ;D5 12515042 ;D6 342967558 +rbkqbn1r/pppp1p1p/2n1p1p1/8/8/1P1PP1N1/P1P2PPP/RBKQB1NR w HAha - 1 9 ;D1 30 ;D2 660 ;D3 20308 ;D4 492714 ;D5 15348335 ;D6 403323883 +rkqbb1n1/pppppppr/8/6np/5P2/8/PPPPP1PP/RKQBBNNR w HAa - 6 9 ;D1 23 ;D2 500 ;D3 12154 ;D4 292936 ;D5 7519117 ;D6 196524441 +rkqnbbnr/ppppppp1/8/7p/3N4/6PP/PPPPPP2/RKQNBB1R w HAa - 0 9 ;D1 24 ;D2 484 ;D3 12495 ;D4 284570 ;D5 7775173 ;D6 193947530 +rkqnb1rb/p1p1pppp/1p1p4/2n5/3P4/2P1N1N1/PP2PPPP/RKQ1B1RB w GAga - 0 9 ;D1 28 ;D2 1020 ;D3 29124 ;D4 1027904 ;D5 30515456 ;D6 1073711823 +rbk1nnbr/1ppq1ppp/p2p4/4p3/P3B2P/2P5/1P1PPPP1/R1KQNNBR w HAha - 2 9 ;D1 38 ;D2 998 ;D3 37265 ;D4 1047592 ;D5 38552638 ;D6 1139322479 +r1qbn1br/k1pppppp/6n1/pp6/5P1P/P7/1PPPP1PB/RKQBNN1R w HA - 1 9 ;D1 22 ;D2 549 ;D3 12867 ;D4 348574 ;D5 8725809 ;D6 251613569 +rkqnn1br/pppp3p/4p1pb/5p2/P2P4/7P/1PP1PPPB/RKQNNB1R w HAha - 1 9 ;D1 32 ;D2 659 ;D3 21249 ;D4 469701 ;D5 15434721 ;D6 365761521 +rk1nnrbb/p1p1pppp/1p6/3p1q2/P3P3/2NN4/1PPP1PPP/RKQ2RBB w FAfa - 3 9 ;D1 29 ;D2 989 ;D3 29087 ;D4 980477 ;D5 29643404 ;D6 998848556 +bbrk1q1r/ppppppp1/3n4/7p/3Pn3/6PN/PPP1PPNP/BBRK1Q1R w HChc - 2 9 ;D1 23 ;D2 712 ;D3 16551 ;D4 516177 ;D5 12995202 ;D6 411077508 +brkbnq1r/p1ppp2p/5ppn/1p6/5P2/1P1P2P1/P1P1P2P/BRKBNQNR w HBhb - 0 9 ;D1 28 ;D2 856 ;D3 24984 ;D4 780503 ;D5 23529352 ;D6 754501112 +br1k1bnr/ppppp1pp/4np2/1B2P2q/3P4/8/PPP2PPP/BRKNQ1NR w HB - 3 9 ;D1 36 ;D2 1214 ;D3 40615 ;D4 1328331 ;D5 45096834 ;D6 1470987023 +brk1qnrb/pnppp1p1/1p6/5p1p/8/5PPP/PPPPP1R1/BRKNQN1B w Bgb - 0 9 ;D1 22 ;D2 551 ;D3 13111 ;D4 353317 ;D5 9040545 ;D6 259643605 +rbbkn1nr/1ppp2pp/p3p3/2q2p2/3P4/6P1/PPPBPP1P/RB1KNQNR w HAha - 0 9 ;D1 31 ;D2 1060 ;D3 31332 ;D4 1015099 ;D5 30314172 ;D6 976268967 +rkbbn1nr/ppppp1pp/8/6N1/5p2/1q6/P1PPPPPP/RKBBN1QR w HAha - 0 9 ;D1 3 ;D2 72 ;D3 1919 ;D4 50827 ;D5 1400832 ;D6 39654253 +rkb2bnr/pp2pppp/2p1n3/3p4/q2P4/5NP1/PPP1PP1P/RKBNQBR1 w Aha - 0 9 ;D1 29 ;D2 861 ;D3 24504 ;D4 763454 ;D5 22763215 ;D6 731511256 +rkbq1nrb/ppppppp1/7p/8/1P1n4/P4P1P/2PPP1P1/RKBNQNRB w GAga - 0 9 ;D1 25 ;D2 672 ;D3 17631 ;D4 473864 ;D5 12954224 ;D6 361237536 +rbknb1nr/ppp1qp1p/6p1/3pp3/3P3P/2B1P3/PPP2PP1/RBKN1QNR w HAha - 1 9 ;D1 27 ;D2 857 ;D3 24688 ;D4 792538 ;D5 23790033 ;D6 768247869 +rknbbq1r/p1pppppp/1p2N3/8/3n4/2P5/PP1PPPPP/RK1BBQNR w HAha - 4 9 ;D1 29 ;D2 763 ;D3 22138 ;D4 574054 ;D5 16926075 ;D6 447896703 +r1nqbbnr/1pppp1pp/1k6/p4p2/8/4P3/PPPP1PPP/RKN1BBNR w HA - 0 9 ;D1 26 ;D2 658 ;D3 17302 ;D4 464039 ;D5 12380488 ;D6 349047256 +rkn2qrb/ppp1pppp/6n1/1b1p4/1P6/4PPB1/P1PP2PP/RKNQ1NRB w GAga - 3 9 ;D1 23 ;D2 574 ;D3 14070 ;D4 370324 ;D5 9501401 ;D6 263870337 +rbkn2br/ppppp1p1/4np1p/1P5q/8/2P1N3/P2PPPPP/RBK1QNBR w HAha - 1 9 ;D1 29 ;D2 992 ;D3 29506 ;D4 999564 ;D5 30148787 ;D6 1045942540 +1knbqnbr/1ppppp1p/r5p1/p7/7P/2PN2P1/PP1PPP2/RK1BQNBR w HAh - 2 9 ;D1 26 ;D2 698 ;D3 19395 ;D4 512023 ;D5 14848229 ;D6 402599313 +rk1qnbbr/pnpppp1p/6p1/1p6/3P4/1P6/P1P1PPPP/RKNQNBBR w HAha - 1 9 ;D1 20 ;D2 480 ;D3 11159 ;D4 287539 ;D5 7425917 ;D6 203194521 +rknqnrbb/pp1p2p1/5p1p/2p1p3/2P1P3/P2P4/1P3PPP/RKNQNRBB w FAfa - 0 9 ;D1 26 ;D2 679 ;D3 18116 ;D4 494953 ;D5 13790137 ;D6 392629571 +bbrk2qr/pp1p1ppp/3n2n1/2p1p3/3P1P2/6N1/PPP1P1PP/BBRKN1QR w HChc - 0 9 ;D1 26 ;D2 790 ;D3 21521 ;D4 673269 ;D5 19259490 ;D6 617563700 +b1krnnqr/1p1ppppp/p1p5/b6B/P7/4P1N1/1PPP1PPP/BRK1N1QR w HB - 2 9 ;D1 26 ;D2 625 ;D3 16451 ;D4 415452 ;D5 11490615 ;D6 304805107 +1rknnbqr/3ppppp/p7/1pp5/4b2P/P4P2/1PPPP1PR/BRKNNBQ1 w Bhb - 1 9 ;D1 24 ;D2 757 ;D3 19746 ;D4 618777 ;D5 17275100 ;D6 544309489 +br1nn1rb/pppkpqpp/3p1p2/8/PP6/4N3/1KPPPPPP/BR2NQRB w - - 3 9 ;D1 24 ;D2 682 ;D3 17129 ;D4 482711 ;D5 13057308 ;D6 375033550 +rbbkn1qr/pppp2p1/6np/4pp2/7N/7P/PPPPPPPR/RBBK1NQ1 w Aha - 0 9 ;D1 22 ;D2 586 ;D3 14158 ;D4 409891 ;D5 10607781 ;D6 324452612 +rk1bn1qr/pppbpppp/4n3/4p3/4P3/5P2/PPPP2PP/RKBB1NQR w HAha - 1 9 ;D1 22 ;D2 530 ;D3 13440 ;D4 348004 ;D5 9514787 ;D6 259898748 +rkbnnbqr/1ppp1ppp/p7/4p3/8/QP3P2/P1PPP1PP/RKBNNB1R w HAha - 0 9 ;D1 29 ;D2 705 ;D3 21511 ;D4 551042 ;D5 17524731 ;D6 472356665 +1kbnnqrb/1pp1p1pp/r4p2/p2p4/N4P2/3P4/PPP1P1PP/RKB1NQRB w GAg - 2 9 ;D1 21 ;D2 623 ;D3 14979 ;D4 437554 ;D5 11601134 ;D6 343214006 +rbknbn1r/pppp1p1p/4p1q1/8/P1P3Pp/8/1P1PPP2/RBKNBNQR w HAha - 0 9 ;D1 30 ;D2 813 ;D3 24959 ;D4 708454 ;D5 23379040 ;D6 692576573 +rk1bb1qr/2pppppp/p2nn3/1p4P1/6QP/8/PPPPPP2/RKNBBN1R w HAha - 2 9 ;D1 36 ;D2 857 ;D3 30124 ;D4 757524 ;D5 26485812 ;D6 696999449 +rkn1bbqr/p2ppppp/2p1n3/1p6/4PP2/6PP/PPPP4/RKNNBBQR w HAha - 0 9 ;D1 33 ;D2 687 ;D3 22744 ;D4 511018 ;D5 17101732 ;D6 412778368 +rkn1bqrb/pnp1pppp/3p4/8/Pp6/1N2NP2/1PPPP1PP/RK2BQRB w GAga - 0 9 ;D1 28 ;D2 591 ;D3 17174 ;D4 406025 ;D5 12182448 ;D6 312575205 +rbk1n1br/ppp1ppqp/2n5/2Np2p1/8/2P5/PPBPPPPP/R1KN1QBR w HAha - 4 9 ;D1 35 ;D2 930 ;D3 30663 ;D4 844433 ;D5 27160490 ;D6 780616047 +rknbn1br/1ppp1ppp/p3p3/8/1q6/2P2N1P/P2PPPP1/RKNB1QBR w HAha - 0 9 ;D1 4 ;D2 157 ;D3 3697 ;D4 138102 ;D5 3454704 ;D6 125373395 +rkn1qbbr/pp3ppp/4n3/2ppp3/4P1P1/P2P4/1PP2P1P/RKNNQBBR w HAha - 0 9 ;D1 28 ;D2 840 ;D3 24437 ;D4 771328 ;D5 23200961 ;D6 756489357 +rkn1qrbb/pp1ppp2/2p1n1p1/7p/2P2P1P/6P1/PP1PP3/RKNNQRBB w FAfa - 1 9 ;D1 32 ;D2 867 ;D3 27595 ;D4 757836 ;D5 24485663 ;D6 688115847 +b1rknnrq/bpppp1p1/p6p/5p1P/6P1/4N3/PPPPPP2/BBRKN1RQ w GCgc - 1 9 ;D1 33 ;D2 851 ;D3 28888 ;D4 763967 ;D5 26686205 ;D6 731944177 +brkb1nr1/pppppp2/3n2pp/3B4/1P6/4P3/PqPP1PPP/BRK1NNRQ w GBgb - 2 9 ;D1 4 ;D2 98 ;D3 2965 ;D4 76143 ;D5 2352530 ;D6 64251468 +brk1nbrq/1ppppn1p/6p1/p4p2/P5P1/5R2/1PPPPP1P/BRKNNB1Q w Bgb - 0 9 ;D1 29 ;D2 922 ;D3 27709 ;D4 879527 ;D5 27463717 ;D6 888881062 +brkn1rqb/1p1ppppp/3n4/p1p5/1P3P2/8/PNPPP1PP/BR1KNRQB w fb - 1 9 ;D1 29 ;D2 633 ;D3 19399 ;D4 469818 ;D5 15076198 ;D6 396737074 +rb1k1nrq/pbp1pppp/1p1p1n2/8/5P2/4NN1P/PPPPP1P1/RBBK2RQ w GAga - 2 9 ;D1 28 ;D2 841 ;D3 24056 ;D4 710751 ;D5 20772996 ;D6 613798447 +rkbbnnrq/p1pp3p/4p1p1/1p3p2/P6P/1P6/1BPPPPP1/RK1BNNRQ w GAga - 0 9 ;D1 33 ;D2 957 ;D3 30668 ;D4 907217 ;D5 29735654 ;D6 903933626 +rk2nbrq/p1ppppp1/bpn5/7p/6P1/2N2P2/PPPPP1QP/RKB1NBR1 w GAga - 2 9 ;D1 24 ;D2 687 ;D3 18206 ;D4 544627 ;D5 15518417 ;D6 484217179 +rkbn1r1b/pp1pppnp/6q1/2p3p1/5P1P/4N3/PPPPP1P1/RKB1NRQB w FAfa - 1 9 ;D1 23 ;D2 831 ;D3 21254 ;D4 754622 ;D5 21126103 ;D6 744755212 +rbknb1rq/ppp1p1p1/3pnp1p/8/6PP/2PP4/PP2PP2/RBKNBNRQ w GAga - 0 9 ;D1 31 ;D2 838 ;D3 26800 ;D4 736910 ;D5 24008129 ;D6 677776408 +rknbb1rq/p1pn1ppp/4p3/1p1p4/2P5/1P2N1P1/P2PPP1P/RKNBB1RQ w GAga - 1 9 ;D1 29 ;D2 830 ;D3 24798 ;D4 721630 ;D5 22243832 ;D6 660040360 +rk1nbbrq/pp1p1ppp/3n4/P3p3/2p4P/8/1PPPPPP1/RKNNBBRQ w GAga - 1 9 ;D1 24 ;D2 484 ;D3 12776 ;D4 297419 ;D5 8379748 ;D6 214004367 +rknnbr1b/ppp2pqp/3p4/4p1p1/7P/3P1P2/PPP1P1P1/RKNNBRQB w FAfa - 0 9 ;D1 32 ;D2 838 ;D3 26408 ;D4 740701 ;D5 23472124 ;D6 699211365 +rb1k1rbq/ppppN1pp/2nn4/5p2/7P/8/PPPPPPP1/RBK1NRBQ w FA - 1 9 ;D1 27 ;D2 800 ;D3 22785 ;D4 701742 ;D5 20804424 ;D6 660917073 +r1nbnrbq/kppppp1p/6p1/8/p1PP1P2/4P3/PP4PP/RKNBNRBQ w FA - 1 9 ;D1 28 ;D2 757 ;D3 21198 ;D4 602699 ;D5 17180857 ;D6 507618340 +rkn1rbbq/p1pppppp/2n5/1pP5/8/1N2P3/PP1P1PPP/RK1NRBBQ w EAea - 1 9 ;D1 22 ;D2 483 ;D3 11890 ;D4 283679 ;D5 7497674 ;D6 191130942 +rknnrqbb/2pppppp/8/p7/Np3P2/3P4/PPP1P1PP/RKN1RQBB w EAea - 0 9 ;D1 25 ;D2 536 ;D3 14456 ;D4 339180 ;D5 9694947 ;D6 245669668 +bb1rknrn/1qppppp1/1p4B1/p6N/8/2P5/PP1PPPPP/B1QRK1RN w GDgd - 1 9 ;D1 32 ;D2 715 ;D3 22421 ;D4 575008 ;D5 17860156 ;D6 502410909 +b1rbknrn/qpp1ppp1/p6p/3p4/2P5/1P1P1P2/P3P1PP/BQRBKNRN w GCgc - 0 9 ;D1 30 ;D2 818 ;D3 24421 ;D4 688711 ;D5 20981488 ;D6 611986786 +bqkrnbrn/1pp1pp1p/p7/1B1p2p1/4P3/7P/PPPP1PP1/BQKRN1RN w - - 0 9 ;D1 28 ;D2 676 ;D3 18366 ;D4 478054 ;D5 13126287 ;D6 363765666 +bqrknrnb/1p2ppp1/p1pp3p/8/3P1P2/1PP5/P3P1PP/BQRKNRNB w FCfc - 0 9 ;D1 31 ;D2 646 ;D3 20686 ;D4 455607 ;D5 14984618 ;D6 349082278 +qbbrkn1r/pppppp1p/8/6p1/2P1Pn1P/6N1/PP1P1PP1/QBBRKNR1 w GDd - 3 9 ;D1 20 ;D2 532 ;D3 11581 ;D4 303586 ;D5 7512432 ;D6 202967948 +1rbbknr1/p1ppp1pp/1pq2pn1/8/3P4/P3P3/QPP2PPP/1RBBKNRN w GBgb - 3 9 ;D1 31 ;D2 1002 ;D3 30581 ;D4 999607 ;D5 30642468 ;D6 1009228283 +qrbkn1rn/pppp1ppp/8/6b1/P1P1Pp2/8/1P1P2PP/QRBKNBRN w GBgb - 0 9 ;D1 22 ;D2 505 ;D3 12447 ;D4 304863 ;D5 8192621 ;D6 214730959 +qrbk1rnb/p2ppp1p/5n2/1pp3p1/8/7P/PPPPPPPN/QRBKR1NB w Bfb - 0 9 ;D1 20 ;D2 619 ;D3 13448 ;D4 449630 ;D5 10571176 ;D6 369603424 +qbrkb1r1/ppp2ppp/3pn1n1/P3p3/4P3/3P4/1PP2PPP/QBRKBNRN w GCgc - 1 9 ;D1 26 ;D2 755 ;D3 20596 ;D4 604483 ;D5 17164382 ;D6 510878835 +qrkbb1r1/ppp1pnpp/3p2n1/5p2/1P3P2/2Q3N1/P1PPP1PP/1RKBB1RN w GBgb - 0 9 ;D1 35 ;D2 918 ;D3 32244 ;D4 870888 ;D5 30933394 ;D6 867833733 +qrknbbrn/ppp1ppp1/8/7p/2Bp4/4PPP1/PPPP3P/QRKNB1RN w GBgb - 0 9 ;D1 27 ;D2 593 ;D3 16168 ;D4 376808 ;D5 10422676 ;D6 258348640 +qrk1brnb/ppppp3/4n2p/5pp1/2PP4/2N4P/PP2PPP1/QRK1BRNB w FBfb - 2 9 ;D1 24 ;D2 672 ;D3 17447 ;D4 506189 ;D5 13765777 ;D6 414930519 +qbrknrb1/p2ppppp/2p3n1/8/p4P2/6PP/1PPPP3/QBRKNRBN w FCfc - 0 9 ;D1 29 ;D2 759 ;D3 23235 ;D4 634493 ;D5 20416668 ;D6 584870558 +1rkb1rbn/p1pp1ppp/3np3/1p6/4qP2/3NB3/PPPPPRPP/QRKB3N w Bfb - 0 9 ;D1 22 ;D2 923 ;D3 22585 ;D4 914106 ;D5 24049880 ;D6 957218571 +1rknrbbn/p1pp1p1p/8/1p2p1p1/4qPP1/2P5/PP1PP1BP/QRKNR1BN w EBeb - 0 9 ;D1 28 ;D2 1309 ;D3 36355 ;D4 1568968 ;D5 44576409 ;D6 1846382333 +qrk1rn1b/ppppp2p/4n3/3b1pp1/4P2P/5BP1/PPPP1P2/QRKNRNB1 w EBeb - 3 9 ;D1 26 ;D2 839 ;D3 22189 ;D4 726354 ;D5 19978260 ;D6 661207281 +bbrqk1rn/pp1ppppp/8/2p5/2P1P3/5n1P/PPBP1PP1/B1RQKNRN w GCgc - 1 9 ;D1 3 ;D2 95 ;D3 2690 ;D4 85038 ;D5 2518864 ;D6 80775549 +brqbk2n/pppppprp/8/6p1/1P3n2/5P2/P1PPP1PP/R1QBKNRN w Gb - 2 9 ;D1 22 ;D2 593 ;D3 13255 ;D4 362760 ;D5 8922397 ;D6 253271592 +brqknbr1/pp3ppp/3p2n1/2p1p3/2P5/5P2/PPKPP1PP/BRQ1NBRN w gb - 0 9 ;D1 21 ;D2 590 ;D3 13190 ;D4 397355 ;D5 9581695 ;D6 304103516 +1rqknrnb/2pp1ppp/p3p3/1p6/P2P4/5bP1/1PP1PP1P/BRQKNRNB w FBfb - 0 9 ;D1 24 ;D2 737 ;D3 20052 ;D4 598439 ;D5 17948681 ;D6 536330341 +rbb1k1rn/p1pqpppp/6n1/1p1p4/5P2/3PP3/PPP1K1PP/RBBQ1NRN w ga - 3 9 ;D1 24 ;D2 694 ;D3 16773 ;D4 513782 ;D5 13094823 ;D6 419402704 +rqbbknr1/1ppp2pp/p5n1/4pp2/P7/1PP5/1Q1PPPPP/R1BBKNRN w GAga - 0 9 ;D1 24 ;D2 600 ;D3 15347 ;D4 408207 ;D5 11029596 ;D6 308553169 +rqbknbrn/2pppppp/6Q1/pp6/8/2P5/PP1PPPPP/R1BKNBRN w GAga - 2 9 ;D1 40 ;D2 949 ;D3 34100 ;D4 889887 ;D5 31296485 ;D6 881529007 +rqbknr1b/pp1ppp2/2p2n1p/6p1/8/3P1PPP/PPP1P3/RQBKNRNB w FAfa - 0 9 ;D1 20 ;D2 560 ;D3 12275 ;D4 373921 ;D5 8687544 ;D6 277906201 +rbqkbnrn/p3pppp/1p6/3p4/P1p3P1/1P6/1QPPPP1P/RB1KBNRN w GAga - 0 9 ;D1 30 ;D2 1155 ;D3 35865 ;D4 1351455 ;D5 43092716 ;D6 1614019629 +rqkbb1rn/p1p1pppn/1p1p4/7p/4PP2/7P/PPPPB1P1/RQK1BNRN w GAga - 1 9 ;D1 30 ;D2 701 ;D3 20804 ;D4 515942 ;D5 15450970 ;D6 401499189 +rqknbbrn/1p2pp1p/3p2p1/p1p5/P2P4/1P6/1KP1PPPP/RQ1NBBRN w ga - 0 9 ;D1 28 ;D2 756 ;D3 21655 ;D4 610320 ;D5 17989811 ;D6 525585996 +rqknbrnb/1pp3pp/5p2/p2pp3/P7/3PPN2/1PP2PPP/RQKNBR1B w FAfa - 0 9 ;D1 26 ;D2 731 ;D3 19509 ;D4 550395 ;D5 15209404 ;D6 439767476 +rbqkr1bn/p1pppp1p/1p1n4/6p1/7P/3P1PP1/PPP1P3/RBQKNRBN w FAa - 0 9 ;D1 27 ;D2 586 ;D3 16282 ;D4 381604 ;D5 10905865 ;D6 274364342 +rqk1nrb1/ppbp1ppp/4p1n1/2p5/7P/1PP5/P2PPPP1/RQKBNRBN w FAfa - 1 9 ;D1 27 ;D2 749 ;D3 21480 ;D4 602318 ;D5 18084787 ;D6 520547029 +rqknrbbn/pp1p1ppp/4p3/2p5/3P2P1/7P/PPP1PP2/RQKNRBBN w EAa - 0 9 ;D1 20 ;D2 533 ;D3 11829 ;D4 336248 ;D5 8230417 ;D6 245871540 +rqknrnbb/pp1ppp1p/2p3p1/8/8/1P2P1NP/P1PP1PP1/RQKNR1BB w EAea - 0 9 ;D1 22 ;D2 633 ;D3 14480 ;D4 441877 ;D5 10827868 ;D6 343525739 +1brkq1rn/2pppppp/1p2n3/p2bN3/8/7P/PPPPPPP1/BBRKQ1RN w GCgc - 2 9 ;D1 27 ;D2 748 ;D3 20134 ;D4 580054 ;D5 16010135 ;D6 475206624 +brkbqnrn/2pp1ppp/8/1p2p3/Pp2N3/8/2PPPPPP/BRKBQNR1 w GBgb - 0 9 ;D1 30 ;D2 827 ;D3 25308 ;D4 757837 ;D5 23746165 ;D6 751690068 +brk1nbrn/pp1ppppp/2p5/7P/5P2/q2P4/PPP1P1P1/BRKQNBRN w GBgb - 1 9 ;D1 15 ;D2 471 ;D3 8716 ;D4 276424 ;D5 5960901 ;D6 190316951 +brkqnrnb/1p1pp1p1/p4p2/2p4p/8/P2PP3/1PP1QPPP/BRK1NRNB w FBfb - 0 9 ;D1 24 ;D2 479 ;D3 12584 ;D4 280081 ;D5 7830230 ;D6 190419716 +rbbkqnrn/2ppp2p/pp3p2/6p1/P6P/8/RPPPPPP1/1BBKQNRN w Gga - 0 9 ;D1 21 ;D2 523 ;D3 12125 ;D4 328733 ;D5 8322614 ;D6 242240658 +rkbbqr1n/1ppppppn/7p/p7/4P3/2P2P2/PP1PB1PP/RKB1QNRN w GAa - 3 9 ;D1 27 ;D2 563 ;D3 16026 ;D4 372148 ;D5 11105151 ;D6 283211800 +rkbqnbrn/ppppp3/8/5ppp/2P3P1/7P/PPQPPP2/RKB1NBRN w GAga - 0 9 ;D1 28 ;D2 639 ;D3 19250 ;D4 469250 ;D5 14872172 ;D6 384663405 +rkb1nrnb/pppp1pp1/5q1p/8/P3p3/4R1P1/1PPPPP1P/1KBQNRNB w Ffa - 0 9 ;D1 28 ;D2 873 ;D3 23690 ;D4 720814 ;D5 20209424 ;D6 625281937 +rbkqb1rn/1p1ppppp/4n3/p1p5/8/3PBP2/PPP1P1PP/RBKQ1NRN w GAga - 0 9 ;D1 26 ;D2 798 ;D3 21416 ;D4 667496 ;D5 18475618 ;D6 591681956 +rk1qbnrn/1p1ppppp/1b6/p1p5/P7/2P3NP/1P1PPPP1/RKQBB1RN w GAga - 0 9 ;D1 22 ;D2 506 ;D3 12313 ;D4 301029 ;D5 7891676 ;D6 205739580 +rk1nbbrn/ppp1ppp1/8/3p3p/1P1P2q1/5PB1/P1P1P1PP/RKQN1BRN w GAga - 1 9 ;D1 31 ;D2 956 ;D3 29219 ;D4 903799 ;D5 27827461 ;D6 876341492 +rkqnbr1b/pp1pppp1/7p/2p2n2/P2P4/7N/RPP1PPPP/1KQNBR1B w Ffa - 0 9 ;D1 31 ;D2 750 ;D3 24267 ;D4 646252 ;D5 21639104 ;D6 617064197 +rbkq1rbn/2p1pppp/pp3n2/3p4/5P2/3N2N1/PPPPP1PP/RBKQR1B1 w Afa - 2 9 ;D1 26 ;D2 647 ;D3 18027 ;D4 465119 ;D5 13643783 ;D6 369702807 +rkqbr1bn/p2ppppp/1pp2n2/8/5P2/3P1N2/PPP1PRPP/RKQB2BN w Aa - 3 9 ;D1 24 ;D2 574 ;D3 14593 ;D4 371597 ;D5 10066892 ;D6 271121237 +rk1qrbbn/p1ppp1pp/1p2n3/5p2/1P6/K3N3/P1PPPPPP/R1Q1RBBN w ea - 0 9 ;D1 25 ;D2 548 ;D3 14069 ;D4 340734 ;D5 9043111 ;D6 235545764 +rkqnrnbb/pp1pp3/2p5/5ppp/8/PP4NP/2PPPPP1/RKQNR1BB w EAea - 0 9 ;D1 23 ;D2 727 ;D3 18228 ;D4 566572 ;D5 15078056 ;D6 471296844 +bbrknq1r/ppppppp1/8/7p/5n2/3P4/PPP1PNPP/BBKRNQR1 w c - 0 9 ;D1 21 ;D2 610 ;D3 13300 ;D4 394705 ;D5 9605845 ;D6 293532398 +brkbnqr1/2pppnpp/pp3p2/8/4PPPP/8/PPPP4/BRKBNQRN w GBgb - 1 9 ;D1 30 ;D2 757 ;D3 23908 ;D4 621332 ;D5 20360394 ;D6 548380577 +brk1qb1n/ppppppr1/2n3pp/8/2P3P1/2N5/PP1PPP1P/BR1KQBRN w b - 1 9 ;D1 26 ;D2 570 ;D3 15537 ;D4 352883 ;D5 10081351 ;D6 242864559 +brknq1nb/pp2prpp/8/2pP1p2/6P1/2N5/PPPP1P1P/BRK1QRNB w FBb - 1 9 ;D1 33 ;D2 830 ;D3 27897 ;D4 764915 ;D5 26262884 ;D6 765831403 +rbbk1qrn/ppp1p1pp/5p2/3p1n2/7N/P7/1PPPPPPP/RBB1KQRN w ga - 0 9 ;D1 21 ;D2 562 ;D3 13060 ;D4 378883 ;D5 9520963 ;D6 290579255 +rk1b1qrn/ppp1pppp/5n2/3pN3/P6P/7b/1PPPPPP1/RKBB1QRN w GAga - 4 9 ;D1 28 ;D2 677 ;D3 19235 ;D4 488740 ;D5 14354779 ;D6 383207197 +rkbnqbrn/pp1ppp1p/2p5/6p1/P7/4P3/KPPPQPPP/R1BN1BRN w - - 3 9 ;D1 28 ;D2 585 ;D3 17443 ;D4 401483 ;D5 12574541 ;D6 310495538 +rk1nqrnb/pbpppp2/1p4p1/7p/P7/5NP1/1PPPPPBP/RKBNQR2 w FAfa - 2 9 ;D1 26 ;D2 774 ;D3 21626 ;D4 645200 ;D5 19093408 ;D6 576325868 +rbknb1rn/p1pp2pp/1p6/4pp2/1q3P1B/2N5/PPPPPNPP/RBK2QR1 w GAga - 2 9 ;D1 31 ;D2 1206 ;D3 36940 ;D4 1374158 ;D5 42849564 ;D6 1555711209 +rk1bbqrn/pp1pp1pp/3n4/5p2/3p4/1PP5/PK2PPPP/R1NBBQRN w ga - 0 9 ;D1 21 ;D2 629 ;D3 14059 ;D4 429667 ;D5 10587910 ;D6 332632033 +rknqbbr1/p1pp1pp1/1p4n1/4p2p/4P1P1/6RB/PPPP1P1P/RKNQB2N w Aga - 0 9 ;D1 27 ;D2 753 ;D3 20918 ;D4 593155 ;D5 17318772 ;D6 507563675 +rknqbr1b/pppp1ppp/4p2n/8/1P3P2/4P3/P1PPN1PP/RKNQBR1B w FAfa - 2 9 ;D1 26 ;D2 623 ;D3 17177 ;D4 460663 ;D5 13389799 ;D6 383508368 +r2kqrbn/bppppppp/2n5/p4B2/5P2/2P5/PP1PP1PP/1RKNQRBN w F - 2 9 ;D1 39 ;D2 1026 ;D3 37800 ;D4 1011922 ;D5 35946987 ;D6 992756232 +rk1bqrb1/ppppppp1/1n6/7p/2P2P1n/4P1Q1/PP1P2PP/RKNB1RBN w FAfa - 0 9 ;D1 35 ;D2 760 ;D3 25817 ;D4 610557 ;D5 21014787 ;D6 536852043 +rkq1rb1n/ppppp1pp/1n6/5p2/PPb2P2/8/1KPPP1PP/R1NQRBBN w ea - 1 9 ;D1 27 ;D2 754 ;D3 21009 ;D4 568788 ;D5 16461795 ;D6 448313956 +rknqr2b/pppnp1pp/3p4/3b1p2/8/1N1P2N1/PPP1PPPP/RKQ1R1BB w EAea - 1 9 ;D1 27 ;D2 803 ;D3 23708 ;D4 700453 ;D5 21875031 ;D6 654754840 +bbrknrqn/ppppp1pB/8/2P2p1p/8/5N2/PP1PPPPP/B1RK1RQN w FCfc - 0 9 ;D1 30 ;D2 799 ;D3 23923 ;D4 671112 ;D5 20532790 ;D6 603059376 +brkbnrq1/1pppp1p1/6np/p4p2/4P3/1PP5/P1KP1PPP/BR1BNRQN w fb - 1 9 ;D1 27 ;D2 726 ;D3 19329 ;D4 555622 ;D5 15156662 ;D6 457601127 +brknrbq1/1p1p1ppp/p3p1n1/2p5/8/1P1BPP2/P1PP2PP/BRKNR1QN w EBeb - 0 9 ;D1 36 ;D2 786 ;D3 27868 ;D4 655019 ;D5 22852433 ;D6 577223409 +brknrqnb/p2ppp1p/2p5/1p6/3P2p1/P1P1N3/1P2PPPP/BRK1RQNB w EBeb - 0 9 ;D1 23 ;D2 649 ;D3 15169 ;D4 440504 ;D5 10687843 ;D6 320881984 +rbbk1rqn/1ppppppp/3n4/p7/2P5/3N4/PP1PPPPP/RBB1KRQN w fa - 1 9 ;D1 20 ;D2 478 ;D3 11094 ;D4 275250 ;D5 7094988 ;D6 185488058 +rkbbnrqn/p2p1ppp/1p2p3/8/P1p1P3/1BP5/1P1P1PPP/RKB1NRQN w FAfa - 0 9 ;D1 22 ;D2 570 ;D3 13295 ;D4 346811 ;D5 8671852 ;D6 229898448 +rkb1rb1n/ppppppqp/8/2n3p1/2P1P1P1/8/PP1P1P1P/RKBNRBQN w EAea - 1 9 ;D1 23 ;D2 663 ;D3 16212 ;D4 490748 ;D5 12900485 ;D6 404944553 +rkb1rqnb/pppp3p/2n3p1/4pp2/P2P3P/2P5/1P2PPP1/RKBNRQNB w EAea - 0 9 ;D1 25 ;D2 845 ;D3 22188 ;D4 741972 ;D5 20276176 ;D6 683290790 +rbk1brqn/ppp1pppp/8/3p4/7P/1P4P1/2PPPP2/RBKNBRQN w FAfa - 0 9 ;D1 24 ;D2 526 ;D3 13862 ;D4 322175 ;D5 9054028 ;D6 222704171 +rknbbrqn/pp3pp1/4p3/2pp3p/2P5/8/PPBPPPPP/RKN1BRQN w FAfa - 0 9 ;D1 26 ;D2 756 ;D3 19280 ;D4 559186 ;D5 14697705 ;D6 433719427 +1knrbbqn/rp1p1ppp/p3p3/2p5/8/5P1P/PPPPP1P1/RKNRBBQN w DAd - 0 9 ;D1 26 ;D2 539 ;D3 15194 ;D4 345070 ;D5 10223443 ;D6 248715580 +rknr1qnb/ppp1p1pp/3p2b1/8/4p3/1P3P1P/P1PP2P1/RKNRBQNB w DAda - 0 9 ;D1 25 ;D2 701 ;D3 18969 ;D4 561369 ;D5 16047041 ;D6 496340789 +rbk1r1bn/ppppp1pp/4n3/5p2/1P3P2/4N2P/PqPPP1P1/RBK1RQBN w EAea - 1 9 ;D1 2 ;D2 60 ;D3 1319 ;D4 41765 ;D5 1017864 ;D6 33183408 +r1nbrqbn/k1ppp1pp/1p6/p4p2/2P5/6PQ/PP1PPP1P/RKNBR1BN w EA - 0 9 ;D1 27 ;D2 699 ;D3 20436 ;D4 561765 ;D5 17192121 ;D6 499247248 +rknrqbbn/1pp1pp2/p5p1/3p3p/6P1/PN5P/1PPPPP2/RK1RQBBN w DAda - 0 9 ;D1 23 ;D2 611 ;D3 15515 ;D4 435927 ;D5 11917036 ;D6 352885930 +rknrqn1b/p1pp1ppb/8/1p2p1Qp/3P4/3N4/PPP1PPPP/RK1R1NBB w DAda - 0 9 ;D1 45 ;D2 1170 ;D3 48283 ;D4 1320341 ;D5 52213677 ;D6 1500007485 +bbkrnrnq/p2p1ppp/2p1p3/1p6/1P2Q3/6P1/P1PPPP1P/BBKRNRN1 w - - 0 9 ;D1 41 ;D2 1035 ;D3 39895 ;D4 1035610 ;D5 38555608 ;D6 1037686769 +brkbnr2/1ppppp1p/7n/p5N1/P2q4/8/1PPPPPPP/BRKBNRQ1 w FBfb - 1 9 ;D1 22 ;D2 869 ;D3 19234 ;D4 679754 ;D5 16453359 ;D6 567287944 +brknrbnq/p1ppppp1/1p6/7p/2PP4/5P2/PPK1P1PP/BR1NRBNQ w eb - 1 9 ;D1 23 ;D2 641 ;D3 14748 ;D4 422240 ;D5 10192718 ;D6 302864305 +brk1r1qb/pp1ppnpp/2p2pn1/8/6N1/2N3P1/PPPPPP1P/BRK1R1QB w EBeb - 3 9 ;D1 32 ;D2 863 ;D3 28379 ;D4 773191 ;D5 25848794 ;D6 720443112 +rbbk1rnq/pppp1pp1/4p2p/8/3P2n1/4BN1P/PPP1PPP1/RB1K1RNQ w FAfa - 3 9 ;D1 26 ;D2 628 ;D3 16151 ;D4 411995 ;D5 11237919 ;D6 300314373 +rkbbnr1q/p1pppppp/5n2/1p5B/PP6/4P3/2PP1PPP/RKB1NRNQ w FAfa - 0 9 ;D1 30 ;D2 692 ;D3 21036 ;D4 519283 ;D5 16025428 ;D6 420887328 +rkb1rbnq/1pppp1pp/5p2/p7/5n1P/1PN3P1/P1PPPP2/RKB1RBNQ w EAea - 0 9 ;D1 32 ;D2 825 ;D3 27130 ;D4 697251 ;D5 23593363 ;D6 622249676 +rkbnrnqb/1ppp1p1p/p5p1/4p3/4P3/2N2P2/PPPP2PP/RKBR1NQB w Aea - 0 9 ;D1 24 ;D2 487 ;D3 13300 ;D4 301989 ;D5 8782713 ;D6 215787079 +rbknbr1q/pppp2pp/4p3/5p1n/1P2P2N/8/P1PP1PPP/RBKNBR1Q w FAfa - 0 9 ;D1 23 ;D2 571 ;D3 13799 ;D4 365272 ;D5 9224232 ;D6 257288920 +rknbb1nq/pppppr2/5pp1/7p/8/1N4P1/PPPPPP1P/RK1BBRNQ w FAa - 2 9 ;D1 26 ;D2 548 ;D3 15618 ;D4 350173 ;D5 10587626 ;D6 253006082 +rknr1bnq/p2pp1pp/1p3p2/2p4b/6PP/2P2N2/PP1PPP2/RKNRBB1Q w DAda - 1 9 ;D1 25 ;D2 502 ;D3 13150 ;D4 279098 ;D5 7824941 ;D6 175766730 +rknrb1qb/ppp1pppp/3p4/8/4P1nP/2P5/PPKP1PP1/R1NRBNQB w da - 1 9 ;D1 23 ;D2 643 ;D3 14849 ;D4 426616 ;D5 10507328 ;D6 312096061 +rbk1rnbq/pppp1npp/4p3/5p2/4P1P1/7P/PPPP1P1N/RBKNR1BQ w EAea - 1 9 ;D1 24 ;D2 591 ;D3 15178 ;D4 376988 ;D5 10251465 ;D6 263574861 +rknbrnb1/p1pppp1p/1p6/3N2p1/P3q1P1/8/1PPPPP1P/RKNBR1BQ w EAea - 1 9 ;D1 28 ;D2 948 ;D3 27343 ;D4 864588 ;D5 26241141 ;D6 812343987 +rknrn1b1/ppppppqp/8/6p1/2P5/2P1BP2/PP2P1PP/RKNRNB1Q w DAda - 1 9 ;D1 31 ;D2 807 ;D3 24360 ;D4 672973 ;D5 20455205 ;D6 588518645 +1k1rnqbb/npppppp1/r7/p2B3p/5P2/1N4P1/PPPPP2P/RK1RNQB1 w DAd - 0 9 ;D1 40 ;D2 1122 ;D3 44297 ;D4 1249989 ;D5 48711073 ;D6 1412437357 +bbqr1rkn/pp1ppppp/8/2p5/1P2P1n1/7N/P1PP1P1P/BBQRKR1N w FD - 0 9 ;D1 26 ;D2 841 ;D3 22986 ;D4 746711 ;D5 21328001 ;D6 705170410 +bqkr1rnn/1ppp1ppp/p4b2/4p3/P7/3PP2N/1PP2PPP/BQRBKR1N w FC - 3 9 ;D1 24 ;D2 500 ;D3 12802 ;D4 293824 ;D5 7928916 ;D6 197806842 +bqrkrbnn/1pp1ppp1/8/p6p/3p4/P3P2P/QPPP1PP1/B1RKRBNN w ECec - 0 9 ;D1 31 ;D2 592 ;D3 18585 ;D4 396423 ;D5 12607528 ;D6 298629240 +bqkrrnnb/2p1pppp/p7/1P1p4/8/2R3P1/PP1PPP1P/BQ1KRNNB w E - 0 9 ;D1 42 ;D2 1124 ;D3 45187 ;D4 1276664 ;D5 50052573 ;D6 1483524894 +qbbrkrn1/p1pppn1p/8/1p3Pp1/2P5/8/PP1PPP1P/QBBRKRNN w FDfd - 0 9 ;D1 21 ;D2 577 ;D3 13244 ;D4 392131 ;D5 9683808 ;D6 300294295 +qrbbkrnn/pp1p2pp/4p3/5p2/2p2P1P/2P5/PP1PP1P1/QRBBKRNN w FBfb - 0 9 ;D1 21 ;D2 571 ;D3 12736 ;D4 345681 ;D5 8239872 ;D6 228837930 +qrbkrbn1/1pp1pppp/p2p4/8/5PPn/2P5/PP1PP3/QRBKRBNN w EBeb - 0 9 ;D1 18 ;D2 466 ;D3 9443 ;D4 257776 ;D5 5679073 ;D6 162883949 +qrb1rnnb/pp1p1ppp/2pk4/4p3/1P2P3/1R6/P1PP1PPP/Q1BKRNNB w E - 4 9 ;D1 37 ;D2 760 ;D3 26863 ;D4 562201 ;D5 19486022 ;D6 421740856 +qbrkbrn1/p1pppp1p/6n1/1p4p1/1P6/5P2/P1PPPBPP/QBRK1RNN w FCfc - 1 9 ;D1 33 ;D2 824 ;D3 27385 ;D4 750924 ;D5 25176664 ;D6 734656217 +qrkbbr2/2pppppp/5nn1/pp1Q4/P7/3P4/1PP1PPPP/1RKBBRNN w FBfb - 0 9 ;D1 42 ;D2 1147 ;D3 44012 ;D4 1311247 ;D5 48216013 ;D6 1522548864 +qrkrbbnn/pp2pp2/2pp2pp/1B6/P7/4P3/1PPP1PPP/QRKRB1NN w DBdb - 0 9 ;D1 26 ;D2 464 ;D3 12653 ;D4 242892 ;D5 6928220 ;D6 142507795 +qrkrbnnb/p1pp1pp1/1p5p/4p3/1P6/6PN/PKPPPP1P/QR1RBN1B w db - 0 9 ;D1 29 ;D2 705 ;D3 20000 ;D4 529810 ;D5 15055365 ;D6 419552571 +qbrkr1bn/p1p1pp1p/1p1p2n1/6p1/3P1P2/4P3/PPP3PP/QBKRRNBN w ec - 2 9 ;D1 23 ;D2 613 ;D3 14835 ;D4 426484 ;D5 10747407 ;D6 323905533 +qrk1rnb1/p1pp1ppp/1p2Bbn1/8/4P3/6P1/PPPP1P1P/QRK1RNBN w EBeb - 1 9 ;D1 28 ;D2 927 ;D3 24887 ;D4 846839 ;D5 23063284 ;D6 807913585 +1qkrnbbn/1rpppppp/pp6/5N2/P4P2/8/1PPPP1PP/QRKRNBB1 w DBd - 3 9 ;D1 30 ;D2 542 ;D3 16646 ;D4 345172 ;D5 10976745 ;D6 251694423 +qrkr2bb/pppppppp/8/1n2n3/1N5P/1P6/P1PPPPP1/QRKR1NBB w DBdb - 1 9 ;D1 28 ;D2 719 ;D3 21048 ;D4 562015 ;D5 17351761 ;D6 479400272 +bbrqkrnn/3ppppp/8/ppp5/6P1/4P2N/PPPPKP1P/BBRQ1R1N w fc - 0 9 ;D1 21 ;D2 704 ;D3 16119 ;D4 546215 ;D5 13676371 ;D6 470796854 +brqbkrnn/1pp2p1p/3pp1p1/p5N1/8/1P6/P1PPPPPP/BRQBK1RN w Bfb - 0 9 ;D1 34 ;D2 688 ;D3 22827 ;D4 505618 ;D5 16639723 ;D6 402140795 +br1krb1n/2qppppp/pp3n2/8/1P4P1/8/P1PPPP1P/1RQKRBNN w EBeb - 0 9 ;D1 24 ;D2 945 ;D3 23943 ;D4 926427 ;D5 25019636 ;D6 959651619 +brqkr1nb/2ppp1pp/1p2np2/p7/2P1PN2/8/PP1P1PPP/BRQKRN1B w EBeb - 0 9 ;D1 28 ;D2 675 ;D3 19728 ;D4 504128 ;D5 15516491 ;D6 417396563 +rbbqkrnn/3pppp1/p7/1pp4p/2P1P2P/8/PP1P1PP1/RBBQKRNN w FAfa - 0 9 ;D1 26 ;D2 671 ;D3 18164 ;D4 496806 ;D5 14072641 ;D6 404960259 +rqbbkr1n/pp1p1p1p/4pn2/2p3p1/4P1P1/3P3P/PPP2P2/RQBBKRNN w FAfa - 0 9 ;D1 22 ;D2 633 ;D3 14629 ;D4 441809 ;D5 10776416 ;D6 335689685 +rqbkrbnn/p1ppp3/1p3pp1/7p/3P4/P1P5/1PQ1PPPP/R1BKRBNN w EAea - 0 9 ;D1 32 ;D2 607 ;D3 20339 ;D4 454319 ;D5 15586203 ;D6 383515709 +rqbkrnn1/pp2ppbp/3p4/2p3p1/2P5/1P3N1P/P2PPPP1/RQBKRN1B w EAea - 1 9 ;D1 29 ;D2 943 ;D3 28732 ;D4 908740 ;D5 28761841 ;D6 907579129 +rbqkb1nn/1ppppr1p/p5p1/5p2/1P6/2P4P/P1KPPPP1/RBQ1BRNN w a - 1 9 ;D1 22 ;D2 441 ;D3 10403 ;D4 231273 ;D5 5784206 ;D6 140934555 +rqkb1rnn/1pp1pp1p/p5p1/1b1p4/3P4/P5P1/RPP1PP1P/1QKBBRNN w Ffa - 1 9 ;D1 21 ;D2 505 ;D3 11592 ;D4 290897 ;D5 7147063 ;D6 188559137 +rq1rbbnn/pkp1ppp1/3p3p/1p2N1P1/8/8/PPPPPP1P/RQKRBB1N w DA - 0 9 ;D1 27 ;D2 608 ;D3 16419 ;D4 387751 ;D5 10808908 ;D6 268393274 +rqkrb2b/p2ppppp/2p3nn/1p6/5P2/PP1P4/2P1P1PP/RQKRBNNB w DAda - 1 9 ;D1 30 ;D2 749 ;D3 21563 ;D4 581531 ;D5 16916813 ;D6 485406712 +rbqkr1bn/pp1ppp2/2p1n2p/6p1/8/4BPNP/PPPPP1P1/RBQKRN2 w EAea - 0 9 ;D1 23 ;D2 600 ;D3 15082 ;D4 410057 ;D5 11041820 ;D6 314327867 +rqkbrnb1/2ppp1pp/pp3pn1/8/5P2/B2P4/PPP1P1PP/RQKBRN1N w EAea - 2 9 ;D1 22 ;D2 569 ;D3 13541 ;D4 371471 ;D5 9395816 ;D6 269460607 +rqkrnbb1/p1p1pppp/1p4n1/3p4/7P/P3P3/1PPPBPP1/RQKRN1BN w DAda - 0 9 ;D1 27 ;D2 579 ;D3 15565 ;D4 373079 ;D5 10238486 ;D6 266047417 +rqkrn1bb/p1ppp1pp/4n3/1p6/6p1/4N3/PPPPPPPP/RQKR2BB w DAda - 0 9 ;D1 20 ;D2 462 ;D3 10234 ;D4 274162 ;D5 6563859 ;D6 193376359 +bbrkqr2/pppp1ppp/6nn/8/2P1p3/3PP2N/PP3PPP/BBRKQR1N w FCfc - 0 9 ;D1 28 ;D2 724 ;D3 21688 ;D4 619064 ;D5 19318355 ;D6 593204629 +brk1qrnn/1pppbppp/4p3/8/1p6/P1P4P/3PPPP1/BRKBQRNN w FBfb - 1 9 ;D1 24 ;D2 662 ;D3 16920 ;D4 468215 ;D5 12610387 ;D6 355969349 +1r1qrbnn/p1pkpppp/1p1p4/8/3P1PP1/P4b2/1PP1P2P/BRKQRBNN w EB - 1 9 ;D1 22 ;D2 696 ;D3 17021 ;D4 510247 ;D5 13697382 ;D6 401903030 +1rkqrnnb/p1p1p1pp/1p1p4/3b1p1N/4P3/5N2/PPPP1PPP/BRKQR2B w EBeb - 1 9 ;D1 29 ;D2 887 ;D3 27035 ;D4 816176 ;D5 26051242 ;D6 791718847 +rbbkq1rn/pppppppp/7n/8/P7/3P3P/1PPKPPP1/RBB1QRNN w a - 3 9 ;D1 22 ;D2 417 ;D3 9900 ;D4 216855 ;D5 5505063 ;D6 134818483 +rkbbqr1n/1p1pppp1/2p2n2/p4NBp/8/3P4/PPP1PPPP/RK1BQRN1 w FAfa - 0 9 ;D1 37 ;D2 832 ;D3 30533 ;D4 728154 ;D5 26676373 ;D6 673756141 +rkbqrb1n/3pBppp/ppp2n2/8/8/P2P4/1PP1PPPP/RK1QRBNN w EAea - 0 9 ;D1 28 ;D2 685 ;D3 19718 ;D4 543069 ;D5 16033316 ;D6 482288814 +rkb1rn1b/ppppqppp/4p3/8/1P2n1P1/5Q2/P1PP1P1P/RKB1RNNB w EAea - 2 9 ;D1 37 ;D2 1158 ;D3 40114 ;D4 1234768 ;D5 44672979 ;D6 1389312729 +r1kqbrnn/pp1pp1p1/7p/2P2p2/5b2/3P4/P1P1P1PP/RBKQBRNN w FAfa - 0 9 ;D1 5 ;D2 161 ;D3 4745 ;D4 154885 ;D5 4734999 ;D6 157499039 +rkqbbr1n/ppp1ppp1/8/Q2p3p/4n3/3P1P2/PPP1P1PP/RK1BBRNN w FAfa - 2 9 ;D1 38 ;D2 1144 ;D3 40433 ;D4 1236877 ;D5 43832975 ;D6 1366087771 +rkqrbbn1/p1ppppp1/Bp5p/8/P6n/2P1P3/1P1P1PPP/RKQRB1NN w DAda - 0 9 ;D1 28 ;D2 551 ;D3 15488 ;D4 350861 ;D5 9944107 ;D6 251179183 +rkqrb1nb/1ppp1ppp/p7/4p3/5n2/3P2N1/PPPQPPPP/RK1RB1NB w DAda - 0 9 ;D1 26 ;D2 690 ;D3 19877 ;D4 513628 ;D5 15965907 ;D6 418191735 +rbkqrnbn/pppp1p2/4p1p1/7p/7P/P2P4/BPP1PPP1/R1KQRNBN w EAea - 0 9 ;D1 27 ;D2 515 ;D3 13992 ;D4 309727 ;D5 8792550 ;D6 218658292 +rkqbrnbn/pp1ppp2/8/2p3p1/P1P4p/5P2/1PKPP1PP/R1QBRNBN w ea - 0 9 ;D1 27 ;D2 627 ;D3 16843 ;D4 431101 ;D5 11978698 ;D6 328434174 +rkqrnbbn/1p2pp1p/3p2p1/p1p5/P5PP/3N4/1PPPPP2/RKQR1BBN w DAda - 0 9 ;D1 23 ;D2 624 ;D3 15512 ;D4 451860 ;D5 11960861 ;D6 367311176 +rk2rnbb/ppqppppp/2pn4/8/1P3P2/6P1/P1PPP1NP/RKQR1NBB w DAa - 1 9 ;D1 27 ;D2 727 ;D3 20206 ;D4 581003 ;D5 16633696 ;D6 505212747 +b1krrqnn/pp1ppp1p/2p3p1/8/P3Pb1P/1P6/2PP1PP1/BBRKRQNN w EC - 0 9 ;D1 32 ;D2 943 ;D3 30759 ;D4 865229 ;D5 28672582 ;D6 800922511 +1rkbrqnn/p1pp1ppp/1p6/8/P2Pp3/8/1PPKPPQP/BR1BR1NN w eb - 0 9 ;D1 28 ;D2 916 ;D3 24892 ;D4 817624 ;D5 22840279 ;D6 759318058 +brkrqb1n/1pppp1pp/p7/3n1p2/P5P1/3PP3/1PP2P1P/BRKRQBNN w DBdb - 0 9 ;D1 27 ;D2 669 ;D3 18682 ;D4 484259 ;D5 13956472 ;D6 380267099 +brkrqnnb/3pppp1/1p6/p1p4p/2P3P1/6N1/PP1PPP1P/BRKRQ1NB w DBdb - 0 9 ;D1 29 ;D2 699 ;D3 20042 ;D4 512639 ;D5 15093909 ;D6 406594531 +r1bkrq1n/pp2pppp/3b1n2/2pp2B1/6P1/3P1P2/PPP1P2P/RB1KRQNN w EAea - 2 9 ;D1 27 ;D2 835 ;D3 22848 ;D4 713550 ;D5 19867800 ;D6 631209313 +rk1brq1n/p1p1pppp/3p1n2/1p3b2/4P3/2NQ4/PPPP1PPP/RKBBR2N w EAea - 4 9 ;D1 36 ;D2 1004 ;D3 35774 ;D4 979608 ;D5 35143142 ;D6 966310885 +rkbrqbnn/1p2ppp1/B1p5/p2p3p/4P2P/8/PPPP1PP1/RKBRQ1NN w DAda - 0 9 ;D1 27 ;D2 748 ;D3 21005 ;D4 597819 ;D5 17597073 ;D6 515304215 +rkbrqn1b/pp1pp1pp/2p2p2/5n2/8/2P2P2/PP1PP1PP/RKBRQ1NB w DAda - 0 9 ;D1 20 ;D2 479 ;D3 10485 ;D4 266446 ;D5 6253775 ;D6 167767913 +rbkrbnn1/ppppp1pp/5q2/5p2/5P2/P3P2N/1PPP2PP/RBKRBQ1N w DAda - 3 9 ;D1 28 ;D2 947 ;D3 26900 ;D4 876068 ;D5 26007841 ;D6 838704143 +rkr1bqnn/1ppp1p1p/p5p1/4p3/3PP2b/2P2P2/PP4PP/RKRBBQNN w CAca - 0 9 ;D1 31 ;D2 1004 ;D3 32006 ;D4 1006830 ;D5 32688124 ;D6 1024529879 +rkrqbbnn/pppp3p/8/4ppp1/1PP4P/8/P2PPPP1/RKRQBBNN w CAca - 0 9 ;D1 24 ;D2 717 ;D3 18834 ;D4 564137 ;D5 15844525 ;D6 484884485 +rkrqbn1b/pppp2pp/8/4pp2/1P1P2n1/5N2/P1P1PP1P/RKRQBN1B w CAca - 0 9 ;D1 25 ;D2 718 ;D3 19654 ;D4 587666 ;D5 17257753 ;D6 537354146 +rbkrqnbn/p1p1ppp1/1p1p4/8/3PP2p/2PB4/PP3PPP/R1KRQNBN w DAda - 0 9 ;D1 30 ;D2 754 ;D3 23298 ;D4 611322 ;D5 19338246 ;D6 532603566 +1krbqnbn/1p2pppp/r1pp4/p7/8/1P1P2PP/P1P1PP2/RKRBQNBN w CAc - 0 9 ;D1 21 ;D2 566 ;D3 13519 ;D4 375128 ;D5 9700847 ;D6 279864836 +rkrq1b2/pppppppb/3n2np/2N5/4P3/7P/PPPP1PP1/RKRQ1BBN w CAca - 1 9 ;D1 33 ;D2 654 ;D3 21708 ;D4 479678 ;D5 15990307 ;D6 382218272 +rkr1nnbb/ppp2p1p/3p1qp1/4p3/P5P1/3PN3/1PP1PP1P/RKRQN1BB w CAca - 1 9 ;D1 28 ;D2 715 ;D3 20361 ;D4 555328 ;D5 16303092 ;D6 468666425 +bbrkrnqn/1p1ppppp/8/8/p2pP3/PP6/2P2PPP/BBRKRNQN w ECec - 0 9 ;D1 24 ;D2 757 ;D3 19067 ;D4 603231 ;D5 15957628 ;D6 509307623 +brkbrnqn/ppp2p2/4p3/P2p2pp/6P1/5P2/1PPPP2P/BRKBRNQN w EBeb - 0 9 ;D1 25 ;D2 548 ;D3 14563 ;D4 348259 ;D5 9688526 ;D6 247750144 +brkr1bqn/1pppppp1/3n3p/1p6/P7/4P1P1/1PPP1P1P/BRKRN1QN w DBdb - 0 9 ;D1 19 ;D2 359 ;D3 7430 ;D4 157099 ;D5 3521652 ;D6 81787718 +brkr1qnb/pppp2pp/2B1p3/5p2/2n5/6PP/PPPPPPN1/BRKR1QN1 w DBdb - 1 9 ;D1 27 ;D2 854 ;D3 23303 ;D4 741626 ;D5 20558538 ;D6 667089231 +rbbkrnqn/p1p1p1pp/8/1p1p4/1P1Pp3/6N1/P1P2PPP/RBBKRNQ1 w EAea - 0 9 ;D1 28 ;D2 723 ;D3 19844 ;D4 514440 ;D5 14621108 ;D6 397454100 +rkbbrn1n/pppppp2/5q1p/6p1/3P3P/4P3/PPP2PP1/RKBBRNQN w EAea - 1 9 ;D1 25 ;D2 741 ;D3 19224 ;D4 585198 ;D5 15605840 ;D6 485037906 +rkbr1bq1/ppnppppp/6n1/2p5/2P1N2P/8/PP1PPPP1/RKBRNBQ1 w DAda - 3 9 ;D1 24 ;D2 547 ;D3 14359 ;D4 339497 ;D5 9410221 ;D6 234041078 +1kbrnqnb/r1ppppp1/8/pp5p/8/1P1NP3/P1PP1PPP/RKB1RQNB w Ad - 2 9 ;D1 26 ;D2 618 ;D3 17305 ;D4 442643 ;D5 13112297 ;D6 357030697 +rbkrb1qn/1pp1ppp1/3pn2p/pP6/8/4N1P1/P1PPPP1P/RBKRB1QN w DAda - 0 9 ;D1 21 ;D2 544 ;D3 12492 ;D4 338832 ;D5 8381483 ;D6 236013157 +rkrbbnqn/ppppp3/5p2/6pp/5PBP/4P3/PPPP2P1/RKR1BNQN w CAca - 0 9 ;D1 30 ;D2 891 ;D3 25435 ;D4 764356 ;D5 21894752 ;D6 669256602 +rkr1bb1n/ppppp1pp/5p2/4n3/3QP3/5P2/RPPP2PP/1KRNBB1N w Cca - 1 9 ;D1 45 ;D2 1172 ;D3 51766 ;D4 1332060 ;D5 57856784 ;D6 1501852662 +rkr1bqnb/pp1ppppp/8/2pN4/1P6/5N2/P1PPnPPP/RKR1BQ1B w CAca - 0 9 ;D1 28 ;D2 730 ;D3 20511 ;D4 559167 ;D5 16323242 ;D6 463032124 +rbkrnqb1/2ppppp1/p5np/1p6/8/3N4/PPPPPPPP/RBKRQNB1 w DAda - 2 9 ;D1 20 ;D2 417 ;D3 9159 ;D4 217390 ;D5 5180716 ;D6 133936564 +rkrbnqb1/p1pppnpp/5p2/1p6/2P5/1P1P1N2/P3PPPP/RKRB1QBN w CAca - 0 9 ;D1 25 ;D2 546 ;D3 14039 ;D4 330316 ;D5 8813781 ;D6 222026485 +rkr1qbbn/ppppppp1/4n3/7p/8/P7/KPPPPPPP/R1RNQBBN w ca - 0 9 ;D1 22 ;D2 484 ;D3 11458 ;D4 267495 ;D5 6633319 ;D6 163291279 +rkrnqnb1/1ppppp2/p5p1/7p/8/P1bPP3/1PP1QPPP/RKRN1NBB w CAca - 0 9 ;D1 22 ;D2 636 ;D3 15526 ;D4 441001 ;D5 11614241 ;D6 331083405 +b2krn1q/p1rppppp/1Q3n2/2p1b3/1P4P1/8/P1PPPP1P/BBRKRNN1 w ECe - 3 9 ;D1 36 ;D2 1192 ;D3 42945 ;D4 1406795 ;D5 50382104 ;D6 1650202838 +brkbrnn1/pp1pppp1/7q/2p5/6Pp/4P1NP/PPPP1P2/BRKBR1NQ w EBeb - 2 9 ;D1 30 ;D2 978 ;D3 29593 ;D4 942398 ;D5 29205057 ;D6 936568065 +brkrnb1q/pp1p1ppp/2p1p3/5n2/1P6/5N1N/P1PPPPPP/BRKR1B1Q w DBdb - 1 9 ;D1 31 ;D2 897 ;D3 27830 ;D4 810187 ;D5 25423729 ;D6 755334868 +brkr1nqb/pp1p1pp1/2pn3p/P3p3/4P3/6P1/1PPP1P1P/BRKRNNQB w DBdb - 0 9 ;D1 19 ;D2 382 ;D3 8052 ;D4 182292 ;D5 4232274 ;D6 103537333 +r1bkrn1q/ppbppppp/5n2/2p5/3P4/P6N/1PP1PPPP/RBBKRNQ1 w EAea - 3 9 ;D1 27 ;D2 822 ;D3 22551 ;D4 678880 ;D5 19115128 ;D6 578210135 +rkbbrnnq/pp2pppp/8/2pp4/P1P5/1P3P2/3PP1PP/RKBBRNNQ w EAea - 1 9 ;D1 23 ;D2 643 ;D3 15410 ;D4 442070 ;D5 11170489 ;D6 329615708 +rkbr1b1q/p1pppppp/1p1n4/7n/5QP1/3N4/PPPPPP1P/RKBR1BN1 w DAda - 4 9 ;D1 37 ;D2 943 ;D3 34382 ;D4 880474 ;D5 31568111 ;D6 842265141 +rkbr1nqb/pppp2np/8/4ppp1/1P6/6N1/P1PPPPPP/RKBRN1QB w DAda - 1 9 ;D1 23 ;D2 574 ;D3 13260 ;D4 362306 ;D5 9020291 ;D6 261247606 +rbkr1nnq/p1p1pp1p/1p4p1/3p4/b3P3/4N3/PPPPNPPP/RBKRB1Q1 w DAda - 0 9 ;D1 26 ;D2 900 ;D3 23414 ;D4 805006 ;D5 21653203 ;D6 745802405 +rkrbb1nq/p2pppp1/1p4n1/2p4p/3N4/4P1P1/PPPP1P1P/RKRBBN1Q w CAca - 0 9 ;D1 32 ;D2 697 ;D3 22231 ;D4 531121 ;D5 17150175 ;D6 441578567 +rkrnbb1q/pp2pp1p/6pn/2pp4/2B1P2P/8/PPPP1PP1/RKRNB1NQ w CAca - 0 9 ;D1 28 ;D2 854 ;D3 23853 ;D4 755990 ;D5 21823412 ;D6 712787248 +rk2bnqb/pprpppp1/4n2p/2p5/P7/3P2NP/1PP1PPP1/RKRNB1QB w CAa - 1 9 ;D1 26 ;D2 596 ;D3 16251 ;D4 414862 ;D5 11758184 ;D6 323043654 +r1krnnbq/pp1ppp1p/6p1/2p5/2P5/P3P3/Rb1P1PPP/1BKRNNBQ w Dda - 0 9 ;D1 2 ;D2 61 ;D3 1312 ;D4 40072 ;D5 937188 ;D6 28753562 +1krbnnbq/1pp1p1pp/r7/p2p1p2/3PP3/2P3P1/PP3P1P/RKRBNNBQ w CAc - 0 9 ;D1 30 ;D2 953 ;D3 28033 ;D4 860530 ;D5 25531358 ;D6 787205262 +rkr1nbbq/2ppp1pp/1pn5/p4p2/P6P/3P4/1PP1PPPB/RKRNNB1Q w CAca - 1 9 ;D1 24 ;D2 645 ;D3 15689 ;D4 446423 ;D5 11484012 ;D6 341262639 +rkrnnqbb/p1ppp2p/Qp6/4Pp2/5p2/8/PPPP2PP/RKRNN1BB w CAca - 0 9 ;D1 35 ;D2 929 ;D3 32020 ;D4 896130 ;D5 31272517 ;D6 915268405 +bbq1nr1r/pppppk1p/2n2p2/6p1/P4P2/4P1P1/1PPP3P/BBQNNRKR w HF - 1 9 ;D1 23 ;D2 589 ;D3 14744 ;D4 387556 ;D5 10316716 ;D6 280056112 -- 2.47.3 From 6629525938334e7f0fa9dcbcdd583cdfc2e94d9a Mon Sep 17 00:00:00 2001 From: rektdie Date: Mon, 16 Nov 2026 19:37:10 +0100 Subject: [PATCH 06/19] mcts: split Node into Node and Edge arenas (MCGS step 2) The tree now has two arenas. An Edge (16 bytes: child, visits, draws, move, policy) is written for every legal move at expansion; a Node (32 bytes: key, first_edge, visits, q, u, base, num_edges, state, check) is created only when its edge is first selected, and evaluated on that visit. Search is unchanged: edge visits are kept equal to the child's visits, and selection, FPU and the root decisions read edge.visits and edge.policy with the child's q, in the same float order. Path-dependent draws stay in node.state. key and check are set at node creation, u and base by pruning; nothing reads them yet, and edge.draws stays 0. The root index is a member. Garbage collection and rerooting use mark -> forwarding -> slide -> remap over both arenas, which no longer assumes that a block is allocated after its parent's. The threshold rule is the tree-exact one, with a histogram per arena; a pruned node keeps its visits and q. A playout that finds the node arena full ends at the parent, like a failed expansion, and schedules a collection. VERIFY builds check the whole tree after every reroot, collection and search: in-degree 1, nothing unreachable in either arena, key and check, the node state recomputed from the position and its path, one edge per legal move, edge visits equal to the child's, and |q|, |u| <= 1. info string reused now counts nodes (positions), not child slots. Bench: 663779 Co-Authored-By: Claude Opus 5.5 --- src/mcts.cpp | 489 ++++++++++++++++++++++++++++++++++----------------- src/mcts.h | 114 +++++++++--- 2 files changed, 411 insertions(+), 192 deletions(-) diff --git a/src/mcts.cpp b/src/mcts.cpp index f56a414..2ba3fd1 100644 --- a/src/mcts.cpp +++ b/src/mcts.cpp @@ -1,6 +1,7 @@ #include "mcts.h" #include +#include #include #include #include @@ -16,113 +17,166 @@ namespace rigby { // Tree // --------------------------------------------------------------------------- +u16 position_check(const Position& pos) { + u64 x = pos.colors[WHITE] ^ std::rotl(pos.pieces[PAWN], 17) ^ std::rotl(pos.pieces[KING], 41); + // splitmix64's finaliser + x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9ULL; + x = (x ^ (x >> 27)) * 0x94d049bb133111ebULL; + return u16(x ^ (x >> 31)); +} + void Tree::resize_bytes(size_t bytes) { - const size_t count = std::max(bytes / sizeof(Node), 1024); - nodes_.assign(count, Node{}); + // A node costs its own 32 bytes plus EDGES_PER_NODE edges of 16. + const size_t per_node = sizeof(Node) + EDGES_PER_NODE * sizeof(Edge); + const size_t node_count = std::max(bytes / per_node, 1024); + nodes_.assign(node_count, Node{}); nodes_.shrink_to_fit(); + edges_.assign(node_count * EDGES_PER_NODE, Edge{}); + edges_.shrink_to_fit(); clear(); } void Tree::clear() { - used_ = 2; // index 0 is the null child, index 1 is the root - nodes_[root()] = Node{}; + nodes_used_ = 2; // index 0 is the null node, index 1 the root + edges_used_ = 1; // index 0 is the null edge + root_ = 1; + nodes_[root_] = Node{}; } -u32 Tree::alloc(u32 count) { - if (used_ + count > nodes_.size()) return 0; - const u32 idx = u32(used_); - used_ += count; +u32 Tree::alloc_node() { + if (nodes_used_ >= nodes_.size()) return 0; + return u32(nodes_used_++); +} + +u32 Tree::alloc_edges(u32 count) { + if (edges_used_ + count > edges_.size()) return 0; + const u32 idx = u32(edges_used_); + edges_used_ += count; return idx; } size_t Tree::reroot(u32 new_root) { - if (new_root == root()) return used_; + if (new_root == root_) return nodes_used_ - 1; return compact(new_root, 0); } size_t Tree::collect_garbage(double keep_fraction) { - const size_t target = size_t(double(nodes_.size()) * keep_fraction); - return compact(root(), prune_threshold(target)); + return collect_garbage(size_t(double(nodes_.size()) * keep_fraction), size_t(double(edges_.size()) * keep_fraction)); } -u32 Tree::prune_threshold(size_t target) const { - // A node's children survive a collection with threshold T when the node has - // at least T visits. Visits only shrink going down the tree, so every - // ancestor of such a node survives too, and the size kept for a threshold is - // just the children of all nodes with at least that many visits. +size_t Tree::collect_garbage(size_t node_target, size_t edge_target) { + return compact(root_, prune_threshold(node_target, edge_target)); +} + +u32 Tree::prune_threshold(size_t node_target, size_t edge_target) const { + // A node keeps its edges through a collection with threshold T when it has + // at least T visits, and the child nodes of those edges stay. Visits only + // shrink going down a tree, so every ancestor of such a node survives too, + // and the size kept for a threshold is just the edges and child nodes of + // all nodes with at least that many visits. constexpr u32 CAP = 1 << 16; + std::vector edges_by_visits(CAP + 1, 0); std::vector children_by_visits(CAP + 1, 0); - std::vector stack{root()}; + std::vector stack{root_}; while (!stack.empty()) { const Node& node = nodes_[stack.back()]; stack.pop_back(); - if (!node.first_child) continue; - children_by_visits[std::min(node.visits, CAP)] += node.num_children; - for (u32 i = 0; i < node.num_children; i++) stack.push_back(node.first_child + i); + if (!node.first_edge) continue; + const u32 bucket = std::min(node.visits, CAP); + edges_by_visits[bucket] += node.num_edges; + for (u32 i = 0; i < node.num_edges; i++) { + const u32 child = edges_[node.first_edge + i].child; + if (!child) continue; + children_by_visits[bucket]++; + stack.push_back(child); + } } - u64 kept = 2; // null slot and root + u64 kept_nodes = 2; // null node and root + u64 kept_edges = 1; // null edge for (u32 v = CAP; v >= 1; v--) { - if (kept + children_by_visits[v] > target) return v + 1; - kept += children_by_visits[v]; + if (kept_nodes + children_by_visits[v] > node_target || kept_edges + edges_by_visits[v] > edge_target) + return v + 1; + kept_nodes += children_by_visits[v]; + kept_edges += edges_by_visits[v]; } return 1; } size_t Tree::compact(u32 new_root, u32 min_visits) { - // Every child block that stays, as (old first index, size). Nodes below the - // visit threshold lose their children and become leaves again; they keep - // their visits and Q, and get expanded anew if search comes back to them. + // Mark: everything reachable from the new root stays. A node below the + // visit threshold loses its edges and becomes a leaf again; it keeps its + // visits and Q (also as u and base) and gets expanded anew if search + // comes back to it. `blocks` collects every edge block that stays, as + // (old first index, size). + std::vector marked(nodes_used_, 0); std::vector> blocks; std::vector stack{new_root}; + marked[new_root] = 1; while (!stack.empty()) { const u32 idx = stack.back(); stack.pop_back(); Node& node = nodes_[idx]; - if (!node.first_child) continue; + if (!node.first_edge) continue; if (idx != new_root && node.visits < min_visits) { - node.first_child = 0; - node.num_children = 0; + node.first_edge = 0; + node.num_edges = 0; node.state = UNEXPANDED; + node.u = node.q; + node.base = node.visits; continue; } - blocks.emplace_back(node.first_child, node.num_children); - for (u32 i = 0; i < node.num_children; i++) stack.push_back(node.first_child + i); + blocks.emplace_back(node.first_edge, node.num_edges); + for (u32 i = 0; i < node.num_edges; i++) { + const u32 child = edges_[node.first_edge + i].child; + if (child && !marked[child]) { + marked[child] = 1; + stack.push_back(child); + } + } } - // A block is always allocated after its parent's block, so packing the kept - // blocks in their original order only ever moves them towards the front, and - // never onto a block that has not moved yet. That allows doing it in place. + // Forwarding: the marked nodes and the kept edge blocks get new places in + // their old index order. Every destination is then at or before its + // source, so both arenas can slide to the front in place, whatever order + // things were allocated in. + std::vector forward(nodes_used_, 0); + u32 next_node = 1; + for (u32 i = 1; i < nodes_used_; i++) + if (marked[i]) forward[i] = next_node++; + std::sort(blocks.begin(), blocks.end()); std::vector dest(blocks.size()); - u32 next = 2; + u32 next_edge = 1; for (size_t i = 0; i < blocks.size(); i++) { - dest[i] = next; - next += blocks[i].second; + dest[i] = next_edge; + next_edge += blocks[i].second; } - - const auto remap = [&](u32 old_first) -> u32 { + const auto remap_edges = [&](u32 old_first) -> u32 { if (!old_first) return 0; const auto it = std::lower_bound(blocks.begin(), blocks.end(), std::make_pair(old_first, u32(0))); return dest[size_t(it - blocks.begin())]; }; - // The new root's own slot may be overwritten by a moved block, so take it first. - Node new_root_node = nodes_[new_root]; - new_root_node.first_child = remap(new_root_node.first_child); - + for (u32 i = 1; i < nodes_used_; i++) { + if (!marked[i]) continue; + Node& node = nodes_[forward[i]]; + if (forward[i] != i) node = nodes_[i]; + node.first_edge = remap_edges(node.first_edge); + } for (size_t i = 0; i < blocks.size(); i++) { const auto [first, count] = blocks[i]; - if (dest[i] != first) std::memmove(&nodes_[dest[i]], &nodes_[first], size_t(count) * sizeof(Node)); + if (dest[i] != first) std::memmove(&edges_[dest[i]], &edges_[first], size_t(count) * sizeof(Edge)); for (u32 j = 0; j < count; j++) { - Node& node = nodes_[dest[i] + j]; - node.first_child = remap(node.first_child); + Edge& e = edges_[dest[i] + j]; + e.child = forward[e.child]; } } - nodes_[root()] = new_root_node; - used_ = next; - return used_ - 1; // everything but the null slot + root_ = forward[new_root]; + nodes_used_ = next_node; + edges_used_ = next_edge; + return nodes_used_ - 1; // everything but the null node } // --------------------------------------------------------------------------- @@ -131,6 +185,13 @@ size_t Tree::compact(u32 new_root, u32 min_visits) { Searcher::Searcher() { set_hash(64); } +void Searcher::clear_tree(const Position& root) { + tree_.clear(); + Node& node = tree_.node(tree_.root()); + node.key = root.key; + node.check = position_check(root); +} + i64 Searcher::elapsed_ms() const { return std::chrono::duration_cast(Clock::now() - start_time_).count(); } @@ -166,20 +227,20 @@ bool Searcher::best_move_settled(i64 ms, i64 limit_ms) const { // visits that nothing could overtake it, which would stop every search // at once. The move leading this search must also be the one played. if (ms <= 0 || iterations_ < 256) return false; - const Node& root = tree_[Tree::root()]; - if (root_start_visits_.size() != root.num_children) return false; + const Node& root = tree_.node(tree_.root()); + if (root_start_visits_.size() != root.num_edges) return false; u32 first = 0, second = 0, leader = 0; - for (u32 i = 0; i < root.num_children; i++) { - const u32 v = tree_[root.first_child + i].visits - root_start_visits_[i]; + for (u32 i = 0; i < root.num_edges; i++) { + const u32 v = tree_.edge(root.first_edge + i).visits - root_start_visits_[i]; if (v > first) { second = first; first = v; - leader = root.first_child + i; + leader = root.first_edge + i; } else if (v > second) { second = v; } } - if (leader != best_child(Tree::root())) return false; + if (leader != best_edge(tree_.root())) return false; const double remaining = double(iterations_) / double(ms) * double(limit_ms - ms) / SMART_PRUNING_FACTOR; return double(second) + remaining < double(first); @@ -225,18 +286,21 @@ size_t Searcher::reuse_tree(const Position& root) { !std::equal(prev_history_.begin(), prev_history_.end(), history_.begin())) return 0; - u32 idx = Tree::root(); + u32 idx = tree_.root(); Position pos = prev_root_; for (size_t i = prev_history_.size(); i < history_.size(); i++) { - const Node& node = tree_[idx]; + const Node& node = tree_.node(idx); if (node.state != EXPANDED) return 0; u32 next = 0; - for (u32 c = 0; c < node.num_children && !next; c++) { + for (u32 c = 0; c < node.num_edges && !next; c++) { + const Edge& e = tree_.edge(node.first_edge + c); Position child = pos; - child.make_move(Move::from_raw(tree_[node.first_child + c].move)); + child.make_move(Move::from_raw(e.move)); if (child.key == history_[i]) { - next = node.first_child + c; + // A move search never tried has no node to continue from. + if (!e.child) return 0; + next = e.child; pos = child; } } @@ -246,60 +310,126 @@ size_t Searcher::reuse_tree(const Position& root) { // A node that was a draw by repetition or the 50-move rule inside the old // tree can be a real position to play from now; start such a root afresh. - if (pos.key != root.key || tree_[idx].state != EXPANDED) return 0; + if (pos.key != root.key || tree_.node(idx).state != EXPANDED) return 0; return tree_.reroot(idx); } #ifdef RIGBY_VERIFY_TREE -// Debug check: the tree must still describe legal play from the root, and every -// expanded node must have at least one visit more than its children together -// (more when it was evaluated as a leaf while the tree was full). -void Searcher::verify_tree() const { - struct Item { +// Debug check, from the root as `root_pos_` with the game history `history` +// (ending with the root's key): +// - every node is reached exactly once (in-degree 1, the root 0), and the +// arenas hold nothing else; +// - a node's key and check match its position, and its state is the one +// evaluate_leaf gives that position on this path; +// - an expanded node has one edge per legal move; +// - an edge has a child node exactly when it has visits, with as many visits +// as the child (a tree), and no draws yet; +// - every expanded node has at least one visit more than its edges together +// (more when it was evaluated as a leaf while the tree was full); the root +// is expanded before its first visit, so it may have exactly as many; +// - Q and u are finite and in [-1, 1]. +void Searcher::verify_tree(const std::vector& history) const { + const auto fail = [&](u32 idx, const Position& pos, const std::string& what) { + const Node& n = tree_.node(idx); + std::cerr << "TREE CORRUPT at node " << idx << " (" << pos.fen() << "): " << what << " visits=" << n.visits + << " q=" << n.q << " state=" << int(n.state) << " edges=" << int(n.num_edges) + << " first=" << n.first_edge << " nodes_used=" << tree_.nodes_used() + << " edges_used=" << tree_.edges_used() << std::endl; + std::abort(); + }; + + std::vector in_degree(tree_.nodes_used(), 0); + std::vector keys = history; + struct Frame { u32 idx; Position pos; + int depth; + u32 next = 0; }; - std::vector stack{{Tree::root(), root_pos_}}; - u64 checked = 0; - while (!stack.empty()) { - const Item item = stack.back(); - stack.pop_back(); - const Node& node = tree_[item.idx]; - checked++; - if (node.state != EXPANDED) continue; + std::vector stack; + u64 nodes = 0, edges = 0; + const auto enter = [&](u32 idx, const Position& pos, int depth) { + const Node& node = tree_.node(idx); + nodes++; + if (node.key != pos.key || node.check != position_check(pos)) fail(idx, pos, "key or check mismatch"); + if (!std::isfinite(node.q) || std::abs(node.q) > 1.0f || !std::isfinite(node.u) || std::abs(node.u) > 1.0f) + fail(idx, pos, "q or u out of range"); + + // The state evaluate_leaf gives this position on this path. MoveList legal; - generate_legal(item.pos, legal); - u64 child_visits = 0; - bool ok = node.first_child >= 2 && node.first_child + node.num_children <= tree_.used() && - node.num_children == legal.size(); - for (u32 c = 0; ok && c < node.num_children; c++) { - const Node& child = tree_[node.first_child + c]; - const Move m = Move::from_raw(child.move); - ok = std::find(legal.begin(), legal.end(), m) != legal.end(); - child_visits += child.visits; - Position next = item.pos; - next.make_move(m); - stack.push_back({node.first_child + c, next}); + generate_legal(pos, legal); + int expected = -1; // not terminal + if (legal.empty()) { + expected = pos.in_check() ? TERMINAL_LOSS : TERMINAL_DRAW; + } else if (depth > 0) { + bool repetition = false; + const int n = int(keys.size()); + for (int back = 4; back <= pos.halfmove && back < n; back += 2) + if (keys[n - 1 - back] == pos.key) repetition = true; + if (pos.halfmove >= 100 || pos.insufficient_material() || repetition) expected = TERMINAL_DRAW; } - // The root is expanded before its first visit, so it may have exactly - // as many visits as its children. - const u64 own_visit = item.idx == Tree::root() ? 0 : 1; - if (!ok || node.visits < child_visits + own_visit) { - std::cerr << "TREE CORRUPT at node " << item.idx << " (" << item.pos.fen() << ") ok=" << ok - << " visits=" << node.visits << " child_visits=" << child_visits - << " children=" << int(node.num_children) << " legal=" << legal.size() - << " first=" << node.first_child << " used=" << tree_.used() << std::endl; - std::abort(); + if (expected >= 0 ? node.state != expected : node.state != UNEXPANDED && node.state != EXPANDED) + fail(idx, pos, "state " + std::to_string(node.state) + " expected " + std::to_string(expected)); + + if (node.state != EXPANDED) { + if (node.first_edge || node.num_edges) fail(idx, pos, "edges on a node that is not expanded"); + } else { + if (!node.first_edge || node.first_edge + node.num_edges > tree_.edges_used() || + node.num_edges != legal.size()) + fail(idx, pos, "bad edge block, legal moves " + std::to_string(legal.size())); + bool seen[256] = {}; + u64 edge_visits = 0; + for (u32 i = 0; i < node.num_edges; i++) { + const Edge& e = tree_.edge(node.first_edge + i); + const auto it = std::find(legal.begin(), legal.end(), Move::from_raw(e.move)); + if (it == legal.end() || seen[it - legal.begin()]) fail(idx, pos, "illegal or repeated edge move"); + seen[it - legal.begin()] = true; + if (e.draws) fail(idx, pos, "edge with draws"); + if (e.child >= tree_.nodes_used()) fail(idx, pos, "edge child out of range"); + if (bool(e.child) != bool(e.visits)) fail(idx, pos, "edge child without visits or the reverse"); + if (e.child && e.visits != tree_.node(e.child).visits) fail(idx, pos, "edge and child visits differ"); + if (e.child && ++in_degree[e.child] != 1) fail(idx, pos, "node reached twice"); + edge_visits += e.visits; + } + edges += node.num_edges; + if (node.visits < edge_visits + (idx == tree_.root() ? 0 : 1)) + fail(idx, pos, "fewer visits than the edges, edge visits " + std::to_string(edge_visits)); + } + stack.push_back({idx, pos, depth}); + }; + + if (tree_.root() == 0 || tree_.root() >= tree_.nodes_used()) fail(tree_.root(), root_pos_, "bad root index"); + enter(tree_.root(), root_pos_, 0); + while (!stack.empty()) { + Frame& f = stack.back(); + const Node& node = tree_.node(f.idx); + if (f.next < node.num_edges) { + const Edge& e = tree_.edge(node.first_edge + f.next++); + if (!e.child) continue; + Position next = f.pos; + next.make_move(Move::from_raw(e.move)); + keys.push_back(next.key); + const int depth = f.depth + 1; + enter(e.child, next, depth); // invalidates f + } else { + stack.pop_back(); + if (!stack.empty()) keys.pop_back(); } } - uci_io::send("info string tree verified: " + std::to_string(checked) + " nodes"); + + if (nodes != tree_.nodes_used() - 1 || edges != tree_.edges_used() - 1) + fail(tree_.root(), root_pos_, + "unreachable nodes or edges: reached " + std::to_string(nodes) + " nodes, " + std::to_string(edges) + + " edges"); + uci_io::send("info string tree verified: " + std::to_string(nodes) + " nodes, " + std::to_string(edges) + + " edges"); } #endif float Searcher::evaluate_leaf(u32 idx, const Position& pos, int depth) { - Node& node = tree_[idx]; + Node& node = tree_.node(idx); MoveList moves; generate_legal(pos, moves); @@ -322,12 +452,10 @@ float Searcher::evaluate_leaf(u32 idx, const Position& pos, int depth) { } bool Searcher::expand(u32 idx, const Position& pos) { - Node& node = tree_[idx]; - MoveList moves; generate_legal(pos, moves); - const u32 first = tree_.alloc(u32(moves.size())); + const u32 first = tree_.alloc_edges(u32(moves.size())); if (!first) { // Out of memory: this time the node stays a leaf; the tree is collected // right after this playout, so the next visit can expand it. @@ -345,47 +473,49 @@ bool Searcher::expand(u32 idx, const Position& pos) { eval::policy(pos, moves, params.policy_temperature, bias, priors); for (int i = 0; i < moves.size(); i++) { - Node& child = tree_[first + i]; - child = Node{}; - child.move = moves[i].raw(); - child.policy = u16(std::lround(std::clamp(priors[i], 0.0f, 1.0f) * 65535.0f)); + Edge& e = tree_.edge(first + u32(i)); + e = Edge{}; + e.move = moves[i].raw(); + e.policy = u16(std::lround(std::clamp(priors[i], 0.0f, 1.0f) * 65535.0f)); } - node.first_child = first; - node.num_children = u8(moves.size()); + Node& node = tree_.node(idx); + node.first_edge = first; + node.num_edges = u8(moves.size()); node.state = EXPANDED; return true; } -u32 Searcher::select_child(u32 idx) const { - const Node& node = tree_[idx]; +u32 Searcher::select_edge(u32 idx) const { + const Node& node = tree_.node(idx); // node.q is from the view of the side that moved into this node, so the side // to move here sees -q. const float parent_q = node.visits ? -node.q : 0.0f; float visited_policy = 0.0f; - for (u32 i = 0; i < node.num_children; i++) { - const Node& child = tree_[node.first_child + i]; - if (child.visits) visited_policy += child.prior(); + for (u32 i = 0; i < node.num_edges; i++) { + const Edge& e = tree_.edge(node.first_edge + i); + if (e.visits) visited_policy += e.prior(); } const float fpu = parent_q - params.fpu_reduction * std::sqrt(visited_policy); // Exploration grows with the visits (Monty's scaling): a node searched a - // lot keeps giving its other children a chance. + // lot keeps giving its other moves a chance. const float n = float(std::max(node.visits, 1)); // The root, where the move is chosen, explores more. - const float base_cpuct = idx == Tree::root() ? params.root_cpuct : params.cpuct; + const float base_cpuct = idx == tree_.root() ? params.root_cpuct : params.cpuct; const float cpuct = base_cpuct * (1.0f + std::log((n + params.cpuct_visit_scale) / params.cpuct_visit_scale)); const float explore = cpuct * std::sqrt(n); - u32 best = node.first_child; + u32 best = node.first_edge; float best_score = -1e30f; - for (u32 i = 0; i < node.num_children; i++) { - const u32 c = node.first_child + i; - const Node& child = tree_[c]; - const float q = child.visits ? child.q : fpu; - const float score = q + explore * child.prior() / float(1 + child.visits); + for (u32 i = 0; i < node.num_edges; i++) { + const u32 c = node.first_edge + i; + const Edge& e = tree_.edge(c); + // The child's Q is from the view of the side to move here. + const float q = e.visits ? tree_.node(e.child).q : fpu; + const float score = q + explore * e.prior() / float(1 + e.visits); if (score > best_score) { best_score = score; best = c; @@ -398,14 +528,15 @@ void Searcher::playout() { Position pos = root_pos_; history_.resize(root_history_size_); path_.clear(); + edge_path_.clear(); - u32 idx = Tree::root(); + u32 idx = tree_.root(); path_.push_back(idx); int depth = 0; float value; for (;;) { - const Node& node = tree_[idx]; + const Node& node = tree_.node(idx); if (node.state == TERMINAL_LOSS) { value = -1.0f; break; @@ -416,7 +547,7 @@ void Searcher::playout() { } if (node.state == UNEXPANDED) { // Most leaves are only ever visited once, so a first visit just - // evaluates; children (moves, priors, memory) come on the second. + // evaluates; edges (moves, priors, memory) come on the second. if (node.visits == 0) { value = evaluate_leaf(idx, pos, depth); break; @@ -427,10 +558,34 @@ void Searcher::playout() { } } - idx = select_child(idx); - pos.make_move(Move::from_raw(tree_[idx].move)); + const u32 e = select_edge(idx); + Edge& edge = tree_.edge(e); + u32 child = edge.child; + const bool created = !child; + if (created) { + // The first time this move is chosen: its node is created now and + // evaluated on this visit. + child = tree_.alloc_node(); + if (!child) { + // The node arena is full: as when expansion fails, this node + // takes the playout and the tree is collected right after. + gc_pending_ = true; + value = eval::value(pos); + break; + } + edge.child = child; + } + pos.make_move(Move::from_raw(edge.move)); + if (created) { + Node& fresh = tree_.node(child); + fresh = Node{}; + fresh.key = pos.key; + fresh.check = position_check(pos); + } history_.push_back(pos.key); - path_.push_back(idx); + path_.push_back(child); + edge_path_.push_back(e); + idx = child; depth++; } @@ -438,18 +593,22 @@ void Searcher::playout() { // the view of the side that moved into it, so flip before every update. // The same result in centipawns scores the move into each node in the // butterfly history, for the side that played it (the side to move at the - // parent, depth i - 1). + // parent, depth i - 1). Edge visits are kept equal to the child's. int bonus = eval::q_to_cp(std::clamp(value, -0.998f, 0.998f)); for (size_t i = path_.size(); i-- > 0;) { value = -value; bonus = -bonus; - Node& node = tree_[path_[i]]; + Node& node = tree_.node(path_[i]); node.visits++; node.q += (value - node.q) / float(node.visits); // The Q from the view of the side to move at the node. Draws by // repetition or the 50-move rule belong to the path, not the position. if (node.state != TERMINAL_DRAW) value_hash_.store(history_[root_history_size_ - 1 + i], -node.q, node.visits); - if (i) butterfly_.update(root_pos_.stm ^ int((i - 1) & 1), Move::from_raw(node.move), bonus); + if (i) { + Edge& e = tree_.edge(edge_path_[i - 1]); + e.visits++; + butterfly_.update(root_pos_.stm ^ int((i - 1) & 1), Move::from_raw(e.move), bonus); + } } iterations_++; @@ -457,36 +616,37 @@ void Searcher::playout() { seldepth_ = std::max(seldepth_, depth); } -u32 Searcher::best_child(u32 idx) const { - const Node& node = tree_[idx]; +u32 Searcher::best_edge(u32 idx) const { + const Node& node = tree_.node(idx); u32 best = 0; - for (u32 i = 0; i < node.num_children; i++) { - const u32 c = node.first_child + i; + for (u32 i = 0; i < node.num_edges; i++) { + const u32 c = node.first_edge + i; if (!best) { best = c; continue; } - const Node& a = tree_[c]; - const Node& b = tree_[best]; + const Edge& a = tree_.edge(c); + const Edge& b = tree_.edge(best); // Most visits wins; ties go to the better Q, then to the higher prior. - if (a.visits != b.visits ? a.visits > b.visits : a.visits ? a.q > b.q : a.policy > b.policy) best = c; + if (a.visits != b.visits ? a.visits > b.visits : a.visits ? edge_q(a) > edge_q(b) : a.policy > b.policy) + best = c; } return best; } void Searcher::print_info() const { - const Node& root = tree_[Tree::root()]; + const Node& root = tree_.node(tree_.root()); const i64 ms = elapsed_ms(); - const u32 best = best_child(Tree::root()); + const u32 best = best_edge(tree_.root()); std::ostringstream out; out << "info depth " << (iterations_ ? std::max(1, depth_sum_ / iterations_) : 0) << " seldepth " << seldepth_; - const float q = best && tree_[best].visits ? tree_[best].q : -root.q; + const float q = best && tree_.edge(best).visits ? edge_q(tree_.edge(best)) : -root.q; out << " score cp " << eval::q_to_cp(q); out << " nodes " << iterations_ << " nps " << (ms ? iterations_ * 1000 / u64(ms) : iterations_) << " time " << ms; - out << " hashfull " << (tree_.used() * 1000 / tree_.capacity()); + out << " hashfull " << tree_.fill_permille(); out << " pv"; for (const Move m : principal_variation()) out << ' ' << root_pos_.uci(m); @@ -495,19 +655,19 @@ void Searcher::print_info() const { std::vector Searcher::principal_variation() const { std::vector pv; - u32 idx = Tree::root(); + u32 idx = tree_.root(); for (int ply = 0; ply < 64; ply++) { - const u32 c = best_child(idx); - if (!c || !tree_[c].visits) break; - pv.push_back(Move::from_raw(tree_[c].move)); - idx = c; + const u32 c = best_edge(idx); + if (!c || !tree_.edge(c).visits) break; + pv.push_back(Move::from_raw(tree_.edge(c).move)); + idx = tree_.edge(c).child; } return pv; } void Searcher::draw_dashboard(bool done) { - const Node& root = tree_[Tree::root()]; - const u32 best = best_child(Tree::root()); + const Node& root = tree_.node(tree_.root()); + const u32 best = best_edge(tree_.root()); const i64 ms = elapsed_ms(); pretty::Dashboard d; @@ -519,12 +679,12 @@ void Searcher::draw_dashboard(bool done) { d.ms = ms; d.time_limit_ms = time_limit_ms_; d.node_limit = node_limit_; - d.hashfull = int(tree_.used() * 1000 / tree_.capacity()); - d.cp = eval::q_to_cp(best && tree_[best].visits ? tree_[best].q : -root.q); + d.hashfull = tree_.fill_permille(); + d.cp = eval::q_to_cp(best && tree_.edge(best).visits ? edge_q(tree_.edge(best)) : -root.q); d.pv = principal_variation(); - for (u32 i = 0; i < root.num_children; i++) { - const Node& child = tree_[root.first_child + i]; - d.moves.push_back({Move::from_raw(child.move), child.visits, eval::q_to_cp(child.q), child.prior()}); + for (u32 i = 0; i < root.num_edges; i++) { + const Edge& e = tree_.edge(root.first_edge + i); + d.moves.push_back({Move::from_raw(e.move), e.visits, eval::q_to_cp(edge_q(e)), e.prior()}); } d.reused = reused_; d.collections = gc_runs_; @@ -544,14 +704,14 @@ SearchResult Searcher::search(const Position& root, const std::vector& hist // Check the previous tree as the last search left it, and again after rerooting. if (tree_valid_ && history_.size() >= prev_history_.size()) { root_pos_ = prev_root_; - verify_tree(); + verify_tree(prev_history_); root_pos_ = root; } #endif const size_t reused = reuse_tree(root); - if (!reused) tree_.clear(); + if (!reused) clear_tree(root); #ifdef RIGBY_VERIFY_TREE - if (reused) verify_tree(); + if (reused) verify_tree(history_); #endif if (print && !pretty && reused) uci_io::send("info string reused " + std::to_string(reused) + " nodes"); iterations_ = 0; @@ -580,18 +740,18 @@ SearchResult Searcher::search(const Position& root, const std::vector& hist // The root needs its children before the first playout, so that even a // single playout leaves a move to play. - if (tree_[Tree::root()].state == UNEXPANDED && !expand(Tree::root(), root)) { - tree_.clear(); + if (tree_.node(tree_.root()).state == UNEXPANDED && !expand(tree_.root(), root)) { + clear_tree(root); gc_pending_ = false; - expand(Tree::root(), root); + expand(tree_.root(), root); } // Root move visits brought along by tree reuse, for smart pruning. The - // root's children keep their order through collections. + // root's edges keep their order through collections. root_start_visits_.clear(); { - const Node& r = tree_[Tree::root()]; - for (u32 i = 0; i < r.num_children; i++) root_start_visits_.push_back(tree_[r.first_child + i].visits); + const Node& r = tree_.node(tree_.root()); + for (u32 i = 0; i < r.num_edges; i++) root_start_visits_.push_back(tree_.edge(r.first_edge + i).visits); } // UCI reports once a second; the dashboard for a human is redrawn in place @@ -606,7 +766,7 @@ SearchResult Searcher::search(const Position& root, const std::vector& hist gc_pending_ = false; gc_runs_++; #ifdef RIGBY_VERIFY_TREE - verify_tree(); + verify_tree(std::vector(history_.begin(), history_.begin() + std::ptrdiff_t(root_history_size_))); #endif } if (print && (iterations_ & info_mask) == 0) { @@ -626,8 +786,11 @@ SearchResult Searcher::search(const Position& root, const std::vector& hist if (gc_runs_) uci_io::send("info string tree collected " + std::to_string(gc_runs_) + " times"); } - const u32 best = best_child(Tree::root()); - result.best = Move::from_raw(tree_[best].move); +#ifdef RIGBY_VERIFY_TREE + verify_tree(std::vector(history_.begin(), history_.begin() + std::ptrdiff_t(root_history_size_))); +#endif + const u32 best = best_edge(tree_.root()); + result.best = Move::from_raw(tree_.edge(best).move); result.nodes = iterations_; result.tree_positions = iterations_ + depth_sum_; result.time_ms = elapsed_ms(); diff --git a/src/mcts.h b/src/mcts.h index 029b9bd..31eac77 100644 --- a/src/mcts.h +++ b/src/mcts.h @@ -19,48 +19,93 @@ enum NodeState : u8 { TERMINAL_DRAW, }; -// 20 bytes. Children of a node sit next to each other in the arena, so a node -// only needs the index of its first child. -struct Node { - u32 first_child = 0; - u32 visits = 0; - float q = 0.0f; // running mean, from the view of the side that played `move` +// A move out of a node. A node's edges sit next to each other in the edge +// arena, so the node only needs the index of the first one. The child node is +// created the first time search selects the edge. +struct Edge { + u32 child = 0; // node index, 0 = no node yet + u32 visits = 0; // how often search chose this move here (equals the child's visits in a tree) + u32 draws = 0; // of those, playouts that ended in a draw of the path (unused while the search is a tree) u16 move = 0; - u16 policy = 0; // prior scaled to 0..65535 - u8 num_children = 0; - u8 state = UNEXPANDED; + u16 policy = 0; // prior scaled to 0..65535 float prior() const { return float(policy) * (1.0f / 65535.0f); } }; +static_assert(sizeof(Edge) == 16); +// A position, created when search first reaches it. +struct Node { + u64 key = 0; // Zobrist key of the position + u32 first_edge = 0; // 0 = not expanded + u32 visits = 0; + float q = 0.0f; // running mean, from the view of the side that moved into the node + // `u` and `base` are set by garbage collection (the Q and visits a pruned + // node keeps) but not read yet. `check` is a second fingerprint of the + // position (see position_check). All three are for graph search. + float u = 0.0f; + u32 base = 0; + u8 num_edges = 0; + u8 state = UNEXPANDED; + u16 check = 0; +}; +static_assert(sizeof(Node) == 32); + +// A 16-bit fingerprint of the position that does not depend on the Zobrist keys. +u16 position_check(const Position& pos); + +// Two arenas: nodes and edges. Index 0 of each is null. class Tree { public: + // Edges per node the arenas are sized for. Measured in step 1 of the MCGS + // plan (docs/mcgs-log.md, edges per visited node): 13 on average in 5 s + // searches without collections, 19-21 in middlegames, 3.6-5.5 in simple + // endgames, and 3-9 right after collections (pruned nodes keep their node + // but lose their edges). See set_hash for the choice. + static constexpr size_t EDGES_PER_NODE = 8; + void resize_bytes(size_t bytes); void clear(); - // Returns the index of `count` fresh nodes, or 0 when the arena is full. - u32 alloc(u32 count); - // Makes `new_root` the root and packs its subtree to the front of the arena; - // everything else is dropped. Returns the number of nodes kept. + // A fresh node, or 0 when the node arena is full. + u32 alloc_node(); + // The index of `count` fresh edges, or 0 when the edge arena is full. + u32 alloc_edges(u32 count); + // Makes `new_root` the root and packs its subtree to the front of the + // arenas; everything else is dropped. Returns the number of nodes kept. size_t reroot(u32 new_root); - // Frees memory when the arena is full: the least visited parts of the tree - // are cut back to leaves until at most `keep_fraction` of it is in use. + // Frees memory when an arena is full: the least visited parts of the tree + // are cut back to leaves until at most `keep_fraction` of each arena is in + // use. Returns the number of nodes kept. size_t collect_garbage(double keep_fraction); + // The same with explicit targets (in slots, null slots included). + size_t collect_garbage(size_t node_target, size_t edge_target); - Node& operator[](u32 idx) { return nodes_[idx]; } - const Node& operator[](u32 idx) const { return nodes_[idx]; } - static constexpr u32 root() { return 1; } + Node& node(u32 idx) { return nodes_[idx]; } + const Node& node(u32 idx) const { return nodes_[idx]; } + Edge& edge(u32 idx) { return edges_[idx]; } + const Edge& edge(u32 idx) const { return edges_[idx]; } + u32 root() const { return root_; } - size_t used() const { return used_; } - size_t capacity() const { return nodes_.size(); } + size_t nodes_used() const { return nodes_used_; } + size_t edges_used() const { return edges_used_; } + size_t node_capacity() const { return nodes_.size(); } + size_t edge_capacity() const { return edges_.size(); } + // How full the fuller arena is, per mille. + int fill_permille() const { + return int(std::max(nodes_used_ * 1000 / nodes_.size(), edges_used_ * 1000 / edges_.size())); + } private: std::vector nodes_; - size_t used_ = 0; + std::vector edges_; + size_t nodes_used_ = 0; + size_t edges_used_ = 0; + u32 root_ = 1; - // Keeps the subtree of `new_root`, dropping the children of every node with - // fewer than `min_visits` visits, and packs it to the front in place. + // Keeps what is reachable from `new_root`, dropping the edges of every + // node with fewer than `min_visits` visits, and packs both arenas to the + // front in place. size_t compact(u32 new_root, u32 min_visits); - u32 prune_threshold(size_t target) const; + u32 prune_threshold(size_t node_target, size_t edge_target) const; }; // Butterfly history for MCTS (after Vine, aronpetkovski.com/blog/butterfly-history-mcts): @@ -160,7 +205,8 @@ public: Searcher(); void set_hash(size_t mb) { - // A 32nd of the memory goes to the value hash, the rest to the tree. + // A 32nd of the memory goes to the value hash, the rest to the tree + // (split between its arenas by Tree::EDGES_PER_NODE). const size_t bytes = mb * 1024 * 1024; value_hash_.resize(bytes / 32 / ValueHash::ENTRY_BYTES); tree_.resize_bytes(bytes - bytes / 32); @@ -189,7 +235,10 @@ private: ValueHash value_hash_; std::vector history_; size_t root_history_size_ = 0; + // The nodes of a playout, from the root, and the edges between them + // (edge_path_[i] leads from path_[i] to path_[i + 1]). std::vector path_; + std::vector edge_path_; // The previous search, kept so its tree can be reused. bool tree_valid_ = false; @@ -220,16 +269,20 @@ private: void playout(); // First visit of a node: settles terminal states, otherwise evaluates. float evaluate_leaf(u32 idx, const Position& pos, int depth); - // Second visit: creates the children with their priors. False when the + // Second visit: creates the edges with their priors. False when the // arena is full (a collection is then scheduled). bool expand(u32 idx, const Position& pos); - u32 select_child(u32 idx) const; + // The edge PUCT picks at node `idx`. + u32 select_edge(u32 idx) const; bool is_repetition(const Position& pos) const; // Finds the node for `root` in the previous tree and makes it the root. // Returns the number of nodes kept, 0 when nothing could be reused. size_t reuse_tree(const Position& root); + // Empties the tree, leaving an unexpanded root for `root`. + void clear_tree(const Position& root); #ifdef RIGBY_VERIFY_TREE - void verify_tree() const; + // Checks the tree from root_pos_; `history` ends with the root's key. + void verify_tree(const std::vector& history) const; #endif void compute_time_limit(const SearchLimits& limits); @@ -237,7 +290,10 @@ private: bool should_stop(const SearchLimits& limits) const; bool best_move_settled(i64 ms, i64 limit_ms) const; - u32 best_child(u32 idx) const; + // The edge with the most visits at node `idx`, 0 when it has none. + u32 best_edge(u32 idx) const; + // Q of an edge from the view of the side choosing it (0 when unvisited). + float edge_q(const Edge& e) const { return e.visits ? tree_.node(e.child).q : 0.0f; } void print_info() const; std::vector principal_variation() const; void draw_dashboard(bool done); -- 2.47.3 From 226106e50a87ee0ac2ee1985b54475024d6f957a Mon Sep 17 00:00:00 2001 From: rektdie Date: Mon, 16 Nov 2026 19:37:17 +0100 Subject: [PATCH 07/19] verify: add the `verify` command to VERIFY builds (checks a and b) (a) Along random games from standard and Chess960 positions (50 games of up to 300 plies from each of 7 FENs), the incremental key and the position check equal those of the same position set up from its FEN. (b) After a 30000-playout search on four positions (standard, middlegame, pawn endgame, Chess960): three forced collections down to 1/2, 1/4 and 1/8 of the tree, each compared with a snapshot taken by move path (visits, q, u, base, state, key, check, and every edge). Survivors must be unchanged, pruned nodes must keep visits and q with u = q and base = visits, both arenas must end within their targets, and no pruned node may have more visits than a kept one. Then a reroot two plies down the best line must keep that subtree exactly. verify_tree runs after each step. Only compiled with -DRIGBY_VERIFY_TREE. Bench: 663779 Co-Authored-By: Claude Opus 5.5 --- src/mcts.cpp | 194 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/mcts.h | 6 ++ src/uci.cpp | 5 ++ 3 files changed, 205 insertions(+) diff --git a/src/mcts.cpp b/src/mcts.cpp index 2ba3fd1..fc6348b 100644 --- a/src/mcts.cpp +++ b/src/mcts.cpp @@ -5,7 +5,10 @@ #include #include #include +#include +#include #include +#include #include "eval.h" #include "pretty.h" @@ -801,4 +804,195 @@ SearchResult Searcher::search(const Position& root, const std::vector& hist return result; } +#ifdef RIGBY_VERIFY_TREE +namespace { + +[[noreturn]] void self_test_failed(const std::string& what) { + std::cerr << "VERIFY FAILED: " << what << std::endl; + std::abort(); +} + +// What a node looked like, to compare after a collection or a reroot. +struct NodeSnapshot { + u64 key; + u32 visits; + float q, u; + u32 base; + u8 state; + u16 check; + // (move, policy, visits, draws, has a child) per edge + std::vector> edges; +}; + +using MovePath = std::vector; + +} // namespace + +void Searcher::self_test() { + // (a) The incremental key equals the key of the same position set up from + // its FEN, along random games, standard and Chess960. + { + static constexpr const char* FENS[] = { + "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1", + "r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1", + "rnbqkbnr/ppp1p1pp/8/3pPp2/8/8/PPPP1PPP/RNBQKBNR w KQkq f6 0 3", + "bqnb1rkr/pp3ppp/3ppn2/2p5/5P2/P2P4/NPP1P1PP/BQ1BNRKR w HFhf - 2 9", + "2nnrbkr/p1qppppp/8/1ppb4/6PP/3PP3/PPP2P2/BQNNRBKR w HEhe - 1 9", + "qrbnnkrb/pppppppp/8/8/8/8/PPPPPPPP/QRBNNKRB w GBgb - 0 1", + "rkrnnqbb/pppppppp/8/8/8/8/PPPPPPPP/RKRNNQBB w CAca - 0 1", + }; + std::mt19937_64 rng(20261116); + u64 plies = 0; + for (const char* fen : FENS) { + for (int game = 0; game < 50; game++) { + Position pos; + if (!pos.set_fen(fen)) self_test_failed(std::string("bad fen ") + fen); + for (int ply = 0; ply < 300; ply++) { + MoveList moves; + generate_legal(pos, moves); + if (moves.empty()) break; + const Move m = moves[int(rng() % u64(moves.size()))]; + const std::string before = pos.fen(); + pos.make_move(m); + Position fresh; + if (!fresh.set_fen(pos.fen())) self_test_failed("fen does not parse: " + pos.fen()); + if (fresh.key != pos.key || position_check(fresh) != position_check(pos)) + self_test_failed("incremental key differs after " + before + " " + pos.uci(m) + " -> " + + pos.fen()); + plies++; + } + } + } + uci_io::send("info string verify (a) keys: " + std::to_string(plies) + " plies ok"); + } + + // (b) Garbage collection and rerooting keep everything they keep exactly. + const auto snapshot = [&](u32 from) { + std::map snap; + std::vector> stack{{from, {}}}; + while (!stack.empty()) { + auto [idx, path] = stack.back(); + stack.pop_back(); + const Node& n = tree_.node(idx); + NodeSnapshot s{n.key, n.visits, n.q, n.u, n.base, n.state, n.check, {}}; + for (u32 i = 0; i < n.num_edges; i++) { + const Edge& e = tree_.edge(n.first_edge + i); + s.edges.emplace_back(e.move, e.policy, e.visits, e.draws, e.child != 0); + if (e.child) { + MovePath next = path; + next.push_back(e.move); + stack.push_back({e.child, next}); + } + } + snap.emplace(path, std::move(s)); + } + return snap; + }; + + // Walks the current tree from the root and compares it with `before`. + // Returns the number of nodes; `pruned_max` / `kept_min` get the largest + // visits of a node that lost its edges and the smallest of a non-root node + // that kept them. + const auto compare = [&](const std::map& before, bool allow_pruning, u32& pruned_max, + u32& kept_min) { + size_t count = 0; + pruned_max = 0; + kept_min = ~0u; + std::vector> stack{{tree_.root(), {}}}; + while (!stack.empty()) { + auto [idx, path] = stack.back(); + stack.pop_back(); + count++; + const Node& n = tree_.node(idx); + const auto it = before.find(path); + if (it == before.end()) self_test_failed("a node appeared from nowhere"); + const NodeSnapshot& s = it->second; + if (n.key != s.key || n.check != s.check || n.visits != s.visits || n.q != s.q) + self_test_failed("node changed (key, visits or q)"); + if (!s.edges.empty() && !n.num_edges) { + if (!allow_pruning) self_test_failed("a node lost its edges in a reroot"); + if (n.state != UNEXPANDED || n.first_edge || n.u != n.q || n.base != n.visits) + self_test_failed("pruned node not reset properly"); + pruned_max = std::max(pruned_max, n.visits); + continue; + } + if (n.state != s.state || n.u != s.u || n.base != s.base || n.num_edges != s.edges.size()) + self_test_failed("node changed (state, u, base or edges)"); + if (n.num_edges && !path.empty()) kept_min = std::min(kept_min, n.visits); + for (u32 i = 0; i < n.num_edges; i++) { + const Edge& e = tree_.edge(n.first_edge + i); + if (std::make_tuple(e.move, e.policy, e.visits, e.draws, e.child != 0) != s.edges[i]) + self_test_failed("edge changed"); + if (e.child) { + MovePath next = path; + next.push_back(e.move); + stack.push_back({e.child, next}); + } + } + } + return count; + }; + + static constexpr const char* SEARCH_FENS[] = { + "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1", + "r1bq1rk1/ppp2ppp/2np1n2/2b1p3/2B1P3/2NP1N2/PPP2PPP/R1BQ1RK1 w - - 0 7", + "8/8/3k4/2p1p3/2P1P3/3K4/8/8 w - - 0 1", + "bqnb1rkr/pp3ppp/3ppn2/2p5/5P2/P2P4/NPP1P1PP/BQ1BNRKR w HFhf - 2 9", + }; + for (const char* fen : SEARCH_FENS) { + Position root; + root.set_fen(fen); + SearchLimits limits; + limits.nodes = 30000; + + // Collections down to a half, a quarter and an eighth of the tree. + new_game(); + stop_flag = false; + search(root, {root.key}, limits, false); + for (int round = 1; round <= 3; round++) { + const auto before = snapshot(tree_.root()); + const size_t node_target = tree_.nodes_used() >> round, edge_target = tree_.edges_used() >> round; + tree_.collect_garbage(node_target, edge_target); + if (tree_.nodes_used() > node_target || tree_.edges_used() > edge_target) + self_test_failed("collection kept more than its target"); + u32 pruned_max, kept_min; + const size_t count = compare(before, true, pruned_max, kept_min); + if (count != tree_.nodes_used() - 1) self_test_failed("node count differs after collection"); + if (pruned_max >= kept_min) self_test_failed("pruned a node with more visits than one kept"); + verify_tree({root.key}); + uci_io::send("info string verify (b) gc " + std::string(fen) + ": " + std::to_string(before.size()) + + " -> " + std::to_string(count) + " nodes ok"); + } + + // Reroot two plies down the most visited line, as between two moves of a game. + new_game(); + stop_flag = false; + search(root, {root.key}, limits, false); + std::vector history{root.key}; + Position pos = root; + u32 idx = tree_.root(); + for (int ply = 0; ply < 2; ply++) { + const u32 e = best_edge(idx); + if (!e || !tree_.edge(e).child) break; + pos.make_move(Move::from_raw(tree_.edge(e).move)); + history.push_back(pos.key); + idx = tree_.edge(e).child; + } + if (idx == tree_.root() || tree_.node(idx).state != EXPANDED) self_test_failed("no node to reroot to"); + const auto before = snapshot(idx); + tree_.reroot(idx); + u32 pruned_max, kept_min; + const size_t count = compare(before, false, pruned_max, kept_min); + if (count != before.size() || count != tree_.nodes_used() - 1) self_test_failed("reroot lost nodes"); + root_pos_ = pos; + verify_tree(history); + uci_io::send("info string verify (b) reroot " + std::string(fen) + ": " + std::to_string(count) + + " nodes ok"); + } + + new_game(); + uci_io::send("info string verify passed"); +} +#endif + } // namespace rigby diff --git a/src/mcts.h b/src/mcts.h index 31eac77..0810576 100644 --- a/src/mcts.h +++ b/src/mcts.h @@ -225,6 +225,12 @@ public: SearchResult search(const Position& root, const std::vector& history, const SearchLimits& limits, bool print_info); +#ifdef RIGBY_VERIFY_TREE + // The `verify` command: incremental keys along random games, and garbage + // collection and rerooting against a snapshot of the tree. Aborts on a failure. + void self_test(); +#endif + private: using Clock = std::chrono::steady_clock; diff --git a/src/uci.cpp b/src/uci.cpp index cf56e01..e79bcc8 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -334,6 +334,11 @@ void uci_loop() { is >> playouts; e.stop(); run_bench(playouts); +#ifdef RIGBY_VERIFY_TREE + } else if (cmd == "verify") { + e.stop(); + e.searcher.self_test(); +#endif } else if (!cmd.empty()) { send("info string unknown command: " + cmd); } -- 2.47.3 From fb1b8a5b9383b5debd967f635af7c682a59ce4c3 Mon Sep 17 00:00:00 2001 From: rektdie Date: Mon, 16 Nov 2026 19:42:32 +0100 Subject: [PATCH 08/19] mcts: document the arena split (8 edges per node) Measured over the 16 bench positions at 5 s, Hash 64 (local, single runs): collections main 200; edges per node 4: 217, 6: 183, 8: 184, 13: 184, 20: 249. 13 cut middlegame collections further but gave 2-3x more in the endgames; 8 stays close to main everywhere. Bench: 663779 Co-Authored-By: Claude Opus 5.5 --- src/mcts.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mcts.h b/src/mcts.h index 0810576..bf55c0b 100644 --- a/src/mcts.h +++ b/src/mcts.h @@ -56,11 +56,14 @@ u16 position_check(const Position& pos); // Two arenas: nodes and edges. Index 0 of each is null. class Tree { public: - // Edges per node the arenas are sized for. Measured in step 1 of the MCGS - // plan (docs/mcgs-log.md, edges per visited node): 13 on average in 5 s + // Edges per node the arenas are sized for: the edge arena gets 128 of + // every 160 bytes, the node arena 32. Measured in step 1 of the MCGS plan + // (docs/mcgs-log.md, edges per visited node): 13 on average in 5 s // searches without collections, 19-21 in middlegames, 3.6-5.5 in simple // endgames, and 3-9 right after collections (pruned nodes keep their node - // but lose their edges). See set_hash for the choice. + // but lose their edges). Over the 16 bench positions at 5 s and Hash 64, + // 8 gave 184 collections (main: 200), as few as 13 did, without 13's + // 2-3x more collections in the endgames (which fill the node arena first). static constexpr size_t EDGES_PER_NODE = 8; void resize_bytes(size_t bytes); -- 2.47.3 From 5424e1a1ce83361650a0cdc48717fecd02586112 Mon Sep 17 00:00:00 2001 From: rektdie Date: Mon, 16 Nov 2026 20:06:09 +0100 Subject: [PATCH 09/19] docs: step 2 (Edge/Node split) in mcgs-log: gates, arena split, NPS Co-Authored-By: Claude Opus 5.5 --- docs/mcgs-log.md | 107 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) diff --git a/docs/mcgs-log.md b/docs/mcgs-log.md index 1326f56..3ad3e89 100644 --- a/docs/mcgs-log.md +++ b/docs/mcgs-log.md @@ -6,6 +6,7 @@ only from results the owner provides. | step | branch | commit | bench | SPRT (link, TC, bounds) | outcome | | --- | --- | --- | --- | --- | --- | | 1 | `mcgs-stats` | `bec9871` | 663779 (normal and `STATS=1` builds) | none (never merged) | measurement only; the branch stays on its own | +| 2 | `mcgs-step2-split` | `fb1b8a5` | 663779 (identical to main) | | | ## Step 1 measurements @@ -274,3 +275,109 @@ row, which is consistent with the counters being right. - The no-GC figure decides which arena fills first. Step 2 should size for it, or for the middlegame value, and check that the 5000 ms Hash 64 runs do not hit GC on the node arena first. + +## Step 2: Edge/Node split (`mcgs-step2-split`) + +Code at `fb1b8a5`, on top of `mcgs-plan` (`479f6cf`). Commits: + +- `18911b0` tests: add `tests/fischer.epd` (sha256 `4bc384f2…70b3cd`, checked); +- `6629525` the split itself; +- `226106e` the `verify` command (VERIFY builds only); +- `fb1b8a5` the arena-split comment. + +What changed: 16-byte `Edge` and 32-byte `Node` in two arenas (plan 3.2), lazy +node creation, edge visits kept equal to child visits, selection and root +decisions on edges, root index as a member, and mark → forwarding → slide → +remap compaction for both arenas with the tree-exact threshold. `key`/`check` are +set at node creation, and `u`/`base` are set by pruning. Nothing reads them yet. +`draws` stays 0. Path draws still live in `node.state`. + +**Arena split: 8 edges per node** (edge arena 128 of every 160 bytes). All of the +following are local single runs at 5 s, Hash 64, on the 16 bench positions. GC runs: + +| | main | 4 | 6 | 8 | 13 | 20 | +| --- | ---: | ---: | ---: | ---: | ---: | ---: | +| GC runs | 200 | 217 | 183 | 184 | 184 | 249 | + +- 13 (the no-GC growth ratio) cut middlegame collections further. It gave 2–3× more + in positions 11, 12 and 15, where the node arena fills first. +- 8 stays near main in every phase. +- Step 4 re-measures this split once the graph exists. + +Deviations from the plan's wording: + +- `src/uci.cpp` gains the VERIFY-only `verify` command. +- VERIFY builds also run `verify_tree` at the end of every search, not only on + the next search. Otherwise a single `go` would never be checked. +- `verify_tree` additionally recomputes each node's state from its position and + its path, including repetition. That is exact while the search is a tree. +- Check (b) identifies nodes by move path, not by key, because a tree has + several nodes per key. +- `info string reused N nodes` now counts positions, not child slots. + +### Gates (all on the owner's machine, 2026-11-16) + +- **Build:** `make -j EXE=rigby-dev` and the VERIFY build, zero warnings. +- **Bench:** `663779`, identical to main. +- **Perft:** + - `perftsuite`: all passed (590,175,385 nodes); + - `perftfile tests/fischer.epd 5`: 960 positions, 0 failed, 17,614,927,759 nodes, 53 s. +- **Reuse sequence**, Hash 256, `go nodes 50000`, 10 moves (best move plus the + second PV move): every `bestmove` and every `info depth` line (depth, seldepth, + score, nodes, PV) identical to main. Only `nps`, `time`, `hashfull` and the + `reused N` count differ. +- **VERIFY searches**, all clean (`tree verified` after every reroot, GC and + search, no abort): + - the `go nodes 200000` positions of section 6, including the 960 start with + `UCI_Chess960 true`; + - forced GC with `go nodes 300000`: Hash 1 gave 144 collections (startpos) and + 121 (960); Hash 2 gave 82 and 63; + - the reuse sequence with the VERIFY build at Hash 64, at Hash 1 (28–36 + collections per move) and from the 960 start. + - Under GC the output differs from main because the bytes per node differ. + That is expected. +- **`verify`:** + - (a) 96,434 random plies over 7 standard and 960 FENs, incremental key = FEN key; + - (b) three forced collections (to 1/2, 1/4, 1/8) and a reroot on 4 + positions, all survivors identical. +- **Smoke:** + - `go nodes 1`, `go nodes 2`, `go depth 1` on the section 6 positions (plus + the perpetual-check bench position and two no-move positions): output + identical to main; + - cutechess-ob: 100 games of dev vs main at 2+0.02, Hash 16, UHO book, and 20 + games of the VERIFY build against itself at `nodes=20000`. All games ended by + mate, the 50-move rule, repetition or insufficient material. There were no + illegal moves, disconnects, time forfeits or aborts. Not strength evidence. +- **Note:** on `6k1/5ppp/8/8/8/8/5PPP/3R2K1 w - - 0 1` both main and step 2 play + `g1f1` at 200k nodes, not `Rd8#`. White is a rook up, every move already has + Q ≈ 0.996, and the mate (Q = 1) barely stands out. This was there before the + split. + +### NPS versus main (local, noisy machine) + +The machine had other load (about 40 % CPU from other applications), so main and +step 2 were run interleaved. + +| measurement | main | step 2 | ratio | +| --- | ---: | ---: | ---: | +| `bench` nps, 5 alternating runs each (mean) | 3,443,510 | 3,356,540 | 0.975 | +| playouts/s, 5 s per bench position, Hash 64, interleaved per position, 2 rounds | 610,987 | 545,670 | **0.893** | +| the same at Hash 1024 (no GC), 1 round | 778,216 | 679,995 | 0.874 | + +- The loss grows with tree size (−2.5 % on bench's 5000-playout trees, −11 to + −13 % at 5 s). It is the same without GC, so it is in the playout, not in + compaction. +- Likely cause: selection now loads every visited child node, scattered over + the node arena, where it used to read sibling Q values from one contiguous + block. +- A software prefetch of those nodes and `alignas(32)` nodes were each tried and + each measured within noise (+0.5 %, +0.7 %). Both were dropped. +- Variant 5b (edge-Q cache) is the plan's answer to this cost. +- The drop is over 3 %, so the plan's LTC condition applies. + +### SPRT (owner) + +- STC Non-Regression `[-5.00, 0.00]`, 8.0+0.08, Threads=1, Hash=64, + `UHO_Lichess_4852_v1.epd`: link and outcome to be filled in. +- LTC Non-Regression `[-5.00, 0.00]`, 40.0+0.40, Threads=1, Hash=256 (NPS drop + > 3 %): link and outcome to be filled in. -- 2.47.3 From 6ec8769555510968b75d1dafbee1c4be30f8ee64 Mon Sep 17 00:00:00 2001 From: rektdie Date: Mon, 16 Nov 2026 20:25:02 +0100 Subject: [PATCH 10/19] mcts: Monte-Carlo graph search core (MCGS step 3) Bench: 764208 One node per position, found through a key table, as in docs/mcgs-plan.md sections 3.1-3.5 and 3.6.5: - Key table: open addressing with linear probing over 8-byte slots {key_hi, node}, a power of two of at least twice the node arena. A hit needs the full 64-bit key and the node's 16-bit check (about 80 bits). It is rebuilt from the survivors after every collection and reroot. - create_node: a position's first visit creates and evaluates its node (checkmate, stalemate, insufficient material except at the root, then ValueHash, then the net) with N = base = 1, q = u. The root is created and evaluated through it. - Descent: after make_move, repetition and the 50-move rule (mate first) are judged before the lookup and recorded only as the edge's draw count. An edge is linked on first selection, to an existing node when the table has one. MAX_PLAYOUT_DEPTH = 512 guards against key collisions. - Backprop: each path edge counts the visit (and the draw), each path node recomputes q = (base*u - sum (N-D)*c.q) / N, summed in double. ValueHash is stored for every path node; butterfly history as before. A playout whose node allocation fails is dropped and the graph collected. - Selection, best move, smart pruning, score, PV and dashboard read edges, with path draws counted as 0. The PV stops after a repeated position. - The root's edges are checked against its legal moves at search start; the graph is cleared otherwise. - GC threshold: visited bitmap and the root counted apart, so the estimate stays an upper bound on a DAG. - Hash: node arena, edge arena (8 edges per node, unchanged) and the table share the graph's budget; the table's power of two is rounded down or up, whichever leaves more nodes. - VERIFY: verify_tree checks the graph per plan 3.8 (keys, table, states from the position alone, edges, N = base + edge visits, q = u on leaves); check (b) of `verify` identifies nodes by key. The bench changes (663779 -> 764208) because the tree becomes a graph: transpositions share nodes, so playouts run through existing nodes and their depths and the positions they visit change; the root gets its own evaluation and N = 1 + the edges' visits; and repetitions and the 50-move rule are judged on every playout instead of once per node. Co-Authored-By: Claude Opus 5.5 --- src/mcts.cpp | 566 ++++++++++++++++++++++++++++++++------------------- src/mcts.h | 125 +++++++++--- 2 files changed, 447 insertions(+), 244 deletions(-) diff --git a/src/mcts.cpp b/src/mcts.cpp index fc6348b..ffdd7db 100644 --- a/src/mcts.cpp +++ b/src/mcts.cpp @@ -29,21 +29,68 @@ u16 position_check(const Position& pos) { } void Tree::resize_bytes(size_t bytes) { - // A node costs its own 32 bytes plus EDGES_PER_NODE edges of 16. - const size_t per_node = sizeof(Node) + EDGES_PER_NODE * sizeof(Edge); - const size_t node_count = std::max(bytes / per_node, 1024); + // A node costs its own 32 bytes, EDGES_PER_NODE edges of 16 and at least + // two table slots of 8. The table's size is a power of two of at least + // twice the nodes; of rounding its slots down or up, take the one that + // leaves room for more nodes within `bytes`. + const size_t arena_per_node = sizeof(Node) + EDGES_PER_NODE * sizeof(Edge); + const size_t want = std::max(bytes / (arena_per_node + 2 * sizeof(Slot)), 1024); + size_t node_count = 0, slots = 0; + for (const size_t s : {std::bit_floor(2 * want), std::bit_ceil(2 * want)}) { + const size_t table_bytes = s * sizeof(Slot); + if (table_bytes >= bytes) continue; + const size_t n = std::min(s / 2, (bytes - table_bytes) / arena_per_node); + if (n > node_count) { + node_count = n; + slots = s; + } + } + if (node_count < 1024) { + node_count = 1024; + slots = 2048; + } nodes_.assign(node_count, Node{}); nodes_.shrink_to_fit(); edges_.assign(node_count * EDGES_PER_NODE, Edge{}); edges_.shrink_to_fit(); + table_.assign(slots, Slot{}); + table_.shrink_to_fit(); + table_mask_ = slots - 1; clear(); } void Tree::clear() { - nodes_used_ = 2; // index 0 is the null node, index 1 the root + nodes_used_ = 1; // index 0 is the null node edges_used_ = 1; // index 0 is the null edge - root_ = 1; - nodes_[root_] = Node{}; + root_ = 0; + std::fill(table_.begin(), table_.end(), Slot{}); + table_entries_ = 0; +} + +u32 Tree::find(u64 key, u16 check) const { + const u32 hi = u32(key >> 32); + for (size_t i = size_t(key) & table_mask_;; i = (i + 1) & table_mask_) { + const Slot& s = table_[i]; + if (!s.node) return 0; + if (s.key_hi == hi) { + const Node& n = nodes_[s.node]; + if (n.key == key && n.check == check) return s.node; + } + } +} + +void Tree::insert(u32 idx) { + const u64 key = nodes_[idx].key; + size_t i = size_t(key) & table_mask_; + while (table_[i].node) i = (i + 1) & table_mask_; + table_[i] = Slot{u32(key >> 32), idx}; + table_entries_++; +} + +void Tree::rebuild_table() { + std::fill(table_.begin(), table_.end(), Slot{}); + table_entries_ = 0; + for (u32 i = 1; i < nodes_used_; i++) insert(i); } u32 Tree::alloc_node() { @@ -72,31 +119,47 @@ size_t Tree::collect_garbage(size_t node_target, size_t edge_target) { } u32 Tree::prune_threshold(size_t node_target, size_t edge_target) const { - // A node keeps its edges through a collection with threshold T when it has - // at least T visits, and the child nodes of those edges stay. Visits only - // shrink going down a tree, so every ancestor of such a node survives too, - // and the size kept for a threshold is just the edges and child nodes of - // all nodes with at least that many visits. + // A node keeps its edges through a collection with threshold T when it is + // still reachable and has at least T visits, and the child nodes of those + // edges stay. The estimate for T counts the edges and edge targets of + // every reachable node with at least T visits, plus the root's, which + // always stay. In a tree, where visits only shrink going down, that is + // exactly what is kept. In a graph it can only be more (a node reachable + // only through pruned nodes goes, and a shared child is counted once per + // edge), so what is kept stays within the targets. constexpr u32 CAP = 1 << 16; std::vector edges_by_visits(CAP + 1, 0); std::vector children_by_visits(CAP + 1, 0); + std::vector seen(nodes_used_, 0); std::vector stack{root_}; + seen[root_] = 1; + u64 kept_nodes = 2; // null node and root + u64 kept_edges = 1; // null edge while (!stack.empty()) { - const Node& node = nodes_[stack.back()]; + const u32 idx = stack.back(); + const Node& node = nodes_[idx]; stack.pop_back(); if (!node.first_edge) continue; const u32 bucket = std::min(node.visits, CAP); - edges_by_visits[bucket] += node.num_edges; + u64 children = 0; for (u32 i = 0; i < node.num_edges; i++) { const u32 child = edges_[node.first_edge + i].child; if (!child) continue; - children_by_visits[bucket]++; - stack.push_back(child); + children++; + if (!seen[child]) { + seen[child] = 1; + stack.push_back(child); + } + } + if (idx == root_) { + kept_nodes += children; + kept_edges += node.num_edges; + } else { + children_by_visits[bucket] += children; + edges_by_visits[bucket] += node.num_edges; } } - u64 kept_nodes = 2; // null node and root - u64 kept_edges = 1; // null edge for (u32 v = CAP; v >= 1; v--) { if (kept_nodes + children_by_visits[v] > node_target || kept_edges + edges_by_visits[v] > edge_target) return v + 1; @@ -109,8 +172,9 @@ u32 Tree::prune_threshold(size_t node_target, size_t edge_target) const { size_t Tree::compact(u32 new_root, u32 min_visits) { // Mark: everything reachable from the new root stays. A node below the // visit threshold loses its edges and becomes a leaf again; it keeps its - // visits and Q (also as u and base) and gets expanded anew if search - // comes back to it. `blocks` collects every edge block that stays, as + // visits and Q, as its own value u with weight base, and gets expanded + // anew if search comes back to it. Each node is marked once, however many + // edges lead to it. `blocks` collects every edge block that stays, as // (old first index, size). std::vector marked(nodes_used_, 0); std::vector> blocks; @@ -179,6 +243,8 @@ size_t Tree::compact(u32 new_root, u32 min_visits) { root_ = forward[new_root]; nodes_used_ = next_node; edges_used_ = next_edge; + // Node indices moved, so the table starts over from the survivors' keys. + rebuild_table(); return nodes_used_ - 1; // everything but the null node } @@ -189,10 +255,27 @@ size_t Tree::compact(u32 new_root, u32 min_visits) { Searcher::Searcher() { set_hash(64); } void Searcher::clear_tree(const Position& root) { + // The root is created like any node and evaluated once; its own value + // takes part in its Q with weight 1, as at every other node. tree_.clear(); - Node& node = tree_.node(tree_.root()); - node.key = root.key; - node.check = position_check(root); + float value; + tree_.set_root(create_node(root, true, value)); +} + +bool Searcher::root_edges_valid(const Position& root) const { + const Node& node = tree_.node(tree_.root()); + if (node.key != root.key || node.check != position_check(root)) return false; + if (node.state != EXPANDED) return node.state == UNEXPANDED; + MoveList legal; + generate_legal(root, legal); + if (node.num_edges != legal.size()) return false; + bool seen[256] = {}; + for (u32 i = 0; i < node.num_edges; i++) { + const auto it = std::find(legal.begin(), legal.end(), Move::from_raw(tree_.edge(node.first_edge + i).move)); + if (it == legal.end() || seen[it - legal.begin()]) return false; + seen[it - legal.begin()] = true; + } + return true; } i64 Searcher::elapsed_ms() const { @@ -311,147 +394,157 @@ size_t Searcher::reuse_tree(const Position& root) { idx = next; } - // A node that was a draw by repetition or the 50-move rule inside the old - // tree can be a real position to play from now; start such a root afresh. + // A terminal node can still be a position to play from (insufficient + // material is never terminal at the root); start such a root afresh. if (pos.key != root.key || tree_.node(idx).state != EXPANDED) return 0; return tree_.reroot(idx); } #ifdef RIGBY_VERIFY_TREE -// Debug check, from the root as `root_pos_` with the game history `history` -// (ending with the root's key): -// - every node is reached exactly once (in-degree 1, the root 0), and the -// arenas hold nothing else; -// - a node's key and check match its position, and its state is the one -// evaluate_leaf gives that position on this path; +// Debug check of the graph from the root as `root_pos_`, with the game +// history `history` (ending with the root's key). Each node is checked once, +// with the position of the first path that reaches it (positions do not +// depend on the path, apart from the clocks): +// - every node is reachable, and the arenas hold nothing else; +// - a node's key and check match its position, and the table finds it there; +// the table has one entry per node and nothing else; +// - its state is what the position itself decides: checkmate, stalemate or +// insufficient material (not at the root, nor at an earlier root, i.e. a +// position of the game history). Repetitions and the 50-move rule never +// show in a node; // - an expanded node has one edge per legal move; -// - an edge has a child node exactly when it has visits, with as many visits -// as the child (a tree), and no draws yet; -// - every expanded node has at least one visit more than its edges together -// (more when it was evaluated as a leaf while the tree was full); the root -// is expanded before its first visit, so it may have exactly as many; +// - an edge has no more draws than visits, and a child node whenever it has +// a visit that was not a draw; +// - N = base + the edges' visits; a node without edges has q = u; // - Q and u are finite and in [-1, 1]. void Searcher::verify_tree(const std::vector& history) const { const auto fail = [&](u32 idx, const Position& pos, const std::string& what) { const Node& n = tree_.node(idx); - std::cerr << "TREE CORRUPT at node " << idx << " (" << pos.fen() << "): " << what << " visits=" << n.visits - << " q=" << n.q << " state=" << int(n.state) << " edges=" << int(n.num_edges) - << " first=" << n.first_edge << " nodes_used=" << tree_.nodes_used() - << " edges_used=" << tree_.edges_used() << std::endl; + std::cerr << "GRAPH CORRUPT at node " << idx << " (" << pos.fen() << "): " << what << " visits=" << n.visits + << " base=" << n.base << " q=" << n.q << " u=" << n.u << " state=" << int(n.state) + << " edges=" << int(n.num_edges) << " first=" << n.first_edge << " nodes_used=" << tree_.nodes_used() + << " edges_used=" << tree_.edges_used() << " table=" << tree_.table_entries() << std::endl; std::abort(); }; - std::vector in_degree(tree_.nodes_used(), 0); - std::vector keys = history; - struct Frame { - u32 idx; - Position pos; - int depth; - u32 next = 0; - }; - std::vector stack; - u64 nodes = 0, edges = 0; + const u32 root = tree_.root(); + if (root == 0 || root >= tree_.nodes_used()) fail(root, root_pos_, "bad root index"); - const auto enter = [&](u32 idx, const Position& pos, int depth) { + std::vector seen(tree_.nodes_used(), 0); + std::vector> stack{{root, root_pos_}}; + seen[root] = 1; + u64 nodes = 0, edges = 0; + while (!stack.empty()) { + const auto [idx, pos] = stack.back(); + stack.pop_back(); const Node& node = tree_.node(idx); nodes++; + if (node.key != pos.key || node.check != position_check(pos)) fail(idx, pos, "key or check mismatch"); + if (tree_.find(pos.key, position_check(pos)) != idx) fail(idx, pos, "the table does not find the node"); if (!std::isfinite(node.q) || std::abs(node.q) > 1.0f || !std::isfinite(node.u) || std::abs(node.u) > 1.0f) fail(idx, pos, "q or u out of range"); + if (!node.visits || node.visits < node.base) fail(idx, pos, "visits below base"); - // The state evaluate_leaf gives this position on this path. MoveList legal; generate_legal(pos, legal); + // A position of the game was a root (never drawn by insufficient + // material) and may have been created as a non-root before, so + // either state is fine there; the current root is never terminal. + const bool in_history = std::find(history.begin(), history.end(), pos.key) != history.end(); int expected = -1; // not terminal - if (legal.empty()) { - expected = pos.in_check() ? TERMINAL_LOSS : TERMINAL_DRAW; - } else if (depth > 0) { - bool repetition = false; - const int n = int(keys.size()); - for (int back = 4; back <= pos.halfmove && back < n; back += 2) - if (keys[n - 1 - back] == pos.key) repetition = true; - if (pos.halfmove >= 100 || pos.insufficient_material() || repetition) expected = TERMINAL_DRAW; - } - if (expected >= 0 ? node.state != expected : node.state != UNEXPANDED && node.state != EXPANDED) - fail(idx, pos, "state " + std::to_string(node.state) + " expected " + std::to_string(expected)); + if (legal.empty()) expected = pos.in_check() ? TERMINAL_LOSS : TERMINAL_DRAW; + else if (pos.insufficient_material() && idx != root && !in_history) expected = TERMINAL_DRAW; + const bool ok = expected >= 0 ? node.state == expected + : node.state == UNEXPANDED || node.state == EXPANDED || + (node.state == TERMINAL_DRAW && idx != root && in_history && + pos.insufficient_material()); + if (!ok) fail(idx, pos, "state " + std::to_string(node.state) + " expected " + std::to_string(expected)); if (node.state != EXPANDED) { if (node.first_edge || node.num_edges) fail(idx, pos, "edges on a node that is not expanded"); - } else { - if (!node.first_edge || node.first_edge + node.num_edges > tree_.edges_used() || - node.num_edges != legal.size()) - fail(idx, pos, "bad edge block, legal moves " + std::to_string(legal.size())); - bool seen[256] = {}; - u64 edge_visits = 0; - for (u32 i = 0; i < node.num_edges; i++) { - const Edge& e = tree_.edge(node.first_edge + i); - const auto it = std::find(legal.begin(), legal.end(), Move::from_raw(e.move)); - if (it == legal.end() || seen[it - legal.begin()]) fail(idx, pos, "illegal or repeated edge move"); - seen[it - legal.begin()] = true; - if (e.draws) fail(idx, pos, "edge with draws"); - if (e.child >= tree_.nodes_used()) fail(idx, pos, "edge child out of range"); - if (bool(e.child) != bool(e.visits)) fail(idx, pos, "edge child without visits or the reverse"); - if (e.child && e.visits != tree_.node(e.child).visits) fail(idx, pos, "edge and child visits differ"); - if (e.child && ++in_degree[e.child] != 1) fail(idx, pos, "node reached twice"); - edge_visits += e.visits; + if (node.visits != node.base || node.q != node.u) fail(idx, pos, "leaf with visits != base or q != u"); + continue; + } + if (!node.first_edge || node.first_edge + node.num_edges > tree_.edges_used() || + node.num_edges != legal.size()) + fail(idx, pos, "bad edge block, legal moves " + std::to_string(legal.size())); + bool legal_seen[256] = {}; + u64 edge_visits = 0; + for (u32 i = 0; i < node.num_edges; i++) { + const Edge& e = tree_.edge(node.first_edge + i); + const auto it = std::find(legal.begin(), legal.end(), Move::from_raw(e.move)); + if (it == legal.end() || legal_seen[it - legal.begin()]) fail(idx, pos, "illegal or repeated edge move"); + legal_seen[it - legal.begin()] = true; + if (e.draws > e.visits) fail(idx, pos, "edge with more draws than visits"); + if (e.child >= tree_.nodes_used()) fail(idx, pos, "edge child out of range"); + if (e.visits > e.draws && !e.child) fail(idx, pos, "edge with non-draw visits and no child"); + edge_visits += e.visits; + if (e.child && !seen[e.child]) { + seen[e.child] = 1; + Position next = pos; + next.make_move(Move::from_raw(e.move)); + stack.push_back({e.child, next}); } - edges += node.num_edges; - if (node.visits < edge_visits + (idx == tree_.root() ? 0 : 1)) - fail(idx, pos, "fewer visits than the edges, edge visits " + std::to_string(edge_visits)); - } - stack.push_back({idx, pos, depth}); - }; - - if (tree_.root() == 0 || tree_.root() >= tree_.nodes_used()) fail(tree_.root(), root_pos_, "bad root index"); - enter(tree_.root(), root_pos_, 0); - while (!stack.empty()) { - Frame& f = stack.back(); - const Node& node = tree_.node(f.idx); - if (f.next < node.num_edges) { - const Edge& e = tree_.edge(node.first_edge + f.next++); - if (!e.child) continue; - Position next = f.pos; - next.make_move(Move::from_raw(e.move)); - keys.push_back(next.key); - const int depth = f.depth + 1; - enter(e.child, next, depth); // invalidates f - } else { - stack.pop_back(); - if (!stack.empty()) keys.pop_back(); } + edges += node.num_edges; + if (node.visits != node.base + edge_visits) + fail(idx, pos, "visits != base + edge visits " + std::to_string(edge_visits)); } if (nodes != tree_.nodes_used() - 1 || edges != tree_.edges_used() - 1) - fail(tree_.root(), root_pos_, + fail(root, root_pos_, "unreachable nodes or edges: reached " + std::to_string(nodes) + " nodes, " + std::to_string(edges) + " edges"); + + // The table: one entry per node, each under its node's key. + size_t entries = 0; + for (size_t s = 0; s < tree_.table_slots(); s++) { + const u32 n = tree_.table_node(s); + if (!n) continue; + entries++; + if (n >= tree_.nodes_used() || tree_.table_key_hi(s) != u32(tree_.node(n).key >> 32)) + fail(root, root_pos_, "table slot " + std::to_string(s) + " points to a wrong node"); + } + if (entries != nodes || tree_.table_entries() != nodes) + fail(root, root_pos_, + "table has " + std::to_string(entries) + " entries for " + std::to_string(nodes) + " nodes"); + uci_io::send("info string tree verified: " + std::to_string(nodes) + " nodes, " + std::to_string(edges) + - " edges"); + " edges, " + std::to_string(entries) + " table entries"); } #endif -float Searcher::evaluate_leaf(u32 idx, const Position& pos, int depth) { +u32 Searcher::create_node(const Position& pos, bool is_root, float& value) { + const u32 idx = tree_.alloc_node(); + if (!idx) return 0; Node& node = tree_.node(idx); + node = Node{}; + node.key = pos.key; + node.check = position_check(pos); - MoveList moves; - generate_legal(pos, moves); - - if (moves.empty()) { + // Only what the position itself decides. Repetitions and the 50-move rule + // depend on the path and are judged on every playout instead. The root + // must always produce a move, so it is never declared drawn. + if (!has_legal_move(pos)) { node.state = pos.in_check() ? TERMINAL_LOSS : TERMINAL_DRAW; - return node.state == TERMINAL_LOSS ? -1.0f : 0.0f; - } - - // The root must always produce a move, so it is never declared drawn. - if (depth > 0 && (pos.halfmove >= 100 || pos.insufficient_material() || is_repetition(pos))) { + value = node.state == TERMINAL_LOSS ? -1.0f : 0.0f; + } else if (!is_root && pos.insufficient_material()) { node.state = TERMINAL_DRAW; - return 0.0f; + value = 0.0f; + } else if (float q; value_hash_.probe(pos.key, q)) { + // A position searched before (dropped by a collection, or from an + // earlier search) brings its Q along. + value = q; + } else { + value = eval::value(pos); } - // A position searched before (a transposition, or from an earlier search) - // brings its Q along. - if (float q; value_hash_.probe(pos.key, q)) return q; - return eval::value(pos); + node.visits = node.base = 1; + node.u = node.q = -value; + tree_.insert(idx); + return idx; } bool Searcher::expand(u32 idx, const Position& pos) { @@ -493,7 +586,7 @@ u32 Searcher::select_edge(u32 idx) const { const Node& node = tree_.node(idx); // node.q is from the view of the side that moved into this node, so the side - // to move here sees -q. + // to move here sees -q. Visits are N(n), the node's own evaluation included. const float parent_q = node.visits ? -node.q : 0.0f; float visited_policy = 0.0f; @@ -517,7 +610,7 @@ u32 Searcher::select_edge(u32 idx) const { const u32 c = node.first_edge + i; const Edge& e = tree_.edge(c); // The child's Q is from the view of the side to move here. - const float q = e.visits ? tree_.node(e.child).q : fpu; + const float q = e.visits ? visited_edge_q(e) : fpu; const float score = q + explore * e.prior() / float(1 + e.visits); if (score > best_score) { best_score = score; @@ -527,91 +620,127 @@ u32 Searcher::select_edge(u32 idx) const { return best; } +void Searcher::recompute_q(Node& node) const { + // q = (base * u - sum (N - D) * c.q) / N, in the view of the side that + // moved into the node. Children's Q are from the view of the side to move + // here, hence the minus; path draws count 0. + double sum = double(node.base) * double(node.u); + for (u32 i = 0; i < node.num_edges; i++) { + const Edge& e = tree_.edge(node.first_edge + i); + const u32 w = e.visits - e.draws; + if (w) sum -= double(w) * double(tree_.node(e.child).q); + } + node.q = float(sum / double(node.visits)); +} + void Searcher::playout() { Position pos = root_pos_; history_.resize(root_history_size_); path_.clear(); edge_path_.clear(); + // How the playout ended; it decides what happens to the last node. + enum Leaf { NEW_NODE, TERMINAL, NOT_EXPANDED, PATH_DRAW, DEPTH_LIMIT } leaf; u32 idx = tree_.root(); path_.push_back(idx); int depth = 0; - float value; + float value; // for the side to move at the end of the playout for (;;) { - const Node& node = tree_.node(idx); - if (node.state == TERMINAL_LOSS) { - value = -1.0f; + Node& node = tree_.node(idx); + if (node.state == TERMINAL_LOSS || node.state == TERMINAL_DRAW) { + value = -node.u; + leaf = TERMINAL; break; } - if (node.state == TERMINAL_DRAW) { - value = 0.0f; + // A node's first visit created and evaluated it; the second creates + // its edges (moves, priors, memory). + if (node.state == UNEXPANDED && !expand(idx, pos)) { + value = -node.q; + leaf = NOT_EXPANDED; break; } - if (node.state == UNEXPANDED) { - // Most leaves are only ever visited once, so a first visit just - // evaluates; edges (moves, priors, memory) come on the second. - if (node.visits == 0) { - value = evaluate_leaf(idx, pos, depth); - break; - } - if (!expand(idx, pos)) { - value = eval::value(pos); - break; - } - } const u32 e = select_edge(idx); Edge& edge = tree_.edge(e); - u32 child = edge.child; - const bool created = !child; - if (created) { - // The first time this move is chosen: its node is created now and - // evaluated on this visit. - child = tree_.alloc_node(); + pos.make_move(Move::from_raw(edge.move)); + history_.push_back(pos.key); + edge_path_.push_back(e); + depth++; + + // Draws by repetition or the 50-move rule belong to this path, not to + // the position, so they are judged before looking for its node and + // only ever recorded on the edge. Mate on the 100th half-move is still + // mate. + if (is_repetition(pos) || + (pos.halfmove >= 100 && + !(edge.child ? tree_.node(edge.child).state == TERMINAL_LOSS : pos.in_check() && !has_legal_move(pos)))) { + value = 0.0f; + leaf = PATH_DRAW; + break; + } + + if (!edge.child) { + // The first time this move is chosen here. Its position may already + // have a node, reached by another move order: link to it and go on. + const u16 check = position_check(pos); + u32 child = tree_.find(pos.key, check); if (!child) { - // The node arena is full: as when expansion fails, this node - // takes the playout and the tree is collected right after. - gc_pending_ = true; - value = eval::value(pos); + child = create_node(pos, false, value); + if (!child) { + // The node arena is full. This playout is dropped without + // a trace and the graph is collected right after it. + gc_pending_ = true; + return; + } + edge.child = child; + path_.push_back(child); + leaf = NEW_NODE; break; } edge.child = child; } - pos.make_move(Move::from_raw(edge.move)); - if (created) { - Node& fresh = tree_.node(child); - fresh = Node{}; - fresh.key = pos.key; - fresh.check = position_check(pos); + idx = edge.child; + path_.push_back(idx); + if (depth >= MAX_PLAYOUT_DEPTH) { + value = -tree_.node(idx).q; + leaf = DEPTH_LIMIT; + break; } - history_.push_back(pos.key); - path_.push_back(child); - edge_path_.push_back(e); - idx = child; - depth++; } - // `value` is from the view of the side to move at the leaf. Each node stores - // the view of the side that moved into it, so flip before every update. - // The same result in centipawns scores the move into each node in the - // butterfly history, for the side that played it (the side to move at the - // parent, depth i - 1). Edge visits are kept equal to the child's. - int bonus = eval::q_to_cp(std::clamp(value, -0.998f, 0.998f)); - for (size_t i = path_.size(); i-- > 0;) { - value = -value; - bonus = -bonus; - Node& node = tree_.node(path_[i]); + // The last node. A new node already has its one visit (N = base = 1); a + // terminal node and a node that could not be expanded count one more visit + // of their own value (q = u stays). A path draw has no node, and a node at + // the depth limit is left as it is: only the edge into it counts the visit. + if (leaf == TERMINAL || leaf == NOT_EXPANDED) { + Node& node = tree_.node(path_.back()); node.visits++; - node.q += (value - node.q) / float(node.visits); - // The Q from the view of the side to move at the node. Draws by - // repetition or the 50-move rule belong to the path, not the position. - if (node.state != TERMINAL_DRAW) value_hash_.store(history_[root_history_size_ - 1 + i], -node.q, node.visits); - if (i) { - Edge& e = tree_.edge(edge_path_[i - 1]); - e.visits++; - butterfly_.update(root_pos_.stm ^ int((i - 1) & 1), Move::from_raw(e.move), bonus); - } + node.base++; + } + if (leaf == NEW_NODE || leaf == TERMINAL || leaf == NOT_EXPANDED) { + const Node& node = tree_.node(path_.back()); + value_hash_.store(node.key, -node.q, node.visits); + } + + // Up the path: each edge counts the visit (and the draw), and its parent + // node recomputes its Q from its children. `value` is from the view of + // the side to move at the end, so its sign flips at every step back. In + // centipawns it scores each move in the butterfly history, for the side + // that played it (the side to move at ply j). + int bonus = eval::q_to_cp(std::clamp(value, -0.998f, 0.998f)); + for (size_t j = edge_path_.size(); j-- > 0;) { + bonus = -bonus; + Edge& e = tree_.edge(edge_path_[j]); + e.visits++; + if (leaf == PATH_DRAW && j + 1 == edge_path_.size()) e.draws++; + butterfly_.update(root_pos_.stm ^ int(j & 1), Move::from_raw(e.move), bonus); + + Node& node = tree_.node(path_[j]); + node.visits++; + recompute_q(node); + // The Q from the view of the side to move at the node. + value_hash_.store(node.key, -node.q, node.visits); } iterations_++; @@ -657,13 +786,22 @@ void Searcher::print_info() const { } std::vector Searcher::principal_variation() const { + // The best edge from each node. The graph can have cycles, so the line + // also ends after a move into a position it or the game has seen before + // (a draw), and after 64 plies. std::vector pv; + std::vector keys(history_.begin(), history_.begin() + std::ptrdiff_t(root_history_size_)); + Position pos = root_pos_; u32 idx = tree_.root(); for (int ply = 0; ply < 64; ply++) { const u32 c = best_edge(idx); if (!c || !tree_.edge(c).visits) break; - pv.push_back(Move::from_raw(tree_.edge(c).move)); - idx = tree_.edge(c).child; + const Edge& e = tree_.edge(c); + pv.push_back(Move::from_raw(e.move)); + pos.make_move(Move::from_raw(e.move)); + if (!e.child || std::find(keys.begin(), keys.end(), pos.key) != keys.end()) break; + keys.push_back(pos.key); + idx = e.child; } return pv; } @@ -711,7 +849,10 @@ SearchResult Searcher::search(const Position& root, const std::vector& hist root_pos_ = root; } #endif - const size_t reused = reuse_tree(root); + size_t reused = reuse_tree(root); + // The root's edges must be exactly its legal moves. Inside the graph that + // rests on the 80-bit key and check; the root is checked in full. + if (reused && !root_edges_valid(root)) reused = 0; if (!reused) clear_tree(root); #ifdef RIGBY_VERIFY_TREE if (reused) verify_tree(history_); @@ -741,7 +882,7 @@ SearchResult Searcher::search(const Position& root, const std::vector& hist if (print && pretty) live_.begin(); - // The root needs its children before the first playout, so that even a + // The root needs its edges before the first playout, so that even a // single playout leaves a move to play. if (tree_.node(tree_.root()).state == UNEXPANDED && !expand(tree_.root(), root)) { clear_tree(root); @@ -749,7 +890,7 @@ SearchResult Searcher::search(const Position& root, const std::vector& hist expand(tree_.root(), root); } - // Root move visits brought along by tree reuse, for smart pruning. The + // Root edge visits brought along by tree reuse, for smart pruning. The // root's edges keep their order through collections. root_start_visits_.clear(); { @@ -820,12 +961,10 @@ struct NodeSnapshot { u32 base; u8 state; u16 check; - // (move, policy, visits, draws, has a child) per edge - std::vector> edges; + // (move, policy, visits, draws, child's key or 0) per edge + std::vector> edges; }; -using MovePath = std::vector; - } // namespace void Searcher::self_test() { @@ -867,48 +1006,52 @@ void Searcher::self_test() { } // (b) Garbage collection and rerooting keep everything they keep exactly. + // A node is identified by its position's key, which is unique in the graph. const auto snapshot = [&](u32 from) { - std::map snap; - std::vector> stack{{from, {}}}; + std::map snap; + std::vector seen(tree_.nodes_used(), 0); + std::vector stack{from}; + seen[from] = 1; while (!stack.empty()) { - auto [idx, path] = stack.back(); + const u32 idx = stack.back(); stack.pop_back(); const Node& n = tree_.node(idx); NodeSnapshot s{n.key, n.visits, n.q, n.u, n.base, n.state, n.check, {}}; for (u32 i = 0; i < n.num_edges; i++) { const Edge& e = tree_.edge(n.first_edge + i); - s.edges.emplace_back(e.move, e.policy, e.visits, e.draws, e.child != 0); - if (e.child) { - MovePath next = path; - next.push_back(e.move); - stack.push_back({e.child, next}); + s.edges.emplace_back(e.move, e.policy, e.visits, e.draws, e.child ? tree_.node(e.child).key : 0); + if (e.child && !seen[e.child]) { + seen[e.child] = 1; + stack.push_back(e.child); } } - snap.emplace(path, std::move(s)); + if (!snap.emplace(n.key, std::move(s)).second) self_test_failed("two nodes with one key"); } return snap; }; - // Walks the current tree from the root and compares it with `before`. + // Walks the current graph from the root and compares it with `before`. // Returns the number of nodes; `pruned_max` / `kept_min` get the largest // visits of a node that lost its edges and the smallest of a non-root node // that kept them. - const auto compare = [&](const std::map& before, bool allow_pruning, u32& pruned_max, + const auto compare = [&](const std::map& before, bool allow_pruning, u32& pruned_max, u32& kept_min) { size_t count = 0; pruned_max = 0; kept_min = ~0u; - std::vector> stack{{tree_.root(), {}}}; + std::vector seen(tree_.nodes_used(), 0); + std::vector stack{tree_.root()}; + seen[tree_.root()] = 1; while (!stack.empty()) { - auto [idx, path] = stack.back(); + const u32 idx = stack.back(); stack.pop_back(); count++; const Node& n = tree_.node(idx); - const auto it = before.find(path); + const auto it = before.find(n.key); if (it == before.end()) self_test_failed("a node appeared from nowhere"); const NodeSnapshot& s = it->second; - if (n.key != s.key || n.check != s.check || n.visits != s.visits || n.q != s.q) - self_test_failed("node changed (key, visits or q)"); + if (n.check != s.check || n.visits != s.visits || n.q != s.q) + self_test_failed("node changed (check, visits or q)"); if (!s.edges.empty() && !n.num_edges) { if (!allow_pruning) self_test_failed("a node lost its edges in a reroot"); if (n.state != UNEXPANDED || n.first_edge || n.u != n.q || n.base != n.visits) @@ -918,15 +1061,15 @@ void Searcher::self_test() { } if (n.state != s.state || n.u != s.u || n.base != s.base || n.num_edges != s.edges.size()) self_test_failed("node changed (state, u, base or edges)"); - if (n.num_edges && !path.empty()) kept_min = std::min(kept_min, n.visits); + if (n.num_edges && idx != tree_.root()) kept_min = std::min(kept_min, n.visits); for (u32 i = 0; i < n.num_edges; i++) { const Edge& e = tree_.edge(n.first_edge + i); - if (std::make_tuple(e.move, e.policy, e.visits, e.draws, e.child != 0) != s.edges[i]) + if (std::make_tuple(e.move, e.policy, e.visits, e.draws, e.child ? tree_.node(e.child).key : 0) != + s.edges[i]) self_test_failed("edge changed"); - if (e.child) { - MovePath next = path; - next.push_back(e.move); - stack.push_back({e.child, next}); + if (e.child && !seen[e.child]) { + seen[e.child] = 1; + stack.push_back(e.child); } } } @@ -945,7 +1088,7 @@ void Searcher::self_test() { SearchLimits limits; limits.nodes = 30000; - // Collections down to a half, a quarter and an eighth of the tree. + // Collections down to a half, a quarter and an eighth of the graph. new_game(); stop_flag = false; search(root, {root.key}, limits, false); @@ -989,7 +1132,6 @@ void Searcher::self_test() { uci_io::send("info string verify (b) reroot " + std::string(fen) + ": " + std::to_string(count) + " nodes ok"); } - new_game(); uci_io::send("info string verify passed"); } diff --git a/src/mcts.h b/src/mcts.h index bf55c0b..d72ae5f 100644 --- a/src/mcts.h +++ b/src/mcts.h @@ -19,13 +19,28 @@ enum NodeState : u8 { TERMINAL_DRAW, }; +// The search is a graph (Monte-Carlo graph search, docs/mcgs-plan.md): one node +// per position, shared by every move order that reaches it. Q values follow +// KataGo's "Monte-Carlo Graph Search from First Principles": +// - an edge (n, a) to child c has its own visits N(n,a), how often PUCT at n +// chose a, and draws D(n,a), how many of those playouts ended in a draw of +// their path (repetition or the 50-move rule) right after a. Such draws +// belong to the path, never to a node; +// - the edge's value for the side to move at n is (N - D) / N * c.q, so a +// path draw counts 0; +// - a node has N(n) = base + sum of its edge visits, and its Q is recomputed +// from its children on every playout through it: +// q = (base * u - sum (N - D) * c.q) / N(n). `u` is the node's own +// evaluation (base 1), or the Q it had when collection took its edges +// (base = its visits then). + // A move out of a node. A node's edges sit next to each other in the edge -// arena, so the node only needs the index of the first one. The child node is -// created the first time search selects the edge. +// arena, so the node only needs the index of the first one. The edge is linked +// to its child node the first time search selects it. struct Edge { - u32 child = 0; // node index, 0 = no node yet - u32 visits = 0; // how often search chose this move here (equals the child's visits in a tree) - u32 draws = 0; // of those, playouts that ended in a draw of the path (unused while the search is a tree) + u32 child = 0; // node index, 0 = not linked yet + u32 visits = 0; // N(n,a): how often search chose this move here + u32 draws = 0; // D(n,a): of those, playouts that ended in a draw of the path after this move u16 move = 0; u16 policy = 0; // prior scaled to 0..65535 @@ -33,27 +48,27 @@ struct Edge { }; static_assert(sizeof(Edge) == 16); -// A position, created when search first reaches it. +// A position, created (and evaluated) when search first reaches it. struct Node { u64 key = 0; // Zobrist key of the position u32 first_edge = 0; // 0 = not expanded - u32 visits = 0; - float q = 0.0f; // running mean, from the view of the side that moved into the node - // `u` and `base` are set by garbage collection (the Q and visits a pruned - // node keeps) but not read yet. `check` is a second fingerprint of the - // position (see position_check). All three are for graph search. - float u = 0.0f; - u32 base = 0; + u32 visits = 0; // N(n) = base + the edges' visits + float q = 0.0f; // from the view of the side that moved into the node + float u = 0.0f; // the same view: own evaluation, or the Q kept by collection + u32 base = 0; // weight of u u8 num_edges = 0; + // Only facts of the position itself: checkmate, stalemate, insufficient material. u8 state = UNEXPANDED; - u16 check = 0; + u16 check = 0; // second fingerprint of the position (position_check) }; static_assert(sizeof(Node) == 32); // A 16-bit fingerprint of the position that does not depend on the Zobrist keys. u16 position_check(const Position& pos); -// Two arenas: nodes and edges. Index 0 of each is null. +// Two arenas, nodes and edges (index 0 of each is null), and a table from +// position to node. A position is found by its 64-bit key plus the 16-bit +// check, about 80 bits. class Tree { public: // Edges per node the arenas are sized for: the edge arena gets 128 of @@ -66,16 +81,24 @@ public: // 2-3x more collections in the endgames (which fill the node arena first). static constexpr size_t EDGES_PER_NODE = 8; + // Splits `bytes` between the node arena, the edge arena and the table. void resize_bytes(size_t bytes); + // Empties the graph. The caller then creates the root and sets it. void clear(); // A fresh node, or 0 when the node arena is full. u32 alloc_node(); // The index of `count` fresh edges, or 0 when the edge arena is full. u32 alloc_edges(u32 count); - // Makes `new_root` the root and packs its subtree to the front of the - // arenas; everything else is dropped. Returns the number of nodes kept. + void set_root(u32 idx) { root_ = idx; } + // The node of the position with this key and check, 0 when there is none. + u32 find(u64 key, u16 check) const; + // Enters a node, which must not be in the table yet, by its key. + void insert(u32 idx); + // Makes `new_root` the root and packs what is reachable from it to the + // front of the arenas; everything else is dropped. Returns the number of + // nodes kept. size_t reroot(u32 new_root); - // Frees memory when an arena is full: the least visited parts of the tree + // Frees memory when an arena is full: the least visited parts of the graph // are cut back to leaves until at most `keep_fraction` of each arena is in // use. Returns the number of nodes kept. size_t collect_garbage(double keep_fraction); @@ -92,23 +115,42 @@ public: size_t edges_used() const { return edges_used_; } size_t node_capacity() const { return nodes_.size(); } size_t edge_capacity() const { return edges_.size(); } + size_t table_entries() const { return table_entries_; } + size_t table_slots() const { return table_.size(); } + // The node a table slot points to (0 = empty) and the key half it holds. + u32 table_node(size_t slot) const { return table_[slot].node; } + u32 table_key_hi(size_t slot) const { return table_[slot].key_hi; } // How full the fuller arena is, per mille. int fill_permille() const { return int(std::max(nodes_used_ * 1000 / nodes_.size(), edges_used_ * 1000 / edges_.size())); } private: + // Open addressing with linear probing. The table has at least twice as + // many slots as the node arena has nodes, so it is never more than half + // full and needs no collection of its own. Nothing is deleted from it: + // after a collection or a reroot it is rebuilt from the surviving nodes. + struct Slot { + u32 key_hi = 0; // upper half of the key + u32 node = 0; // 0 = empty + }; + static_assert(sizeof(Slot) == 8); + std::vector nodes_; std::vector edges_; + std::vector table_; + size_t table_mask_ = 0; + size_t table_entries_ = 0; size_t nodes_used_ = 0; size_t edges_used_ = 0; - u32 root_ = 1; + u32 root_ = 0; // Keeps what is reachable from `new_root`, dropping the edges of every - // node with fewer than `min_visits` visits, and packs both arenas to the - // front in place. + // node with fewer than `min_visits` visits, packs both arenas to the + // front in place and rebuilds the table. size_t compact(u32 new_root, u32 min_visits); u32 prune_threshold(size_t node_target, size_t edge_target) const; + void rebuild_table(); }; // Butterfly history for MCTS (after Vine, aronpetkovski.com/blog/butterfly-history-mcts): @@ -208,8 +250,8 @@ public: Searcher(); void set_hash(size_t mb) { - // A 32nd of the memory goes to the value hash, the rest to the tree - // (split between its arenas by Tree::EDGES_PER_NODE). + // A 32nd of the memory goes to the value hash, the rest to the graph + // (its arenas, split by Tree::EDGES_PER_NODE, and its table). const size_t bytes = mb * 1024 * 1024; value_hash_.resize(bytes / 32 / ValueHash::ENTRY_BYTES); tree_.resize_bytes(bytes - bytes / 32); @@ -244,10 +286,14 @@ private: ValueHash value_hash_; std::vector history_; size_t root_history_size_ = 0; - // The nodes of a playout, from the root, and the edges between them - // (edge_path_[i] leads from path_[i] to path_[i + 1]). + // The nodes of a playout, from the root, and the edges it took + // (edge_path_[i] leaves path_[i]). A playout that ends in a draw of its + // path has one edge more than nodes before the draw. std::vector path_; std::vector edge_path_; + // Guards against a key collision linking positions into a loop that + // repetition detection cannot see. Real playouts end long before this. + static constexpr int MAX_PLAYOUT_DEPTH = 512; // The previous search, kept so its tree can be reused. bool tree_valid_ = false; @@ -276,21 +322,29 @@ private: static constexpr double GC_KEEP_FRACTION = 0.5; void playout(); - // First visit of a node: settles terminal states, otherwise evaluates. - float evaluate_leaf(u32 idx, const Position& pos, int depth); + // First visit of a position: a new node with one visit, entered into the + // table. Settles what the position itself decides (checkmate, stalemate, + // insufficient material except at the root), otherwise evaluates. + // `value` gets the result for the side to move. Returns 0 when the node + // arena is full. + u32 create_node(const Position& pos, bool is_root, float& value); // Second visit: creates the edges with their priors. False when the // arena is full (a collection is then scheduled). bool expand(u32 idx, const Position& pos); // The edge PUCT picks at node `idx`. u32 select_edge(u32 idx) const; + // A node's Q from its own value and its children's (see Edge). + void recompute_q(Node& node) const; bool is_repetition(const Position& pos) const; - // Finds the node for `root` in the previous tree and makes it the root. + // Finds the node for `root` in the previous graph and makes it the root. // Returns the number of nodes kept, 0 when nothing could be reused. size_t reuse_tree(const Position& root); - // Empties the tree, leaving an unexpanded root for `root`. + // True when the root node's edges are exactly the legal moves of `root`. + bool root_edges_valid(const Position& root) const; + // Empties the graph, leaving an evaluated, unexpanded root for `root`. void clear_tree(const Position& root); #ifdef RIGBY_VERIFY_TREE - // Checks the tree from root_pos_; `history` ends with the root's key. + // Checks the graph from root_pos_; `history` ends with the root's key. void verify_tree(const std::vector& history) const; #endif @@ -301,8 +355,15 @@ private: // The edge with the most visits at node `idx`, 0 when it has none. u32 best_edge(u32 idx) const; - // Q of an edge from the view of the side choosing it (0 when unvisited). - float edge_q(const Edge& e) const { return e.visits ? tree_.node(e.child).q : 0.0f; } + // Q of a visited edge from the view of the side choosing it: the child's + // Q, with draws of the path counted as 0. + float visited_edge_q(const Edge& e) const { + if (!e.draws) return tree_.node(e.child).q; + const u32 w = e.visits - e.draws; + return w ? float(w) / float(e.visits) * tree_.node(e.child).q : 0.0f; + } + // The same, 0 when the edge is unvisited. + float edge_q(const Edge& e) const { return e.visits ? visited_edge_q(e) : 0.0f; } void print_info() const; std::vector principal_variation() const; void draw_dashboard(bool done); -- 2.47.3 From 14f672a666f9500e9b6d5ef988c5171c040c480c Mon Sep 17 00:00:00 2001 From: rektdie Date: Mon, 16 Nov 2026 20:25:11 +0100 Subject: [PATCH 11/19] verify: checks (c) repetition leak and (d) table after GC and reroot (c) searches five positions with forced or frequent repetitions and 50-move draws (the knight shuffle in the game history, the perpetual-check bench position, KR v K at half-move 95, and two pawn endgames), checks every node state from its position alone (verify_tree), and requires the draws to show up as edge draw counts, the 50-move ones included. (d) reports the table against the surviving nodes after every forced collection and reroot of (b); verify_tree checks it in full. VERIFY builds only. Bench: 764208 (unchanged) Co-Authored-By: Claude Opus 5.5 --- src/mcts.cpp | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/src/mcts.cpp b/src/mcts.cpp index ffdd7db..2aed98c 100644 --- a/src/mcts.cpp +++ b/src/mcts.cpp @@ -1007,6 +1007,8 @@ void Searcher::self_test() { // (b) Garbage collection and rerooting keep everything they keep exactly. // A node is identified by its position's key, which is unique in the graph. + // (d) After each of them, verify_tree also checks the table against the + // surviving nodes. const auto snapshot = [&](u32 from) { std::map snap; std::vector seen(tree_.nodes_used(), 0); @@ -1105,6 +1107,8 @@ void Searcher::self_test() { verify_tree({root.key}); uci_io::send("info string verify (b) gc " + std::string(fen) + ": " + std::to_string(before.size()) + " -> " + std::to_string(count) + " nodes ok"); + uci_io::send("info string verify (d) table after gc: " + std::to_string(tree_.table_entries()) + + " entries for " + std::to_string(count) + " nodes ok"); } // Reroot two plies down the most visited line, as between two moves of a game. @@ -1131,7 +1135,74 @@ void Searcher::self_test() { verify_tree(history); uci_io::send("info string verify (b) reroot " + std::string(fen) + ": " + std::to_string(count) + " nodes ok"); + uci_io::send("info string verify (d) table after reroot: " + std::to_string(tree_.table_entries()) + + " entries for " + std::to_string(count) + " nodes ok"); } + + // (c) Draws of the path never leak into nodes: search positions where + // repetitions or the 50-move rule are forced or frequent. verify_tree (at + // the end of each search) recomputes every node's state from its position + // alone; here the draws must also show up on edges. + struct RepetitionCase { + const char* fen; + const char* moves; + bool fifty_move; // draws by the 50-move rule must appear + }; + static constexpr RepetitionCase REPETITION_CASES[] = { + {"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1", "g1f3 g8f6 f3g1 f6g8 g1f3 g8f6", false}, + {"6k1/6p1/8/6KQ/1r6/q2b4/8/8 w - - 0 32", "", false}, + {"8/8/8/4k3/8/8/2KR4/8 w - - 95 100", "", true}, + {"8/8/3k4/2p1p3/2P1P3/3K4/8/8 w - - 0 1", "", false}, + {"8/5pk1/6p1/7p/7P/6P1/5PK1/8 w - - 0 40", "", false}, + }; + for (const RepetitionCase& c : REPETITION_CASES) { + Position root; + if (!root.set_fen(c.fen)) self_test_failed(std::string("bad fen ") + c.fen); + std::vector history{root.key}; + std::istringstream moves(c.moves); + for (std::string uci; moves >> uci;) { + const Move m = root.parse_uci(uci); + if (!m) self_test_failed("bad move " + uci); + root.make_move(m); + history.push_back(root.key); + } + SearchLimits limits; + limits.nodes = 30000; + new_game(); + stop_flag = false; + search(root, history, limits, false); // ends with verify_tree(history) + + u64 draw_edges = 0, draw_visits = 0, fifty_edges = 0; + std::vector seen(tree_.nodes_used(), 0); + std::vector> stack{{tree_.root(), root}}; + seen[tree_.root()] = 1; + while (!stack.empty()) { + const auto [idx, pos] = stack.back(); + stack.pop_back(); + const Node& n = tree_.node(idx); + for (u32 i = 0; i < n.num_edges; i++) { + const Edge& e = tree_.edge(n.first_edge + i); + Position next = pos; + next.make_move(Move::from_raw(e.move)); + if (e.draws) { + draw_edges++; + draw_visits += e.draws; + // The clock of the first path that reached the node. + if (next.halfmove >= 100) fifty_edges++; + } + if (e.child && !seen[e.child]) { + seen[e.child] = 1; + stack.push_back({e.child, next}); + } + } + } + if (!draw_visits) self_test_failed(std::string("no draws of the path recorded on edges: ") + c.fen); + if (c.fifty_move && !fifty_edges) self_test_failed(std::string("no 50-move draws on edges: ") + c.fen); + uci_io::send("info string verify (c) " + std::string(c.fen) + (*c.moves ? " moves " : "") + c.moves + + ": " + std::to_string(draw_visits) + " draw visits on " + std::to_string(draw_edges) + + " edges (" + std::to_string(fifty_edges) + " at half-move 100+), node states ok"); + } + new_game(); uci_io::send("info string verify passed"); } -- 2.47.3 From 98fae488860c3a9577bace16c73a66d1abebdd52 Mon Sep 17 00:00:00 2001 From: rektdie Date: Mon, 16 Nov 2026 20:40:44 +0100 Subject: [PATCH 12/19] docs: step 3 (MCGS core) in mcgs-log: gates, time forfeits, measurements Bench: 764208 Co-Authored-By: Claude Opus 5.5 --- docs/mcgs-log.md | 241 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 241 insertions(+) diff --git a/docs/mcgs-log.md b/docs/mcgs-log.md index 3ad3e89..d0decfd 100644 --- a/docs/mcgs-log.md +++ b/docs/mcgs-log.md @@ -7,6 +7,7 @@ only from results the owner provides. | --- | --- | --- | --- | --- | --- | | 1 | `mcgs-stats` | `bec9871` | 663779 (normal and `STATS=1` builds) | none (never merged) | measurement only; the branch stays on its own | | 2 | `mcgs-step2-split` | `fb1b8a5` | 663779 (identical to main) | | | +| 3 | `mcgs-step3-core` | `14f672a` | 764208 | | | ## Step 1 measurements @@ -381,3 +382,243 @@ step 2 were run interleaved. `UHO_Lichess_4852_v1.epd`: link and outcome to be filled in. - LTC Non-Regression `[-5.00, 0.00]`, 40.0+0.40, Threads=1, Hash=256 (NPS drop > 3 %): link and outcome to be filled in. + +## Step 3: MCGS core (`mcgs-step3-core`) + +Code at `14f672a`, on top of `mcgs-step2-split` (`5424e1a`). Commits: + +- `6ec8769`: the MCGS core (search, key table, sizing, graph-safe GC + threshold, graph `verify_tree`, key-based check (b)); +- `14f672a`: checks (c) and (d) of the `verify` command (VERIFY builds only). + +**Bench: 764208** (step 2 and main: 663779). The bench changes for three reasons: + +- The tree becomes a graph: transpositions share nodes, so playouts run on + through existing nodes, and their depths and visited positions change. +- The root gets its own evaluation, and N = 1 + the edges' visits. +- Repetitions and the 50-move rule are judged on every playout instead of + once per node. + +What changed (plan 3.1–3.5 and 3.6.5): + +- **Key table.** Each slot is 8 bytes, `{key_hi, node}`, with linear probing. + The table is a power of two with at least 2× the node arena's slots. A hit + needs the full key and the 16-bit check. The table is rebuilt after every + collection and reroot. +- **Node creation.** `create_node` evaluates a position on its first visit + (N = base = 1, q = u). The root is created and evaluated through it. +- **Descent.** After `make_move`, repetition and the 50-move rule (mate + first) are judged before the lookup, and they are only ever counted in + `edge.draws`. An edge links to its child on first selection, to an + existing node when the table has one. `MAX_PLAYOUT_DEPTH` is 512. +- **Backprop.** For every path node: `edge.visits++` (and `draws++` for a + path draw), `node.visits++`, and q = (base·u − Σ (N−D)·c.q) / N, summed in + `double`. ValueHash is stored for every path node, with no `TERMINAL_DRAW` + test. The butterfly update is as before. +- **Edges everywhere.** Selection, root decisions, score, PV and dashboard + use edges, with draws counted as 0. The PV also stops after a repeated + position and at 64 plies. +- **Root check.** At search start, the root's edges are checked against its + legal moves. If they differ, the graph is cleared. +- **GC threshold.** It uses a visited bitmap and counts the root apart, so + the estimate stays an upper bound on a DAG. +- **Hash split.** Hash now covers the node arena, the edge arena (still 8 + edges per node) and the table. The table's power of two is rounded down or + up, whichever leaves more nodes. At Hash 64 that gives 353,894 nodes and + 2^20 slots (step 2: 406,323 nodes). + +Deviations and choices the plan does not cover: + +- **Full node arena.** If node allocation fails, the playout is dropped + without a trace: no visit is counted and no iteration is used. The graph is + then collected. The plan only says what happens when expansion fails + (value −n.q, the node's visit counted as a base visit, so q = u stays). +- **Depth limit.** At `MAX_PLAYOUT_DEPTH`, the node reached is not changed; + only the edge into it counts the visit. The recompute reads its q anyway. +- **Terminal nodes** count each visit in `base` as well, so N = base + Σ + edge visits holds for every node and VERIFY can check it everywhere. +- **Former roots.** `verify_tree` accepts a non-terminal node with + insufficient material at the root and at positions of the game history + (former roots). Insufficient material is never terminal at the root. +- **Arena split.** It stays at 8 edges per node, the step 2 value. In graph + searches the edge arena fills first: at the end of 5 s searches, + `hashfull` comes from the edge arena. Step 4 re-measures the split, as + planned. + +### Gates (owner's machine, 2026-11-16) + +- **Build:** normal and VERIFY builds, zero warnings. +- **Bench:** `764208`. +- **Perft:** + - `perftsuite`: all passed (590,175,385 nodes); + - `perftfile tests/fischer.epd 5`: 960 positions, 0 failed, + 17,614,927,759 nodes, 55 s. +- **VERIFY searches** (`go nodes 200000`), each ending with `tree verified` + and no abort: + - startpos; + - the transposition line; + - the history repetition (`g1f3 g8f6 f3g1 f6g8 g1f3 g8f6`); + - bench positions 11, 12, 15 and 16; + - `8/8/8/4k3/8/8/2KR4/8 w - - 95 100` (seldepth 5); + - the mate-in-1 FEN (still `g1f1`, as on main and step 2); + - the 960 start with `UCI_Chess960 true`. +- **Forced GC** (`go nodes 300000`), every collection verified: + - Hash 1: 190 collections (startpos) and 145 (960); + - Hash 2: 104 and 77. +- **Reuse sequence** (VERIFY build, `go nodes 50000`, best move plus the + second PV move, 10 moves), clean every time: + - Hash 64 (21k–69k positions reused per move); + - Hash 1 (24–42 collections per move); + - the 960 start at Hash 64. +- **`verify`**, all passed: + - (a) 96,434 plies, incremental key = FEN key. + - (b) Three forced collections (to 1/2, 1/4 and 1/8) and a reroot on 4 + positions: every survivor is identical by key, including edges and child + keys, and no pruned node has more visits than a kept one. + - (c) Five positions with forced or frequent repetitions and 50-move draws + (knight shuffle in the history, perpetual check, KR v K at half-move 95, + two pawn endgames). Every node state matches its position alone, and the + draws appear on edges: 30 to 29,077 draw visits per position. In the + KR v K position, 10,504 draw edges are at half-move 100+. + - (d) After every forced collection and reroot, the table has exactly one + entry per surviving node, and the table finds each node by its position. +- **Smoke:** + - `go nodes 1`, `go nodes 2` and `go depth 1` on the section 6 positions, + two no-move positions and a KB v K root: clean. + - 20 VERIFY self-play games at `nodes=20000`, Hash 16: all ended by mate, + repetition, the 50-move rule or insufficient material, with no abort. +- **Smoke, step 3 vs main: FAILED.** 100 games at 2+0.02, Hash 16, UHO book, + cutechess-ob, concurrency 10, while the VERIFY self-play (concurrency 10) + and the owner's own game were running. Step 3 lost **2 games on time** + (games 31 and 81, both as White, rook endgames at ply 180–181, half-move + clock about 70). There were no illegal moves, disconnects or aborts. See + the next section. +- **Control:** step 3 vs main and step 2 vs main, run at the same time, 100 + games each at concurrency 6. There were no time forfeits, but step 3 still + had 23 moves in 11 games that stopped at ≤ 64 playouts. Step 2 and main had + none. + +### Time forfeits: rerooting a graph is O(graph) + +Step 3 ended moves at 64 playouts in late endgames (the clock is checked every +64 playouts, and those moves were already past the hard limit). In both +forfeits, every step 3 move over the last 10–20 moves had 64 playouts in +about 28 ms. In the same games, main searched about 10,000 playouts per move. + +Cause, measured by replaying game 31 in one session (Hash 16, local +instrumented build that is not committed): + +- **Cost before the first playout.** With `go nodes 1` after each move, + step 3 averages 3.5 ms (max 14 ms), against 0.3 ms for main and step 2. +- **The reroot itself.** Over 179 reroots it took 3.3 ms on average and kept + 27,262 nodes on average: mark 1.4 ms, slide and remap 1.6 ms, table rebuild + 0.26 ms. The worst case was 14.5 ms with 65,081 nodes kept. +- **Why it keeps so much.** In a reversible endgame, almost the whole graph + stays reachable from the new root, because the old positions can be reached + again. A tree reroot keeps one subtree, so main's cost stays small. +- **Why the clock drains.** At 2+0.02 under heavy load, a fixed cost per move + above the 20 ms increment drains the clock. + +This is a gap in plan 3.6.6. "Reroot = mark/compact with T = 0" is O(nodes +kept), and on a graph that is close to O(graph) in endgames. As instructed, I +did not change the design. Options for the owner: + +- (a) Reroot by moving the root index only (unreachable parts go at the next + collection, and the table stays valid). This changes 3.6.6. +- (b) Make compaction cheaper (a forwarding array instead of `lower_bound`, + reused buffers). This is a constant factor only. +- (c) Count the setup cost in time management. + +The 8+0.08 STC has a 4× larger increment, but OpenBench workers also run +under load. + +### Measurements (local, owner playing a game at the same time: noisy) + +**Playouts/s at 5 s per bench position, Hash 64.** One round, the four +engines interleaved per position. Step 3 is run twice: the normal build and +the counter build. + +| pos | main | step 2 | step 3 | step 3 / main | +| ---: | ---: | ---: | ---: | ---: | +| 1 | 200,122 | 181,012 | 117,808 | 0.59 | +| 2 | 148,819 | 134,104 | 111,678 | 0.75 | +| 3 | 217,946 | 202,846 | 108,144 | 0.50 | +| 4 | 220,530 | 197,230 | 106,011 | 0.48 | +| 5 | 197,654 | 171,347 | 124,401 | 0.63 | +| 6 | 168,134 | 161,465 | 113,824 | 0.68 | +| 7 | 179,816 | 162,171 | 119,518 | 0.66 | +| 8 | 173,057 | 164,973 | 127,588 | 0.74 | +| 9 | 227,084 | 204,864 | 148,048 | 0.65 | +| 10 | 335,241 | 318,534 | 192,549 | 0.57 | +| 11 | 959,036 | 912,732 | 425,445 | 0.44 | +| 12 | 774,695 | 703,203 | 361,420 | 0.47 | +| 13 | 191,421 | 175,871 | 133,590 | 0.70 | +| 14 | 199,466 | 194,403 | 147,058 | 0.74 | +| 15 | 667,244 | 678,618 | 101,590 | 0.15 | +| 16 | 4,619,553 | 4,342,926 | 3,595,617 | 0.78 | +| all | **592,489** | **556,526** | **377,088** | **0.64** (0.68 vs step 2) | + +- `bench` nps, 5 alternating runs each (mean): main 2,996,116, step 2 + 2,974,460, step 3 2,572,979 (0.86× main). +- Playouts are longer, so playouts/s understates the positions searched. + The mean playout depth at 5 s is: + + | position | main | step 2 | step 3 | + | --- | ---: | ---: | ---: | + | startpos | 14 | 14 | 13 | + | bench 11 | 12 | 12 | 16 (seldepth 80) | + | bench 15, KR v K | 6 | 6 | 28 (seldepth 100) | + + With always-descend, a playout runs through existing nodes until it reaches + a new position, a repetition or the 50-move rule. In reversible endgames it + wanders through cycles. In bench 15, 30 % of playouts end in a repetition, + and the root score is 739 cp against main's 1,701. The plan leaves stopping + early to variant 5a. +- In the 2+0.02 games (heavy load), the median playouts per move was 4,480 + for step 3 against 8,256 for main. In the control match it was 5,312 + against 9,664, with step 2 at 9,024. + +**Rates** from the counter build (5 s, Hash 64, same run as above): + +| pos | playouts | mean depth | lookups | **hit %** | **path draw %** | of which 50-move % | new node % | GC | +| ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | +| 1 | 621,248 | 13.4 | 769,706 | 19.3 | 0.0 | 0 | 100.0 | 10 | +| 2 | 540,608 | 21.2 | 581,323 | 7.1 | 0.1 | 0 | 99.9 | 6 | +| 3 | 563,520 | 12.8 | 710,180 | 20.8 | 0.1 | 0 | 99.9 | 10 | +| 4 | 528,640 | 19.0 | 613,787 | 14.0 | 0.1 | 0 | 99.9 | 7 | +| 5 | 620,096 | 11.3 | 727,622 | 14.9 | 0.1 | 0 | 99.9 | 9 | +| 6 | 589,696 | 18.5 | 629,636 | 6.8 | 0.3 | 0 | 99.5 | 7 | +| 7 | 587,392 | 17.9 | 632,662 | 7.4 | 0.2 | 0 | 99.7 | 7 | +| 8 | 627,456 | 15.4 | 669,276 | 7.0 | 0.7 | 0 | 99.2 | 8 | +| 9 | 747,520 | 20.0 | 879,332 | 19.1 | 4.8 | 0 | 95.1 | 3 | +| 10 | 958,144 | 15.2 | 901,621 | 21.4 | 25.9 | 0 | 73.9 | 3 | +| 11 | 2,148,608 | 16.7 | 1,051,775 | 45.3 | 71.8 | 0 | 26.8 | 2 | +| 12 | 1,762,496 | 19.7 | 835,300 | 52.2 | 71.5 | 0 | 22.7 | 1 | +| 13 | 671,360 | 22.4 | 731,789 | 9.2 | 0.6 | 0 | 99.0 | 5 | +| 14 | 766,144 | 12.5 | 842,901 | 10.7 | 1.7 | 0 | 98.3 | 9 | +| 15 | 522,688 | 28.3 | 2,026,421 | 83.8 | 32.3 | 2.15 | 62.9 | 1 | +| 16 | 17,866,176 | 4.0 | 53,747 | 18.2 | 98.3 | 0 | 0.2 | 0 | +| all | 30,121,792 | 9.5 | 12,657,078 | **30.1** | **69.2** | 0.04 | 29.4 | 88 | + +- **Lookup.** A lookup is the table probe when an edge is first selected (no + child linked yet). A hit links the edge to an existing node. +- **Hit rate.** 30.1 % of lookups hit over all positions: 7–21 % in + middlegames, 45–52 % in the pawn endgames and 84 % in KR v K. +- **Path draws.** 69.2 % of playouts end in a path draw, almost all by + repetition. Without position 16 (perpetual check), the figure is 26.8 %. +- **Other endings.** Over all positions, 420,673 playouts ended at a terminal + node and 87 at a node that could not be expanded. One playout was dropped + because the node arena was full, and none reached the depth limit. +- **Edge arena.** Middlegames fill the edge arena first. At 8 edges per node, + `hashfull` reached 965 at 5 s from startpos, against 661 for main. + +### SPRT (owner) + +The plan recommends these tests, both with Threads=1 and +`UHO_Lichess_4852_v1.epd`: + +- STC 8.0+0.08, `[0.00, 5.00]`, Hash=64: link and outcome to be filled in. +- LTC 40.0+0.40, `[0.00, 5.00]`, Hash=256: link and outcome to be filled in. + +The smoke gate failed (see above). The owner should decide on the reroot cost +before starting either test. -- 2.47.3 From 62e5923254560d2b3dd6dc7d87ae7ffb5883787b Mon Sep 17 00:00:00 2001 From: rektdie Date: Mon, 16 Nov 2026 20:45:48 +0100 Subject: [PATCH 13/19] =?UTF-8?q?=EF=BB=BFdocs:=20step=203=20SPRT=20links?= =?UTF-8?q?=20(tests=205310=20STC,=205311=20LTC)=20in=20mcgs-log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bench: 764208 Co-Authored-By: Claude Opus 5.5 --- docs/mcgs-log.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/mcgs-log.md b/docs/mcgs-log.md index d0decfd..382c54b 100644 --- a/docs/mcgs-log.md +++ b/docs/mcgs-log.md @@ -7,7 +7,7 @@ only from results the owner provides. | --- | --- | --- | --- | --- | --- | | 1 | `mcgs-stats` | `bec9871` | 663779 (normal and `STATS=1` builds) | none (never merged) | measurement only; the branch stays on its own | | 2 | `mcgs-step2-split` | `fb1b8a5` | 663779 (identical to main) | | | -| 3 | `mcgs-step3-core` | `14f672a` | 764208 | | | +| 3 | `mcgs-step3-core` | `14f672a` | 764208 | [5310](https://bench.rektdie.com/test/5310/) STC 8.0+0.08 `[0.00, 5.00]`; [5311](https://bench.rektdie.com/test/5311/) LTC 40.0+0.40 `[0.00, 5.00]`; base `mcgs-step2-split` | | ## Step 1 measurements @@ -617,8 +617,11 @@ the counter build. The plan recommends these tests, both with Threads=1 and `UHO_Lichess_4852_v1.epd`: -- STC 8.0+0.08, `[0.00, 5.00]`, Hash=64: link and outcome to be filled in. -- LTC 40.0+0.40, `[0.00, 5.00]`, Hash=256: link and outcome to be filled in. +- STC 8.0+0.08, `[0.00, 5.00]`, Hash=64: + https://bench.rektdie.com/test/5310/, outcome to be filled in. +- LTC 40.0+0.40, `[0.00, 5.00]`, Hash=256: + https://bench.rektdie.com/test/5311/, outcome to be filled in. -The smoke gate failed (see above). The owner should decide on the reroot cost -before starting either test. +Both tests use base `mcgs-step2-split` (bench 663779), so they measure step 3 +alone. The owner started them knowing about the failed smoke gate; the reroot +is unchanged. -- 2.47.3 From f4b79a472cd90d4e2faec479491cecc4404e9e1a Mon Sep 17 00:00:00 2001 From: rektdie Date: Mon, 16 Nov 2026 20:59:36 +0100 Subject: [PATCH 14/19] docs: step 3 SPRT is test 5312 (STC vs main) in mcgs-log Bench: 764208 Co-Authored-By: Claude Opus 5.5 --- docs/mcgs-log.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/mcgs-log.md b/docs/mcgs-log.md index 382c54b..5546876 100644 --- a/docs/mcgs-log.md +++ b/docs/mcgs-log.md @@ -7,7 +7,7 @@ only from results the owner provides. | --- | --- | --- | --- | --- | --- | | 1 | `mcgs-stats` | `bec9871` | 663779 (normal and `STATS=1` builds) | none (never merged) | measurement only; the branch stays on its own | | 2 | `mcgs-step2-split` | `fb1b8a5` | 663779 (identical to main) | | | -| 3 | `mcgs-step3-core` | `14f672a` | 764208 | [5310](https://bench.rektdie.com/test/5310/) STC 8.0+0.08 `[0.00, 5.00]`; [5311](https://bench.rektdie.com/test/5311/) LTC 40.0+0.40 `[0.00, 5.00]`; base `mcgs-step2-split` | | +| 3 | `mcgs-step3-core` | `14f672a` | 764208 | [5312](https://bench.rektdie.com/test/5312/) STC 8.0+0.08 `[0.00, 5.00]`, base `main` | | ## Step 1 measurements @@ -617,11 +617,10 @@ the counter build. The plan recommends these tests, both with Threads=1 and `UHO_Lichess_4852_v1.epd`: -- STC 8.0+0.08, `[0.00, 5.00]`, Hash=64: - https://bench.rektdie.com/test/5310/, outcome to be filled in. -- LTC 40.0+0.40, `[0.00, 5.00]`, Hash=256: - https://bench.rektdie.com/test/5311/, outcome to be filled in. +- STC 8.0+0.08, `[0.00, 5.00]`, Threads=1, Hash=64, base `main` (bench + 663779): https://bench.rektdie.com/test/5312/, outcome to be filled in. -Both tests use base `mcgs-step2-split` (bench 663779), so they measure step 3 -alone. The owner started them knowing about the failed smoke gate; the reroot -is unchanged. +The owner chose a single STC test against `main`, so it measures steps 2 and +3 together. Tests 5310 (STC) and 5311 (LTC) against `mcgs-step2-split` were +deleted soon after they started. The owner started the test knowing about the +failed smoke gate; the reroot is unchanged. -- 2.47.3 From d38f0b133a7935c2762ff150140574f445c19709 Mon Sep 17 00:00:00 2001 From: rektdie Date: Mon, 16 Nov 2026 21:19:17 +0100 Subject: [PATCH 15/19] 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 --- src/mcts.cpp | 56 ++++++++++++++++++++++++++++++++++++---------------- src/mcts.h | 12 ++++++----- 2 files changed, 46 insertions(+), 22 deletions(-) diff --git a/src/mcts.cpp b/src/mcts.cpp index 2aed98c..d28c69d 100644 --- a/src/mcts.cpp +++ b/src/mcts.cpp @@ -106,8 +106,13 @@ u32 Tree::alloc_edges(u32 count) { } size_t Tree::reroot(u32 new_root) { - if (new_root == root_) return nodes_used_ - 1; - return compact(new_root, 0); + // Only the root moves. Packing what stays reachable would cost O(graph) on + // every move, because in a reversible endgame almost the whole graph stays + // reachable from the new root. Nodes that are no longer reachable keep + // their memory and their table entries (search may link to them again) + // until the next collection, which keeps only what the root reaches. + root_ = new_root; + return nodes_used_ - 1; } size_t Tree::collect_garbage(double keep_fraction) { @@ -406,9 +411,12 @@ size_t Searcher::reuse_tree(const Position& root) { // history `history` (ending with the root's key). Each node is checked once, // with the position of the first path that reaches it (positions do not // depend on the path, apart from the clocks): -// - every node is reachable, and the arenas hold nothing else; +// - right after a collection every node is reachable, and the arenas hold +// nothing else; at other times a reroot may have left nodes the root no +// longer reaches (they wait for the next collection); // - a node's key and check match its position, and the table finds it there; -// the table has one entry per node and nothing else; +// the table has one entry per node in the arena, reachable or not, and +// nothing else; // - its state is what the position itself decides: checkmate, stalemate or // insufficient material (not at the root, nor at an earlier root, i.e. a // position of the game history). Repetitions and the 50-move rule never @@ -418,7 +426,7 @@ size_t Searcher::reuse_tree(const Position& root) { // a visit that was not a draw; // - N = base + the edges' visits; a node without edges has q = u; // - Q and u are finite and in [-1, 1]. -void Searcher::verify_tree(const std::vector& history) const { +void Searcher::verify_tree(const std::vector& history, bool collected) const { const auto fail = [&](u32 idx, const Position& pos, const std::string& what) { const Node& n = tree_.node(idx); std::cerr << "GRAPH CORRUPT at node " << idx << " (" << pos.fen() << "): " << what << " visits=" << n.visits @@ -493,10 +501,11 @@ void Searcher::verify_tree(const std::vector& history) const { fail(idx, pos, "visits != base + edge visits " + std::to_string(edge_visits)); } - if (nodes != tree_.nodes_used() - 1 || edges != tree_.edges_used() - 1) + const u64 all_nodes = tree_.nodes_used() - 1, all_edges = tree_.edges_used() - 1; + if (collected ? nodes != all_nodes || edges != all_edges : nodes > all_nodes || edges > all_edges) fail(root, root_pos_, "unreachable nodes or edges: reached " + std::to_string(nodes) + " nodes, " + std::to_string(edges) + - " edges"); + " edges of " + std::to_string(all_nodes) + " and " + std::to_string(all_edges)); // The table: one entry per node, each under its node's key. size_t entries = 0; @@ -507,12 +516,13 @@ void Searcher::verify_tree(const std::vector& history) const { if (n >= tree_.nodes_used() || tree_.table_key_hi(s) != u32(tree_.node(n).key >> 32)) fail(root, root_pos_, "table slot " + std::to_string(s) + " points to a wrong node"); } - if (entries != nodes || tree_.table_entries() != nodes) + if (entries != all_nodes || tree_.table_entries() != all_nodes) fail(root, root_pos_, - "table has " + std::to_string(entries) + " entries for " + std::to_string(nodes) + " nodes"); + "table has " + std::to_string(entries) + " entries for " + std::to_string(all_nodes) + " nodes"); uci_io::send("info string tree verified: " + std::to_string(nodes) + " nodes, " + std::to_string(edges) + - " edges, " + std::to_string(entries) + " table entries"); + " edges reachable, " + std::to_string(all_nodes) + " nodes in the arena, " + + std::to_string(entries) + " table entries"); } #endif @@ -910,7 +920,8 @@ SearchResult Searcher::search(const Position& root, const std::vector& hist gc_pending_ = false; gc_runs_++; #ifdef RIGBY_VERIFY_TREE - verify_tree(std::vector(history_.begin(), history_.begin() + std::ptrdiff_t(root_history_size_))); + verify_tree(std::vector(history_.begin(), history_.begin() + std::ptrdiff_t(root_history_size_)), + true); #endif } if (print && (iterations_ & info_mask) == 0) { @@ -1104,7 +1115,7 @@ void Searcher::self_test() { const size_t count = compare(before, true, pruned_max, kept_min); if (count != tree_.nodes_used() - 1) self_test_failed("node count differs after collection"); if (pruned_max >= kept_min) self_test_failed("pruned a node with more visits than one kept"); - verify_tree({root.key}); + verify_tree({root.key}, true); uci_io::send("info string verify (b) gc " + std::string(fen) + ": " + std::to_string(before.size()) + " -> " + std::to_string(count) + " nodes ok"); uci_io::send("info string verify (d) table after gc: " + std::to_string(tree_.table_entries()) + @@ -1127,16 +1138,27 @@ void Searcher::self_test() { } if (idx == tree_.root() || tree_.node(idx).state != EXPANDED) self_test_failed("no node to reroot to"); const auto before = snapshot(idx); + const size_t nodes_before = tree_.nodes_used(), edges_before = tree_.edges_used(); tree_.reroot(idx); + // A reroot only moves the root: everything stays where it was. u32 pruned_max, kept_min; const size_t count = compare(before, false, pruned_max, kept_min); - if (count != before.size() || count != tree_.nodes_used() - 1) self_test_failed("reroot lost nodes"); + if (count != before.size() || tree_.nodes_used() != nodes_before || tree_.edges_used() != edges_before) + self_test_failed("reroot changed the graph"); root_pos_ = pos; verify_tree(history); - uci_io::send("info string verify (b) reroot " + std::string(fen) + ": " + std::to_string(count) + - " nodes ok"); - uci_io::send("info string verify (d) table after reroot: " + std::to_string(tree_.table_entries()) + - " entries for " + std::to_string(count) + " nodes ok"); + // The next collection (with room for everything) keeps exactly what the + // new root reaches, unchanged. + tree_.collect_garbage(tree_.node_capacity(), tree_.edge_capacity()); + const size_t kept = compare(before, false, pruned_max, kept_min); + if (kept != before.size() || kept != tree_.nodes_used() - 1) + self_test_failed("collection after a reroot kept the wrong nodes"); + verify_tree(history, true); + uci_io::send("info string verify (b) reroot " + std::string(fen) + ": " + std::to_string(nodes_before - 1) + + " nodes, " + std::to_string(count) + " reachable from the new root, collected to " + + std::to_string(kept) + " ok"); + uci_io::send("info string verify (d) table after reroot and collection: " + + std::to_string(tree_.table_entries()) + " entries for " + std::to_string(kept) + " nodes ok"); } // (c) Draws of the path never leak into nodes: search positions where diff --git a/src/mcts.h b/src/mcts.h index d72ae5f..a619c20 100644 --- a/src/mcts.h +++ b/src/mcts.h @@ -94,9 +94,9 @@ public: u32 find(u64 key, u16 check) const; // Enters a node, which must not be in the table yet, by its key. void insert(u32 idx); - // Makes `new_root` the root and packs what is reachable from it to the - // front of the arenas; everything else is dropped. Returns the number of - // nodes kept. + // Makes `new_root` the root. Nothing is moved or dropped: what the new + // root no longer reaches goes at the next collection. Returns the number + // of nodes in the graph. size_t reroot(u32 new_root); // Frees memory when an arena is full: the least visited parts of the graph // are cut back to leaves until at most `keep_fraction` of each arena is in @@ -337,7 +337,8 @@ private: void recompute_q(Node& node) const; bool is_repetition(const Position& pos) const; // Finds the node for `root` in the previous graph and makes it the root. - // Returns the number of nodes kept, 0 when nothing could be reused. + // Returns the number of nodes in the graph (some may no longer be + // reachable), 0 when nothing could be reused. size_t reuse_tree(const Position& root); // True when the root node's edges are exactly the legal moves of `root`. bool root_edges_valid(const Position& root) const; @@ -345,7 +346,8 @@ private: void clear_tree(const Position& root); #ifdef RIGBY_VERIFY_TREE // Checks the graph from root_pos_; `history` ends with the root's key. - void verify_tree(const std::vector& history) const; + // `collected`: right after a collection, when every node must be reachable. + void verify_tree(const std::vector& history, bool collected = false) const; #endif void compute_time_limit(const SearchLimits& limits); -- 2.47.3 From 95e49098ec55ebc6f17c52300adfe2f0fc575754 Mon Sep 17 00:00:00 2001 From: rektdie Date: Mon, 16 Nov 2026 21:20:26 +0100 Subject: [PATCH 16/19] docs: 5312 result and step 3b (reroot, test 5313) in mcgs-log Bench: 764208 Co-Authored-By: Claude Opus 5.5 --- docs/mcgs-log.md | 68 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 2 deletions(-) diff --git a/docs/mcgs-log.md b/docs/mcgs-log.md index 5546876..a9afee3 100644 --- a/docs/mcgs-log.md +++ b/docs/mcgs-log.md @@ -7,7 +7,8 @@ only from results the owner provides. | --- | --- | --- | --- | --- | --- | | 1 | `mcgs-stats` | `bec9871` | 663779 (normal and `STATS=1` builds) | none (never merged) | measurement only; the branch stays on its own | | 2 | `mcgs-step2-split` | `fb1b8a5` | 663779 (identical to main) | | | -| 3 | `mcgs-step3-core` | `14f672a` | 764208 | [5312](https://bench.rektdie.com/test/5312/) STC 8.0+0.08 `[0.00, 5.00]`, base `main` | | +| 3 | `mcgs-step3-core` | `14f672a` | 764208 | [5312](https://bench.rektdie.com/test/5312/) STC 8.0+0.08 `[0.00, 5.00]`, base `main` | failed: LLR −3.19, 4758 games, 106 lost on time | +| 3b | `mcgs-step3-reroot` | `d38f0b1` | 764208 | [5313](https://bench.rektdie.com/test/5313/) STC 8.0+0.08 `[0.00, 5.00]`, base `main` | | ## Step 1 measurements @@ -618,9 +619,72 @@ The plan recommends these tests, both with Threads=1 and `UHO_Lichess_4852_v1.epd`: - STC 8.0+0.08, `[0.00, 5.00]`, Threads=1, Hash=64, base `main` (bench - 663779): https://bench.rektdie.com/test/5312/, outcome to be filled in. + 663779): https://bench.rektdie.com/test/5312/. Result as shown on the test + page: + + ``` + Elo | -8.91 +- 6.44 (95%) + SPRT | 8.0+0.08s Threads=1 Hash=64MB + LLR | -3.19 (-2.94, 2.94) [0.00, 5.00] + Games | N: 4758 W: 1504 L: 1626 D: 1628 + ``` + + The workers report 106 games lost on time (18 + 88). The earlier Rigby STC + test 5308 lost none in 1618 games. The owner chose a single STC test against `main`, so it measures steps 2 and 3 together. Tests 5310 (STC) and 5311 (LTC) against `mcgs-step2-split` were deleted soon after they started. The owner started the test knowing about the failed smoke gate; the reroot is unchanged. + +## Step 3b: reroot moves only the root (`mcgs-step3-reroot`) + +Code at `d38f0b1`, on top of `mcgs-step3-core` (`f4b79a4`). This deviates from +plan 3.6.6, on the owner's decision after the time forfeits above. + +**Bench: 764208**, unchanged, because bench never reuses a graph. + +What changed: + +- `Tree::reroot` only sets the root index. It no longer compacts. +- Nodes the new root no longer reaches keep their memory and their table + entries until the next collection. Search may link to them again in the + meantime. The collection keeps only what the root reaches. +- `info string reused N` now counts every node in the graph, reachable or + not. +- **VERIFY:** + - `verify_tree` requires full reachability only right after a collection. + The table must always hold every node in the arena. + - Check (b) now verifies two things: a reroot changes nothing, and the next + collection keeps exactly the nodes the new root reaches, unchanged. + +Gates (owner's machine, 2026-11-16): + +- Zero warnings. Bench 764208. +- `verify` (a)–(d) passed. The reroot check reported, for example, 10,803 + nodes in the pawn endgame, with 10,802 reachable from the new root and + 10,802 kept by the collection. +- The VERIFY searches of section 6 all passed, including forced GC: Hash 1 + gave 190 and 145 collections, Hash 2 gave 104 and 77. +- The reuse sequence passed at Hash 64, at Hash 1 and from the 960 start. +- The `go nodes 1/2` and `go depth 1` smoke positions passed. +- Perft was not re-run, because move generation is untouched. +- No local games: the owner asked for the SPRT directly. + +Replay of the 2+0.02 game that step 3 lost on time (game 31, Hash 16), measuring the time +before the first playout (`go nodes 1` after each move, 90 moves). This is a +local measurement: + +| | mean | max | +| --- | ---: | ---: | +| main | 0.2 ms | 1 ms | +| step 3 | 3.5 ms | 13 ms | +| step 3b | 0 ms | 0 ms | + +At `go movetime 40` in the same replay, mean playouts per move were: main +12,083, step 3 5,047, step 3b 5,899. + +### SPRT (owner) + +- STC 8.0+0.08, `[0.00, 5.00]`, Threads=1, Hash=64, base `main` (bench + 663779): https://bench.rektdie.com/test/5313/, outcome to be filled in. -- 2.47.3 From faa0b4700a254180e973f2111a07e4fbe748e4a6 Mon Sep 17 00:00:00 2001 From: rektdie Date: Mon, 16 Nov 2026 21:44:28 +0100 Subject: [PATCH 17/19] docs: 5313 passed; six MCGS variant tests (5314-5319) in mcgs-log Bench: 764208 Co-Authored-By: Claude Opus 5.5 --- docs/mcgs-log.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/docs/mcgs-log.md b/docs/mcgs-log.md index a9afee3..4dfd0da 100644 --- a/docs/mcgs-log.md +++ b/docs/mcgs-log.md @@ -8,7 +8,13 @@ only from results the owner provides. | 1 | `mcgs-stats` | `bec9871` | 663779 (normal and `STATS=1` builds) | none (never merged) | measurement only; the branch stays on its own | | 2 | `mcgs-step2-split` | `fb1b8a5` | 663779 (identical to main) | | | | 3 | `mcgs-step3-core` | `14f672a` | 764208 | [5312](https://bench.rektdie.com/test/5312/) STC 8.0+0.08 `[0.00, 5.00]`, base `main` | failed: LLR −3.19, 4758 games, 106 lost on time | -| 3b | `mcgs-step3-reroot` | `d38f0b1` | 764208 | [5313](https://bench.rektdie.com/test/5313/) STC 8.0+0.08 `[0.00, 5.00]`, base `main` | | +| 3b | `mcgs-step3-reroot` | `d38f0b1` | 764208 | [5313](https://bench.rektdie.com/test/5313/) STC 8.0+0.08 `[0.00, 5.00]`, base `main` | passed: LLR 3.09, 4600 games, 0 lost on time | +| 5 | `mcgs-v-arena12` | `0a9bb40` | 764208 | [5314](https://bench.rektdie.com/test/5314/) STC `[0.00, 5.00]`, base `mcgs-step3-reroot` | | +| 5b | `mcgs-v-edgeq` | `e7f2bfb` | 769193 | [5315](https://bench.rektdie.com/test/5315/) STC `[0.00, 5.00]`, base `mcgs-step3-reroot` | | +| 5a | `mcgs-v-stop` | `59d5af5` | 609350 | [5316](https://bench.rektdie.com/test/5316/) STC `[0.00, 5.00]`, base `mcgs-step3-reroot` | | +| 5 | `mcgs-v-pathrep` | `b7bfb0b` | 755448 | [5317](https://bench.rektdie.com/test/5317/) STC `[0.00, 5.00]`, base `mcgs-step3-reroot` | | +| 5c | `mcgs-v-novaluehash` | `9e7c3ef` | 765326 | [5318](https://bench.rektdie.com/test/5318/) Non-Regression STC `[-5.00, 0.00]`, base `mcgs-step3-reroot` | | +| 4 | `mcgs-v-reconcile` | `79fd017` | 764208 | [5319](https://bench.rektdie.com/test/5319/) STC `[0.00, 5.00]`, base `mcgs-step3-reroot` | | ## Step 1 measurements @@ -687,4 +693,50 @@ At `go movetime 40` in the same replay, mean playouts per move were: main ### SPRT (owner) - STC 8.0+0.08, `[0.00, 5.00]`, Threads=1, Hash=64, base `main` (bench - 663779): https://bench.rektdie.com/test/5313/, outcome to be filled in. + 663779): https://bench.rektdie.com/test/5313/. Result as shown on the test + page (0 games lost on time): + + ``` + Elo | 12.24 +- 6.54 (95%) + SPRT | 8.0+0.08s Threads=1 Hash=64MB + LLR | 3.09 (-2.94, 2.94) [0.00, 5.00] + Games | N: 4600 W: 1533 L: 1371 D: 1696 + ``` + + This measures steps 2, 3 and 3b together against `main`. It is not merged. + +## Variants on top of step 3b (one branch and one SPRT each) + +Each branch is cut from `mcgs-step3-reroot` (`95e4909`) and tested against it +at STC 8.0+0.08, Threads=1, Hash=64, `UHO_Lichess_4852_v1.epd`, so a result +points at exactly one change. All passed the same gates before their test: +zero warnings, `verify` (a)–(d), the VERIFY searches of 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 smoke positions. There were no local games. + +| branch | change | bench | test | +| --- | --- | ---: | --- | +| `mcgs-v-arena12` | arenas sized for 12 edges per node instead of 8 | 764208 (unchanged, no GC in bench) | [5314](https://bench.rektdie.com/test/5314/) `[0.00, 5.00]` | +| `mcgs-v-edgeq` | 5b: each edge caches its child's Q; selection and recompute read only the edges (20-byte edge, no running sum) | 769193 | [5315](https://bench.rektdie.com/test/5315/) `[0.00, 5.00]` | +| `mcgs-v-stop` | 5a: a playout stops at a child with more visits than its edge | 609350 | [5316](https://bench.rektdie.com/test/5316/) `[0.00, 5.00]` | +| `mcgs-v-pathrep` | selection scores Q = 0 for an edge whose child repeats the current path or the game | 755448 | [5317](https://bench.rektdie.com/test/5317/) `[0.00, 5.00]` | +| `mcgs-v-novaluehash` | 5c: no value hash, all Hash to the graph | 765326 | [5318](https://bench.rektdie.com/test/5318/) Non-Regression `[-5.00, 0.00]` | +| `mcgs-v-reconcile` | 3.6.7: after reuse each root edge is all draws or none | 764208 (unchanged, no reuse in bench) | [5319](https://bench.rektdie.com/test/5319/) `[0.00, 5.00]` | + +Notes: + +- **Arena split.** Collections over the 16 bench positions at 5 s and + Hash 64 (local, four builds running at once, so noisy): 8 edges per node + gave 67, 12 gave 53, 16 gave 51 and 20 gave 57. With 16, more collections + move into the endgames. +- **Edge-Q cache.** Root decisions still read the children's current Q. + The VERIFY build checks each cached Q (finite, in [-1, 1], 0 without a + child), and check (b) compares the cached Q too. +- **Stop rule.** The depth limit now ends a playout the same way the stop + rule does. +- **Reconciliation.** In reuse sequences from KR v K and two pawn endgames, + 1–8 root edges were reconciled on most moves. The VERIFY build checks + after every reuse, collection and search that every visited root edge is + all draws exactly when its move draws. + +Outcomes are to be filled in. -- 2.47.3 From e24145d0e59c5b434759e3b4d7dead3c6b6a3024 Mon Sep 17 00:00:00 2001 From: rektdie Date: Mon, 16 Nov 2026 23:15:35 +0100 Subject: [PATCH 18/19] docs: 5316 and 5318 passed, 5317 failed in mcgs-log Also re-encodes two lines that were written as cp1252. Co-Authored-By: Claude Opus 5.5 --- docs/mcgs-log.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/mcgs-log.md b/docs/mcgs-log.md index 4dfd0da..8edbb73 100644 --- a/docs/mcgs-log.md +++ b/docs/mcgs-log.md @@ -11,9 +11,9 @@ only from results the owner provides. | 3b | `mcgs-step3-reroot` | `d38f0b1` | 764208 | [5313](https://bench.rektdie.com/test/5313/) STC 8.0+0.08 `[0.00, 5.00]`, base `main` | passed: LLR 3.09, 4600 games, 0 lost on time | | 5 | `mcgs-v-arena12` | `0a9bb40` | 764208 | [5314](https://bench.rektdie.com/test/5314/) STC `[0.00, 5.00]`, base `mcgs-step3-reroot` | | | 5b | `mcgs-v-edgeq` | `e7f2bfb` | 769193 | [5315](https://bench.rektdie.com/test/5315/) STC `[0.00, 5.00]`, base `mcgs-step3-reroot` | | -| 5a | `mcgs-v-stop` | `59d5af5` | 609350 | [5316](https://bench.rektdie.com/test/5316/) STC `[0.00, 5.00]`, base `mcgs-step3-reroot` | | -| 5 | `mcgs-v-pathrep` | `b7bfb0b` | 755448 | [5317](https://bench.rektdie.com/test/5317/) STC `[0.00, 5.00]`, base `mcgs-step3-reroot` | | -| 5c | `mcgs-v-novaluehash` | `9e7c3ef` | 765326 | [5318](https://bench.rektdie.com/test/5318/) Non-Regression STC `[-5.00, 0.00]`, base `mcgs-step3-reroot` | | +| 5a | `mcgs-v-stop` | `59d5af5` | 609350 | [5316](https://bench.rektdie.com/test/5316/) STC `[0.00, 5.00]`, base `mcgs-step3-reroot` | passed: Elo +12.35 ± 6.40, LLR 3.31, 4898 games | +| 5 | `mcgs-v-pathrep` | `b7bfb0b` | 755448 | [5317](https://bench.rektdie.com/test/5317/) STC `[0.00, 5.00]`, base `mcgs-step3-reroot` | failed: Elo −2.06 ± 3.73, LLR −3.12, 12956 games | +| 5c | `mcgs-v-novaluehash` | `9e7c3ef` | 765326 | [5318](https://bench.rektdie.com/test/5318/) Non-Regression STC `[-5.00, 0.00]`, base `mcgs-step3-reroot` | passed: Elo +13.59 ± 7.51, LLR 3.16, 3120 games | | 4 | `mcgs-v-reconcile` | `79fd017` | 764208 | [5319](https://bench.rektdie.com/test/5319/) STC `[0.00, 5.00]`, base `mcgs-step3-reroot` | | ## Step 1 measurements @@ -710,18 +710,18 @@ At `go movetime 40` in the same replay, mean playouts per move were: main Each branch is cut from `mcgs-step3-reroot` (`95e4909`) and tested against it at STC 8.0+0.08, Threads=1, Hash=64, `UHO_Lichess_4852_v1.epd`, so a result points at exactly one change. All passed the same gates before their test: -zero warnings, `verify` (a)–(d), the VERIFY searches of section 6 with forced +zero warnings, `verify` (a)–(d), the VERIFY searches of 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 smoke positions. There were no local games. -| branch | change | bench | test | -| --- | --- | ---: | --- | -| `mcgs-v-arena12` | arenas sized for 12 edges per node instead of 8 | 764208 (unchanged, no GC in bench) | [5314](https://bench.rektdie.com/test/5314/) `[0.00, 5.00]` | -| `mcgs-v-edgeq` | 5b: each edge caches its child's Q; selection and recompute read only the edges (20-byte edge, no running sum) | 769193 | [5315](https://bench.rektdie.com/test/5315/) `[0.00, 5.00]` | -| `mcgs-v-stop` | 5a: a playout stops at a child with more visits than its edge | 609350 | [5316](https://bench.rektdie.com/test/5316/) `[0.00, 5.00]` | -| `mcgs-v-pathrep` | selection scores Q = 0 for an edge whose child repeats the current path or the game | 755448 | [5317](https://bench.rektdie.com/test/5317/) `[0.00, 5.00]` | -| `mcgs-v-novaluehash` | 5c: no value hash, all Hash to the graph | 765326 | [5318](https://bench.rektdie.com/test/5318/) Non-Regression `[-5.00, 0.00]` | -| `mcgs-v-reconcile` | 3.6.7: after reuse each root edge is all draws or none | 764208 (unchanged, no reuse in bench) | [5319](https://bench.rektdie.com/test/5319/) `[0.00, 5.00]` | +| branch | change | bench | test | result | +| --- | --- | ---: | --- | --- | +| `mcgs-v-arena12` | arenas sized for 12 edges per node instead of 8 | 764208 (unchanged, no GC in bench) | [5314](https://bench.rektdie.com/test/5314/) `[0.00, 5.00]` | | +| `mcgs-v-edgeq` | 5b: each edge caches its child's Q; selection and recompute read only the edges (20-byte edge, no running sum) | 769193 | [5315](https://bench.rektdie.com/test/5315/) `[0.00, 5.00]` | | +| `mcgs-v-stop` | 5a: a playout stops at a child with more visits than its edge | 609350 | [5316](https://bench.rektdie.com/test/5316/) `[0.00, 5.00]` | passed | +| `mcgs-v-pathrep` | selection scores Q = 0 for an edge whose child repeats the current path or the game | 755448 | [5317](https://bench.rektdie.com/test/5317/) `[0.00, 5.00]` | failed | +| `mcgs-v-novaluehash` | 5c: no value hash, all Hash to the graph | 765326 | [5318](https://bench.rektdie.com/test/5318/) Non-Regression `[-5.00, 0.00]` | passed | +| `mcgs-v-reconcile` | 3.6.7: after reuse each root edge is all draws or none | 764208 (unchanged, no reuse in bench) | [5319](https://bench.rektdie.com/test/5319/) `[0.00, 5.00]` | | Notes: @@ -735,7 +735,7 @@ Notes: - **Stop rule.** The depth limit now ends a playout the same way the stop rule does. - **Reconciliation.** In reuse sequences from KR v K and two pawn endgames, - 1–8 root edges were reconciled on most moves. The VERIFY build checks + 1–8 root edges were reconciled on most moves. The VERIFY build checks after every reuse, collection and search that every visited root edge is all draws exactly when its move draws. -- 2.47.3 From 6e807b5565dba93a3c9ac8714870856f4ac9d773 Mon Sep 17 00:00:00 2001 From: rektdie Date: Mon, 16 Nov 2026 23:17:59 +0100 Subject: [PATCH 19/19] docs: 5314, 5315 and 5319 stopped unfinished in mcgs-log Co-Authored-By: Claude Opus 5.5 --- docs/mcgs-log.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/mcgs-log.md b/docs/mcgs-log.md index 8edbb73..d44d317 100644 --- a/docs/mcgs-log.md +++ b/docs/mcgs-log.md @@ -9,12 +9,12 @@ only from results the owner provides. | 2 | `mcgs-step2-split` | `fb1b8a5` | 663779 (identical to main) | | | | 3 | `mcgs-step3-core` | `14f672a` | 764208 | [5312](https://bench.rektdie.com/test/5312/) STC 8.0+0.08 `[0.00, 5.00]`, base `main` | failed: LLR −3.19, 4758 games, 106 lost on time | | 3b | `mcgs-step3-reroot` | `d38f0b1` | 764208 | [5313](https://bench.rektdie.com/test/5313/) STC 8.0+0.08 `[0.00, 5.00]`, base `main` | passed: LLR 3.09, 4600 games, 0 lost on time | -| 5 | `mcgs-v-arena12` | `0a9bb40` | 764208 | [5314](https://bench.rektdie.com/test/5314/) STC `[0.00, 5.00]`, base `mcgs-step3-reroot` | | -| 5b | `mcgs-v-edgeq` | `e7f2bfb` | 769193 | [5315](https://bench.rektdie.com/test/5315/) STC `[0.00, 5.00]`, base `mcgs-step3-reroot` | | +| 5 | `mcgs-v-arena12` | `0a9bb40` | 764208 | [5314](https://bench.rektdie.com/test/5314/) STC `[0.00, 5.00]`, base `mcgs-step3-reroot` | stopped unfinished: Elo −0.99 ± 3.78, LLR −2.09, 12288 games | +| 5b | `mcgs-v-edgeq` | `e7f2bfb` | 769193 | [5315](https://bench.rektdie.com/test/5315/) STC `[0.00, 5.00]`, base `mcgs-step3-reroot` | stopped unfinished: Elo +1.10 ± 3.32, LLR −0.52, 16676 games | | 5a | `mcgs-v-stop` | `59d5af5` | 609350 | [5316](https://bench.rektdie.com/test/5316/) STC `[0.00, 5.00]`, base `mcgs-step3-reroot` | passed: Elo +12.35 ± 6.40, LLR 3.31, 4898 games | | 5 | `mcgs-v-pathrep` | `b7bfb0b` | 755448 | [5317](https://bench.rektdie.com/test/5317/) STC `[0.00, 5.00]`, base `mcgs-step3-reroot` | failed: Elo −2.06 ± 3.73, LLR −3.12, 12956 games | | 5c | `mcgs-v-novaluehash` | `9e7c3ef` | 765326 | [5318](https://bench.rektdie.com/test/5318/) Non-Regression STC `[-5.00, 0.00]`, base `mcgs-step3-reroot` | passed: Elo +13.59 ± 7.51, LLR 3.16, 3120 games | -| 4 | `mcgs-v-reconcile` | `79fd017` | 764208 | [5319](https://bench.rektdie.com/test/5319/) STC `[0.00, 5.00]`, base `mcgs-step3-reroot` | | +| 4 | `mcgs-v-reconcile` | `79fd017` | 764208 | [5319](https://bench.rektdie.com/test/5319/) STC `[0.00, 5.00]`, base `mcgs-step3-reroot` | stopped unfinished: Elo +1.61 ± 3.83, LLR 0.04, 12288 games | ## Step 1 measurements @@ -716,12 +716,12 @@ start, and the smoke positions. There were no local games. | branch | change | bench | test | result | | --- | --- | ---: | --- | --- | -| `mcgs-v-arena12` | arenas sized for 12 edges per node instead of 8 | 764208 (unchanged, no GC in bench) | [5314](https://bench.rektdie.com/test/5314/) `[0.00, 5.00]` | | -| `mcgs-v-edgeq` | 5b: each edge caches its child's Q; selection and recompute read only the edges (20-byte edge, no running sum) | 769193 | [5315](https://bench.rektdie.com/test/5315/) `[0.00, 5.00]` | | +| `mcgs-v-arena12` | arenas sized for 12 edges per node instead of 8 | 764208 (unchanged, no GC in bench) | [5314](https://bench.rektdie.com/test/5314/) `[0.00, 5.00]` | stopped | +| `mcgs-v-edgeq` | 5b: each edge caches its child's Q; selection and recompute read only the edges (20-byte edge, no running sum) | 769193 | [5315](https://bench.rektdie.com/test/5315/) `[0.00, 5.00]` | stopped | | `mcgs-v-stop` | 5a: a playout stops at a child with more visits than its edge | 609350 | [5316](https://bench.rektdie.com/test/5316/) `[0.00, 5.00]` | passed | | `mcgs-v-pathrep` | selection scores Q = 0 for an edge whose child repeats the current path or the game | 755448 | [5317](https://bench.rektdie.com/test/5317/) `[0.00, 5.00]` | failed | | `mcgs-v-novaluehash` | 5c: no value hash, all Hash to the graph | 765326 | [5318](https://bench.rektdie.com/test/5318/) Non-Regression `[-5.00, 0.00]` | passed | -| `mcgs-v-reconcile` | 3.6.7: after reuse each root edge is all draws or none | 764208 (unchanged, no reuse in bench) | [5319](https://bench.rektdie.com/test/5319/) `[0.00, 5.00]` | | +| `mcgs-v-reconcile` | 3.6.7: after reuse each root edge is all draws or none | 764208 (unchanged, no reuse in bench) | [5319](https://bench.rektdie.com/test/5319/) `[0.00, 5.00]` | stopped | Notes: -- 2.47.3