X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=314623084ff4eff2330b8185b3e9dd496f1d3261;hp=f0c1bdd978e14fdc661c2a4041bb220fce343055;hb=ef4d89c9bd4fff869f9b57d7f5fcdacdfd46f91c;hpb=926f215061311392bc26c7bc4bde5b719dbab4e5 diff --git a/src/search.cpp b/src/search.cpp index f0c1bdd9..31462308 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -599,7 +599,7 @@ namespace { ss->currentMove = ttMove; // Can be MOVE_NONE // If ttMove is quiet, update killers, history, counter move on TT hit - if (ttValue >= beta && ttMove && !pos.capture_or_promotion(ttMove) && !inCheck) + if (ttValue >= beta && ttMove && !pos.capture_or_promotion(ttMove)) update_stats(pos, ss, ttMove, depth, nullptr, 0); return ttValue; @@ -1144,7 +1144,7 @@ moves_loop: // When in check and at SpNode search starts from here : inCheck ? mated_in(ss->ply) : DrawValue[pos.side_to_move()]; // Quiet best move: update killers, history and countermoves - else if (bestValue >= beta && !pos.capture_or_promotion(bestMove) && !inCheck) + else if (bestValue >= beta && !pos.capture_or_promotion(bestMove)) update_stats(pos, ss, bestMove, depth, quietsSearched, quietCount - 1); tte->save(posKey, value_to_tt(bestValue, ss->ply), @@ -1302,8 +1302,7 @@ moves_loop: // When in check and at SpNode search starts from here // Detect non-capture evasions that are candidates to be pruned evasionPrunable = InCheck && bestValue > VALUE_MATED_IN_MAX_PLY - && !pos.capture(move) - && !pos.can_castle(pos.side_to_move()); + && !pos.capture(move); // Don't search moves with negative SEE values if ( (!InCheck || evasionPrunable)