From: Fabian Fichter Date: Sat, 31 Oct 2020 12:24:43 +0000 (+0100) Subject: Fix failing assertion in losers chess X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=252bc6b66571fcb0247c8956b8174db83033efe9;p=fairystockfish.git Fix failing assertion in losers chess Prevent non-evasion move generation when in check. --- diff --git a/src/search.cpp b/src/search.cpp index cafb11a..0878a93 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1202,7 +1202,7 @@ moves_loop: // When in check, search starts from here // Losing chess capture extension else if ( pos.must_capture() && pos.capture(move) - && MoveList(pos).size() == 1) + && (ss->inCheck || MoveList(pos).size() == 1)) extension = 1; // Add extension to new depth @@ -1230,7 +1230,7 @@ moves_loop: // When in check, search starts from here || ss->staticEval + PieceValue[EG][pos.captured_piece()] <= alpha || cutNode || thisThread->ttHitAverage < 427 * TtHitAverageResolution * TtHitAverageWindow / 1024) - && !(pos.must_capture() && MoveList(pos).size())) + && !(pos.must_capture() && (givesCheck || MoveList(pos).size()))) { Depth r = reduction(improving, depth, moveCount);