From: Guenther Demetz Date: Mon, 4 Jun 2018 07:10:30 +0000 (+0200) Subject: Remove a superfluous subtrahend X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=b939788f9de55051e0dd43e5943a0cde0f2be14e;hp=6b5d671cdc30751d79765edc8ae5320255ce120c Remove a superfluous subtrahend The '- 1' subtrahend was introduced for guarding against null move search at root, which would be nonsense. But this is actually already guaranteed by the !PvNode condition. This followed from the discussion in pull request 1609: https://github.com/official-stockfish/Stockfish/pull/1609 No functional change --- diff --git a/src/search.cpp b/src/search.cpp index 0574da58..93651cc0 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -751,7 +751,7 @@ namespace { && ss->staticEval >= beta - 36 * depth / ONE_PLY + 225 && !excludedMove && pos.non_pawn_material(us) - && (ss->ply > thisThread->nmpMinPly || us != thisThread->nmpColor)) + && (ss->ply >= thisThread->nmpMinPly || us != thisThread->nmpColor)) { assert(eval - beta >= 0); @@ -780,7 +780,7 @@ namespace { // Do verification search at high depths, with null move pruning disabled // for us, until ply exceeds nmpMinPly. - thisThread->nmpMinPly = ss->ply + 3 * (depth-R) / 4 - 1; + thisThread->nmpMinPly = ss->ply + 3 * (depth-R) / 4; thisThread->nmpColor = us; Value v = search(pos, ss, beta-1, beta, depth-R, false);