X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=ac4d85b69996eb7abadda3cf61fcd9d50ec39cf7;hp=806a7fc4ce7596019cd3859dcad18412db5a2a0a;hb=7c55b0e880b68c0242d27a0471f8d535f02703f0;hpb=cf71efc34bc6528a3a980aa0b9eec27770095eb8 diff --git a/src/search.cpp b/src/search.cpp index 806a7fc4..ac4d85b6 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -916,7 +916,7 @@ namespace { else { if ( newDepth >= 3*OnePly - && i >= MultiPV + LMRPVMoves - 2 // Remove -2 and decrease LMRPVMoves instead ? + && i >= MultiPV + LMRPVMoves && !dangerous && !moveIsCapture && !move_is_promotion(move) @@ -1540,10 +1540,10 @@ namespace { // Use the cached evaluation score if possible assert(ei.futilityMargin == Value(0)); - staticValue = tte->value(); + staticValue = tte->value() + ply; } else - staticValue = evaluate(pos, ei, threadID); + staticValue = evaluate(pos, ei, threadID) + ply; if (ply == PLY_MAX - 1) return evaluate(pos, ei, threadID); @@ -2185,7 +2185,7 @@ namespace { // Case 5: Discovered check, checking piece is the piece moved in m1 if ( piece_is_slider(pos.piece_on(t1)) && bit_is_set(squares_between(t1, pos.king_square(pos.side_to_move())), f2) - && !bit_is_set(squares_between(t2, pos.king_square(pos.side_to_move())), t2)) + && !bit_is_set(squares_between(t1, pos.king_square(pos.side_to_move())), t2)) { Bitboard occ = pos.occupied_squares(); Color us = pos.side_to_move();