constexpr Score KnightOnQueen = S( 20, 12);
constexpr Score LongDiagonalBishop = S( 44, 0);
constexpr Score MinorBehindPawn = S( 16, 0);
constexpr Score KnightOnQueen = S( 20, 12);
constexpr Score LongDiagonalBishop = S( 44, 0);
constexpr Score MinorBehindPawn = S( 16, 0);
constexpr Score PawnlessFlank = S( 18, 94);
constexpr Score RestrictedPiece = S( 7, 6);
constexpr Score RookOnPawn = S( 10, 28);
constexpr Score PawnlessFlank = S( 18, 94);
constexpr Score RestrictedPiece = S( 7, 6);
constexpr Score RookOnPawn = S( 10, 28);
+ 69 * kingAttacksCount[Them]
+ 185 * popcount(kingRing[Us] & weak)
+ 150 * popcount(pos.blockers_for_king(Us) | unsafeChecks)
+ 69 * kingAttacksCount[Them]
+ 185 * popcount(kingRing[Us] & weak)
+ 150 * popcount(pos.blockers_for_king(Us) | unsafeChecks)
- 873 * !pos.count<QUEEN>(Them)
- 6 * mg_value(score) / 8
+ mg_value(mobility[Them] - mobility[Us])
- 873 * !pos.count<QUEEN>(Them)
- 6 * mg_value(score) / 8
+ mg_value(mobility[Them] - mobility[Us])
- score += Hanging * popcount(weak & ~attackedBy[Them][ALL_PIECES]);
-
- b = weak & nonPawnEnemies & attackedBy[Them][ALL_PIECES];
- score += Overload * popcount(b);
+ b = ~attackedBy[Them][ALL_PIECES]
+ | (nonPawnEnemies & attackedBy2[Us]);
+ score += Hanging * popcount(weak & b);