Skip to content
Permalink
Browse files

No MG component for K. Bench: 3224416

  • Loading branch information...
31m059 committed Jan 8, 2019
1 parent ee842ac commit 3ec59d18c723db3fe5a91cd3d0851c2dcd9af27a
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/evaluate.cpp
@@ -554,7 +554,8 @@ namespace {
restricted = attackedBy[Them][ALL_PIECES]
& ~stronglyProtected
& attackedBy[Us][ALL_PIECES];
score += RestrictedPiece * popcount(restricted & ~attackedBy[Us][KING]);
score += make_score(7, 7) * popcount(restricted & ~attackedBy[Us][KING])
+ make_score(0, 7) * popcount(restricted & attackedBy[Us][KING]);

// Bonus for enemy unopposed weak pawns
if (pos.pieces(Us, ROOK, QUEEN))

1 comment on commit 3ec59d1

@Vizvezdenec

This comment has been minimized.

Copy link

commented on 3ec59d1 Jan 8, 2019

I think the most logical thing will be to do the same as we did with "weak" bitboard in kingsafety.
Thus doingsmth like
attackedBy[Them][ALL_PIECES]
& ~stronglyProtected
& ((attackedBy[Us][ALL_PIECES] & ~attackedBy[Us][KING]) | attackedBy2[Us]);
This way we will exclude only squares that are attacked by the lonely king but will include squares that are attacked by other pieces also.

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