X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=97ab5918ae808090ca181aab078e35f15f8399d4;hp=a36601bffc48f6965652694e886747c4a29a838a;hb=ade3bb9a4e774aa9b760235f3b0ee42e0a0420d9;hpb=c2c0e6b07de96c1fc39528b613fb3c9f93a8d7dc diff --git a/src/search.cpp b/src/search.cpp index a36601bf..97ab5918 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -731,6 +731,7 @@ namespace { if ( !PvNode && depth >= 2 * ONE_PLY && eval >= beta + && (ss->staticEval >= beta || depth >= 12 * ONE_PLY) && pos.non_pawn_material(pos.side_to_move())) { ss->currentMove = MOVE_NULL; @@ -815,7 +816,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 +1106,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);