diff --git a/src/mcts.h b/src/mcts.h index a619c20..3b05333 100644 --- a/src/mcts.h +++ b/src/mcts.h @@ -71,15 +71,15 @@ u16 position_check(const Position& pos); // check, about 80 bits. class Tree { public: - // 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). 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; + // Edges per node the arenas are sized for: the edge arena gets 192 of + // every 224 bytes, the node arena 32 (plus the table). In the graph + // almost every node gets expanded, so it holds about 20 edges per node + // in middlegames (step 1: 18 per distinct position without collections), + // and with 8 the edge arena filled first. Collections over the 16 bench + // positions at 5 s and Hash 64 (local, one noisy run): 8 edges gave 67, + // 12 gave 53, 16 gave 51 and 20 gave 57; 16 already moves collections into + // the endgames, which fill the node arena first. + static constexpr size_t EDGES_PER_NODE = 12; // Splits `bytes` between the node arena, the edge arena and the table. void resize_bytes(size_t bytes);