From: Gary Linscott Date: Wed, 25 Jun 2014 20:45:14 +0000 (-0400) Subject: Original version of shane's patch X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=747e035c7df830c064e87abb75d73060eeca7d2b;p=stockfish Original version of shane's patch --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index dedecfd1..7eca96fa 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -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)]); }