From: Uri Blass Date: Sat, 27 Sep 2014 20:33:28 +0000 (+0800) Subject: Remove use of half-ply reductions from LMR, Null-move, IID and X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=ea9c424bba07d522d4acff54f2883fc124574e50 Remove use of half-ply reductions from LMR, Null-move, IID and Singular extensions. STC: ELO: 3.80 +-3.1 (95%) LOS: 99.2% Total: 19727 W: 4190 L: 3974 D: 11563 LTC: LLR: 2.96 (-2.94,2.94) [-3.00,1.00] Total: 7647 W: 1356 L: 1214 D: 5077 Bench: 6545733 Resolves #55 --- diff --git a/src/search.cpp b/src/search.cpp index 6215b083..436b6438 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -127,17 +127,14 @@ void Search::init() { { double pvRed = 0.00 + log(double(hd)) * log(double(mc)) / 3.00; double nonPVRed = 0.33 + log(double(hd)) * log(double(mc)) / 2.25; - Reductions[1][1][hd][mc] = int8_t( pvRed >= 1.0 ? pvRed * int(ONE_PLY) : 0); - Reductions[0][1][hd][mc] = int8_t(nonPVRed >= 1.0 ? nonPVRed * int(ONE_PLY) : 0); + Reductions[1][1][hd][mc] = int8_t( pvRed >= 1.0 ? pvRed+0.5: 0)*int(ONE_PLY); + Reductions[0][1][hd][mc] = int8_t(nonPVRed >= 1.0 ? nonPVRed+0.5: 0)*int(ONE_PLY); Reductions[1][0][hd][mc] = Reductions[1][1][hd][mc]; Reductions[0][0][hd][mc] = Reductions[0][1][hd][mc]; - if (Reductions[0][0][hd][mc] > 2 * ONE_PLY) + if (Reductions[0][0][hd][mc] >= 2 * ONE_PLY) Reductions[0][0][hd][mc] += ONE_PLY; - - else if (Reductions[0][0][hd][mc] > 1 * ONE_PLY) - Reductions[0][0][hd][mc] += ONE_PLY / 2; } // Init futility move count array @@ -565,8 +562,7 @@ namespace { assert(eval - beta >= 0); // Null move dynamic reduction based on depth and value - Depth R = 3 * ONE_PLY - + depth / 4 + Depth R = (3 + (depth / 8 )) * ONE_PLY + std::min(int(eval - beta) / PawnValueMg, 3) * ONE_PLY; pos.do_null_move(st); @@ -633,7 +629,7 @@ namespace { && (PvNode || ss->staticEval + 256 >= beta)) { Depth d = depth - 2 * ONE_PLY - (PvNode ? DEPTH_ZERO : depth / 4); - + d = (d / 2) * 2; // Round to nearest full-ply ss->skipNullMove = true; search(pos, ss, alpha, beta, d, true); ss->skipNullMove = false; @@ -735,7 +731,7 @@ moves_loop: // When in check and at SpNode search starts from here Value rBeta = ttValue - int(depth); ss->excludedMove = move; ss->skipNullMove = true; - value = search(pos, ss, rBeta - 1, rBeta, depth / 2, cutNode); + value = search(pos, ss, rBeta - 1, rBeta, (depth / 4) * 2, cutNode); ss->skipNullMove = false; ss->excludedMove = MOVE_NONE;