From df31398bb91b0e43661176e2f1681617ee64f1ad Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sun, 29 Jan 2012 22:38:08 +0100 Subject: [PATCH 1/1] Fix bug in useless checks prune With current code we could raise bestValue above beta, not what is intended for. Spotted by Richard Vida. Signed-off-by: Marco Costalba --- src/search.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 47971078..572a8ac8 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1282,12 +1282,7 @@ split_point_start: // At split points actual search starts from here && !pos.is_capture_or_promotion(move) && ss->eval + PawnValueMidgame / 4 < beta && !check_is_dangerous(pos, move, futilityBase, beta, &bestValue)) - { - if (ss->eval + PawnValueMidgame / 4 > bestValue) - bestValue = ss->eval + PawnValueMidgame / 4; - continue; - } // Check for legality only before to do the move if (!pos.pl_move_is_legal(move, ci.pinned)) -- 2.39.2