X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=c2e7efef44ce9f0bb3fd6d799f11e4c7398c8f54;hp=4a4ae2ad982b430d941dbcaca85af66a0eb0bf12;hb=0fa957cf66069c4499d9fe793cf07a11c4ccb87c;hpb=2bfaf454551ae5a9d99d271d0d87d2a6c829c7e4 diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 4a4ae2ad..c2e7efef 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -758,7 +758,7 @@ namespace { int outflanking = distance(pos.square(WHITE), pos.square(BLACK)) - distance(pos.square(WHITE), pos.square(BLACK)); - bool pawnsOnBothFlanks = (pos.pieces(PAWN) & QueenSide) + bool pawnsOnBothFlanks = (pos.pieces(PAWN) & QueenSide) && (pos.pieces(PAWN) & KingSide); // Compute the initiative bonus for the attacking side @@ -795,9 +795,10 @@ namespace { if ( pos.opposite_bishops() && pos.non_pawn_material(WHITE) == BishopValueMg && pos.non_pawn_material(BLACK) == BishopValueMg) - sf = 31; + sf = 8 + 4 * pe->pawn_asymmetry(); else sf = std::min(40 + (pos.opposite_bishops() ? 2 : 7) * pos.count(strongSide), sf); + } return ScaleFactor(sf);