X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=7fb0e26ae9ec90a5504eb5215de3514494a4fa24;hp=01b5aa5b8397f617b287eafe7ce60581b4690e47;hb=9d219c07e46bd527f4d9ff4d5b273102b59521c3;hpb=bf01bd07551dd4e2d68d82b305cc5d89a4c23bb0 diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 01b5aa5b..7fb0e26a 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -801,20 +801,13 @@ namespace { // If scale is not already specific, scale down the endgame via general heuristics if (sf == SCALE_FACTOR_NORMAL) { - if (pos.opposite_bishops()) - { + if ( pos.opposite_bishops() + && pos.non_pawn_material(WHITE) == BishopValueMg + && pos.non_pawn_material(BLACK) == BishopValueMg) // Endgame with opposite-colored bishops and no other pieces is almost a draw - if ( pos.non_pawn_material(WHITE) == BishopValueMg - && pos.non_pawn_material(BLACK) == BishopValueMg) - sf = 31; - - // Endgame with opposite-colored bishops, but also other pieces. Still - // a bit drawish, but not as drawish as with only the two bishops. - else - sf = 46; - } + sf = 31; else - sf = std::min(40 + 7 * pos.count(strongSide), sf); + sf = std::min(40 + (pos.opposite_bishops()? 2 : 7) * pos.count(strongSide), sf); } return ScaleFactor(sf);