Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b7bfb0b916 | ||
|
|
95e49098ec |
No files matched your search
+66
-2
@@ -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 |
|
| 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) | | |
|
| 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
|
## Step 1 measurements
|
||||||
|
|
||||||
@@ -618,9 +619,72 @@ The plan recommends these tests, both with Threads=1 and
|
|||||||
`UHO_Lichess_4852_v1.epd`:
|
`UHO_Lichess_4852_v1.epd`:
|
||||||
|
|
||||||
- STC 8.0+0.08, `[0.00, 5.00]`, Threads=1, Hash=64, base `main` (bench
|
- 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
|
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
|
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
|
deleted soon after they started. The owner started the test knowing about the
|
||||||
failed smoke gate; the reroot is unchanged.
|
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.
|
||||||
+22
-3
@@ -592,9 +592,27 @@ bool Searcher::expand(u32 idx, const Position& pos) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 Searcher::select_edge(u32 idx) const {
|
u32 Searcher::select_edge(u32 idx, const Position& pos) const {
|
||||||
const Node& node = tree_.node(idx);
|
const Node& node = tree_.node(idx);
|
||||||
|
|
||||||
|
// Repetitions of this path: a child whose position already occurred on
|
||||||
|
// this playout's path or in the game, with the same side to move and
|
||||||
|
// within the reversible window, would be a draw if chosen now, whatever
|
||||||
|
// its Q says about other paths. Such an edge scores Q = 0. The window
|
||||||
|
// keys are those history_ holds 3, 5, ... plies before `pos` (4, 6, ...
|
||||||
|
// before the child), up to pos.halfmove. A 64-bit filter skips the exact
|
||||||
|
// search for most children.
|
||||||
|
const int n_hist = int(history_.size());
|
||||||
|
const int max_back = std::min(pos.halfmove, n_hist - 1);
|
||||||
|
u64 window_filter = 0;
|
||||||
|
for (int back = 3; back <= max_back; back += 2) window_filter |= 1ULL << (history_[n_hist - 1 - back] & 63);
|
||||||
|
const auto repeats = [&](u64 key) {
|
||||||
|
if (!(window_filter & (1ULL << (key & 63)))) return false;
|
||||||
|
for (int back = 3; back <= max_back; back += 2)
|
||||||
|
if (history_[n_hist - 1 - back] == key) return true;
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
// node.q is from the view of the side that moved into this node, so the side
|
// node.q is from the view of the side that moved into this node, so the side
|
||||||
// to move here sees -q. Visits are N(n), the node's own evaluation included.
|
// 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;
|
const float parent_q = node.visits ? -node.q : 0.0f;
|
||||||
@@ -620,7 +638,8 @@ u32 Searcher::select_edge(u32 idx) const {
|
|||||||
const u32 c = node.first_edge + i;
|
const u32 c = node.first_edge + i;
|
||||||
const Edge& e = tree_.edge(c);
|
const Edge& e = tree_.edge(c);
|
||||||
// The child's Q is from the view of the side to move here.
|
// The child's Q is from the view of the side to move here.
|
||||||
const float q = e.visits ? visited_edge_q(e) : fpu;
|
float q = e.visits ? visited_edge_q(e) : fpu;
|
||||||
|
if (window_filter && e.child && repeats(tree_.node(e.child).key)) q = 0.0f;
|
||||||
const float score = q + explore * e.prior() / float(1 + e.visits);
|
const float score = q + explore * e.prior() / float(1 + e.visits);
|
||||||
if (score > best_score) {
|
if (score > best_score) {
|
||||||
best_score = score;
|
best_score = score;
|
||||||
@@ -671,7 +690,7 @@ void Searcher::playout() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
const u32 e = select_edge(idx);
|
const u32 e = select_edge(idx, pos);
|
||||||
Edge& edge = tree_.edge(e);
|
Edge& edge = tree_.edge(e);
|
||||||
pos.make_move(Move::from_raw(edge.move));
|
pos.make_move(Move::from_raw(edge.move));
|
||||||
history_.push_back(pos.key);
|
history_.push_back(pos.key);
|
||||||
|
|||||||
+3
-2
@@ -331,8 +331,9 @@ private:
|
|||||||
// Second visit: creates the edges 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).
|
// arena is full (a collection is then scheduled).
|
||||||
bool expand(u32 idx, const Position& pos);
|
bool expand(u32 idx, const Position& pos);
|
||||||
// The edge PUCT picks at node `idx`.
|
// The edge PUCT picks at node `idx`, whose position is `pos` (the last
|
||||||
u32 select_edge(u32 idx) const;
|
// entry of history_).
|
||||||
|
u32 select_edge(u32 idx, const Position& pos) const;
|
||||||
// A node's Q from its own value and its children's (see Edge).
|
// A node's Q from its own value and its children's (see Edge).
|
||||||
void recompute_q(Node& node) const;
|
void recompute_q(Node& node) const;
|
||||||
bool is_repetition(const Position& pos) const;
|
bool is_repetition(const Position& pos) const;
|
||||||
|
|||||||
Reference in new issue
Block a user