Skip to content
Permalink
Browse files

tweek.

bench 3299009
  • Loading branch information...
Vizvezdenec committed Jan 8, 2019
1 parent bf0a463 commit 14fe5ffb7aa892b8c107be25d87c4e1499113da7
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/evaluate.cpp
@@ -572,10 +572,14 @@ namespace {
score += ThreatByPawnPush * popcount(b);

// Our safe or protected pawns
b = pos.pieces(Us, PAWN) & safe;
b = pos.pieces(Us, PAWN)
& (~attackedBy[Them][ALL_PIECES]
| (attackedBy[Us][ALL_PIECES] & ~attackedBy2[Them] & ~attackedBy[Them][PAWN])
| (attackedBy[Us][PAWN] & (~attackedBy[Them][PAWN] | (attackedBy2[Us] & ~attackedBy2[Them])))
| (double_pawn_attacks_bb<Us>(pos.pieces(Us, PAWN)) & ~double_pawn_attacks_bb<Them>(pos.pieces(Them, PAWN))));

b = pawn_attacks_bb<Us>(b) & nonPawnEnemies;
score += ThreatBySafePawn * (popcount(b) - popcount(double_pawn_attacks_bb<Us>(pos.pieces(Us, PAWN) & safe) & nonPawnEnemies));
score += ThreatBySafePawn * popcount(b);

// Bonus for threats on the next moves against enemy queen
if (pos.count<QUEEN>(Them) == 1)

0 comments on commit 14fe5ff

Please sign in to comment.
You can’t perform that action at this time.