X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fevaluate.cpp;h=7e6260c8a34128fe588b3a2c492e07af526986b1;hb=5c4002aa827653a125130a0d01d0bb96dd2b8bae;hp=fbe768bbbd4d72983fd1abd312ec7c31ba881c58;hpb=eb07775583c39893bc6eb65a40b5f62a7799deee;p=stockfish diff --git a/src/evaluate.cpp b/src/evaluate.cpp index fbe768bb..7e6260c8 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -328,7 +328,7 @@ namespace { // bishop, bigger when the center files are blocked with pawns. Bitboard blocked = pos.pieces(Us, PAWN) & shift(pos.pieces()); - score -= BishopPawns * pe->pawns_on_same_color_squares(Us, s) + score -= BishopPawns * pos.pawns_on_same_color_squares(Us, s) * (1 + popcount(blocked & CenterFiles)); // Bonus for bishop on a long diagonal which can "see" both center squares @@ -467,12 +467,13 @@ namespace { + 69 * kingAttacksCount[Them] + 185 * popcount(kingRing[Us] & weak) - 100 * bool(attackedBy[Us][KNIGHT] & attackedBy[Us][KING]) + - 35 * bool(attackedBy[Us][BISHOP] & attackedBy[Us][KING]) + 150 * popcount(pos.blockers_for_king(Us) | unsafeChecks) - 873 * !pos.count(Them) - 6 * mg_value(score) / 8 + mg_value(mobility[Them] - mobility[Us]) + 5 * kingFlankAttacks * kingFlankAttacks / 16 - - 15; + - 7; // Transform the kingDanger units into a Score, and subtract it from the evaluation if (kingDanger > 100)