X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=2c9240146b32b46791efcb755a46f3236a83f18c;hp=db2d933d0eaf0172b086a08c7b26512168c47ca4;hb=8b15961349e18a9ba113973c53f53913d0cd0fad;hpb=b48439e90643cb6f65f9e34d1421976883c12efc diff --git a/src/search.cpp b/src/search.cpp index db2d933d..2c924014 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -68,7 +68,8 @@ namespace { const int skipPhase[] = { 0, 1, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7 }; // Razoring and futility margin based on depth - const int razor_margin[4] = { 483, 570, 603, 554 }; + // razor_margin[0] is unused as long as depth >= ONE_PLY in search + const int razor_margin[] = { 0, 570, 603, 554 }; Value futility_margin(Depth d) { return Value(150 * d / ONE_PLY); } // Futility and reductions lookup tables, initialized at startup @@ -878,7 +879,7 @@ moves_loop: // When in check search starts from here // (alpha-s, beta-s), and just one fails high on (alpha, beta), then that move // is singular and should be extended. To verify this we do a reduced search // on all the other moves but the ttMove and if the result is lower than - // ttValue minus a margin then we extend the ttMove. + // ttValue minus a margin then we will extend the ttMove. if ( singularExtensionNode && move == ttMove && pos.legal(move)) @@ -1282,6 +1283,7 @@ moves_loop: // When in check search starts from here // Detect non-capture evasions that are candidates to be pruned evasionPrunable = InCheck + && depth != DEPTH_ZERO && bestValue > VALUE_MATED_IN_MAX_PLY && !pos.capture(move); @@ -1503,7 +1505,7 @@ string UCI::pv(const Position& pos, Depth depth, Value alpha, Value beta) { for (size_t i = 0; i < multiPV; ++i) { - bool updated = (i <= PVIdx); + bool updated = (i <= PVIdx && rootMoves[i].score != -VALUE_INFINITE); if (depth == ONE_PLY && !updated) continue;