X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=72ab9a1228d36bc58deb8d40e0c92c45fb896f87;hp=9c1d0b5eca66e1e928accfaec998d3f3d426d2d1;hb=7d2530873e6eb2b46ca2ffb548f9b993bbe1de41;hpb=18505f1fc40643ed033f681c36dc5efa3ddf2a05 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)