From: Marco Costalba Date: Thu, 5 Jul 2012 10:48:17 +0000 (+0100) Subject: Streamline null search reduction formula X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=7d2530873e6eb2b46ca2ffb548f9b993bbe1de41 Streamline null search reduction formula Although a (little) functional change, we have no ELO change but formula it is now more clear. After 13019 games at 30"+0.05 Mod vs Orig 2075 - 2088 - 8856 ELO 0 (+- 3.4) Signed-off-by: Marco Costalba --- diff --git a/src/search.cpp b/src/search.cpp index 9c1d0b5e..72ab9a12 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -708,16 +708,16 @@ namespace { ss->currentMove = MOVE_NULL; // Null move dynamic reduction based on depth - int R = 3 + (depth >= 5 * ONE_PLY ? depth / 8 : 0); + Depth R = 3 * ONE_PLY + depth / 4; // Null move dynamic reduction based on value if (refinedValue - PawnValueMidgame > beta) - R++; + R += ONE_PLY; pos.do_null_move(st); (ss+1)->skipNullMove = true; - nullValue = depth-R*ONE_PLY < ONE_PLY ? -qsearch(pos, ss+1, -beta, -alpha, DEPTH_ZERO) - : - search(pos, ss+1, -beta, -alpha, depth-R*ONE_PLY); + nullValue = depth-R < ONE_PLY ? -qsearch(pos, ss+1, -beta, -alpha, DEPTH_ZERO) + : - search(pos, ss+1, -beta, -alpha, depth-R); (ss+1)->skipNullMove = false; pos.do_null_move(st); @@ -732,7 +732,7 @@ namespace { // Do verification search at high depths ss->skipNullMove = true; - Value v = search(pos, ss, alpha, beta, depth-R*ONE_PLY); + Value v = search(pos, ss, alpha, beta, depth-R); ss->skipNullMove = false; if (v >= beta)