]> git.sesse.net Git - stockfish/commitdiff
Fix bug in useless checks prune
authorMarco Costalba <mcostalba@gmail.com>
Sun, 29 Jan 2012 21:38:08 +0000 (22:38 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 31 Jan 2012 19:17:37 +0000 (20:17 +0100)
With current code we could raise bestValue above beta,
not what is intended for.

Spotted by Richard Vida.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/search.cpp

index 479710784021fc2e3daee473309d5ca20b897ce9..572a8ac8b2e0b1fda34c6d1867d7069d9653a1ae 100644 (file)
@@ -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))