From 5d57bb467a4d703f480c87f58687705e2f56e338 Mon Sep 17 00:00:00 2001 From: DU-jdto Date: Sat, 24 Feb 2018 13:06:18 +0100 Subject: [PATCH] Simplification: do razoring only for depth 1 The razoring heuristic is quite a drastic pruning technique, using a depth 0 search at internal nodes of the search tree to estimate the true value of depth n nodes. This patch limits this razoring to the case of internal nodes of depth 1. Author: Jarrod Torriero (DU-jdto) STC: LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 8043 W: 1865 L: 1716 D: 4462 http://tests.stockfishchess.org/tests/view/5a90a9290ebc590297cc86c1 LTC: LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 32890 W: 5577 L: 5476 D: 21837 http://tests.stockfishchess.org/tests/view/5a90c8510ebc590297cc86d5 Opportunities opened by this patch: it would be interesting to know if it brings Elo to re-introduce razoring or soft razoring at depth >= 2, maybe using a larger margin to compensate for the increased pruning effect. Bench: 5227124 --- src/search.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 57bd3811..23608f7a 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -667,17 +667,9 @@ namespace { // Step 7. Razoring (skipped when in check) if ( !PvNode - && depth < 3 * ONE_PLY + && depth <= ONE_PLY && eval + RazorMargin <= alpha) - { - if (depth <= ONE_PLY) - return qsearch(pos, ss, alpha, alpha+1); - - Value ralpha = alpha - RazorMargin; - Value v = qsearch(pos, ss, ralpha, ralpha+1); - if (v <= ralpha) - return v; - } + return qsearch(pos, ss, alpha, alpha+1); // Step 8. Futility pruning: child node (skipped when in check) if ( !rootNode -- 2.39.2