X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=6e33bb7215d0579e035915d20c40811dac8c8ae9;hp=4b9960d530672d2a9113112eade7e20f274e33bc;hb=58c181de9a8f505e539b2e7811cf820175c73ebf;hpb=cf4a38e0cb05d5de4ccdde0314e9e4bbeb70e165;ds=inline diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 4b9960d5..6e33bb72 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -75,7 +75,6 @@ namespace { Material::Entry* me; Pawns::Entry* pe; - Bitboard pinnedPieces[COLOR_NB]; Bitboard mobilityArea[COLOR_NB]; // attackedBy[color][piece type] is a bitboard representing all squares @@ -230,8 +229,6 @@ namespace { const Square Down = (Us == WHITE ? SOUTH : NORTH); const Bitboard LowRanks = (Us == WHITE ? Rank2BB | Rank3BB: Rank7BB | Rank6BB); - ei.pinnedPieces[Us] = pos.pinned_pieces(Us); - // Find our pawns on the first two ranks, and those which are blocked Bitboard b = pos.pieces(Us, PAWN) & (shift(pos.pieces()) | LowRanks); @@ -283,7 +280,7 @@ namespace { : Pt == ROOK ? attacks_bb< ROOK>(s, pos.pieces() ^ pos.pieces(Us, ROOK, QUEEN)) : pos.attacks_from(s); - if (ei.pinnedPieces[Us] & s) + if (pos.pinned_pieces(Us) & s) b &= LineBB[pos.square(Us)][s]; ei.attackedBy2[Us] |= ei.attackedBy[Us][ALL_PIECES] & b; @@ -429,7 +426,7 @@ namespace { kingDanger = std::min(807, ei.kingAttackersCount[Them] * ei.kingAttackersWeight[Them]) + 101 * ei.kingAdjacentZoneAttacksCount[Them] + 235 * popcount(undefended) - + 134 * (popcount(b) + !!ei.pinnedPieces[Us]) + + 134 * (popcount(b) + !!pos.pinned_pieces(Us)) - 717 * !pos.count(Them) - 7 * mg_value(score) / 5 - 5;