]> git.sesse.net Git - stockfish/commitdiff
Fix comparison with alpha, not beta
authorMarco Costalba <mcostalba@gmail.com>
Sun, 9 Dec 2012 13:19:21 +0000 (14:19 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 9 Dec 2012 13:19:21 +0000 (14:19 +0100)
This silly bug seems the reason of the unsual bench
value.

bench: 6261882

src/search.cpp

index 07405d42beed4a52f586d0ccae66c4b327797226..98f3e3fdf0ca44553b279ff9e024cd7c7cb746ed 100644 (file)
@@ -573,7 +573,7 @@ namespace {
 
         // Fail Low
         if (  (tte->type() & BOUND_UPPER)
-            && ttValueUpper < beta
+            && ttValueUpper <= alpha
             && tte->depth_upper() >= depth
             && ttValueUpper != VALUE_NONE) // Only in case of TT access race
         {
@@ -1144,7 +1144,7 @@ split_point_start: // At split points actual search starts from here
 
         // Fail Low
         if (  (tte->type() & BOUND_UPPER)
-            && ttValueUpper < beta
+            && ttValueUpper <= alpha
             && tte->depth_upper() >= ttDepth
             && ttValueUpper != VALUE_NONE) // Only in case of TT access race
         {