]> git.sesse.net Git - stockfish/commitdiff
Original version of shane's patch
authorGary Linscott <glinscott@gmail.com>
Wed, 25 Jun 2014 20:45:14 +0000 (16:45 -0400)
committerGary Linscott <glinscott@gmail.com>
Wed, 25 Jun 2014 20:45:14 +0000 (16:45 -0400)
src/evaluate.cpp

index dedecfd16c73defa50fefb664189189cf8a898cd..7eca96fa5aef1678e961567c5238b7a5cd3366d7 100644 (file)
@@ -750,7 +750,8 @@ namespace {
                 // Endgame with opposite-colored bishops, but also other pieces. Still
                 // a bit drawish, but not as drawish as with only the two bishops.
                  sf = ScaleFactor(50 * sf / SCALE_FACTOR_NORMAL);
-        } else if ( ei.pi->pawn_span(strongSide) <= 1 &&
+        } else if ( abs(eg_value(score)) <= BishopValueEg &&
+                    ei.pi->pawn_span(strongSide) <= 1 &&
                    !pos.pawn_passed(~strongSide, pos.king_square(~strongSide))) {
             sf = ScaleFactor(ScalePawnSpan[ei.pi->pawn_span(strongSide)]);
         }