X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=064df0ca11fafc5b5b100eb23f8a61fd48565e76;hp=a36601bffc48f6965652694e886747c4a29a838a;hb=716a145a6cc9257c3b45a41030913220c3878249;hpb=190d2ea4bc433a0c047ede87f5d9cc241de2b1e2 diff --git a/src/search.cpp b/src/search.cpp index a36601bf..064df0ca 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -815,7 +815,6 @@ namespace { moves_loop: // When in check search starts from here - Square prevSq = to_sq((ss-1)->currentMove); const CounterMoveStats* cmh = (ss-1)->counterMoves; const CounterMoveStats* fmh = (ss-2)->counterMoves; const CounterMoveStats* fmh2 = (ss-4)->counterMoves; @@ -1106,10 +1105,10 @@ moves_loop: // When in check search starts from here // Bonus for prior countermove that caused the fail low else if ( depth >= 3 * ONE_PLY && !bestMove - && !inCheck && !pos.captured_piece_type() && is_ok((ss-1)->currentMove)) { + Square prevSq = to_sq((ss-1)->currentMove); Value bonus = Value((depth / ONE_PLY) * (depth / ONE_PLY) + 2 * depth / ONE_PLY - 2); if ((ss-2)->counterMoves) (ss-2)->counterMoves->update(pos.piece_on(prevSq), prevSq, bonus);