From: Tom Vijlbrief Date: Tue, 16 Jan 2018 07:21:41 +0000 (+0100) Subject: Make razor margin depth independent X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=5451687efbb71e93a063a4d323cc9f73ba12e9a4;hp=b61759e907e508d436b7c0b7ff8ab866454f7ca6 Make razor margin depth independent STC: LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 37171 W: 6680 L: 6587 D: 23904 LTC: LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 11632 W: 1574 L: 1442 D: 8616 bench: 5098576 --- diff --git a/src/search.cpp b/src/search.cpp index e0f6cba2..214177a2 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -67,8 +67,7 @@ namespace { const int skipPhase[] = { 0, 1, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7 }; // Razoring and futility margin based on depth - // razor_margin[0] is unused as long as depth >= ONE_PLY in search - const int razor_margin[] = { 0, 570, 603, 554 }; + const int razor_margin = 600; Value futility_margin(Depth d) { return Value(150 * d / ONE_PLY); } // Futility and reductions lookup tables, initialized at startup @@ -654,12 +653,12 @@ namespace { // Step 6. Razoring (skipped when in check) if ( !PvNode && depth < 4 * ONE_PLY - && eval + razor_margin[depth / ONE_PLY] <= alpha) + && eval + razor_margin <= alpha) { if (depth <= ONE_PLY) return qsearch(pos, ss, alpha, alpha+1); - Value ralpha = alpha - razor_margin[depth / ONE_PLY]; + Value ralpha = alpha - razor_margin; Value v = qsearch(pos, ss, ralpha, ralpha+1); if (v <= ralpha) return v;