@@ -114,11 +114,11 @@ namespace {
114
114
// which piece type attacks which one. Attacks on lesser pieces which are
115
115
// pawn-defended are not considered.
116
116
constexpr Score ThreatByMinor[PIECE_TYPE_NB] = {
117
- S (0 , 0 ), S (6 , 32 ), S (59 , 41 ), S (79 , 56 ), S (90 , 119 ), S (79 , 161 )
117
+ S (0 , 0 ), S (5 , 32 ), S (57 , 41 ), S (77 , 56 ), S (88 , 119 ), S (79 , 161 )
118
118
};
119
119
120
120
constexpr Score ThreatByRook[PIECE_TYPE_NB] = {
121
- S (0 , 0 ), S (3 , 44 ), S (38 , 71 ), S (38 , 61 ), S (0 , 38 ), S (51 , 38 )
121
+ S (0 , 0 ), S (2 , 44 ), S (36 , 71 ), S (36 , 61 ), S (0 , 38 ), S (51 , 38 )
122
122
};
123
123
124
124
// PassedRank[Rank] contains a bonus according to the rank of a passed pawn
@@ -516,6 +516,9 @@ namespace {
516
516
b = ~attackedBy[Them][ALL_PIECES]
517
517
| (nonPawnEnemies & attackedBy2[Us]);
518
518
score += Hanging * popcount (weak & b);
519
+
520
+ // Additional bonus if weak piece is only protected by a queen
521
+ score += make_score (14 , 0 ) * popcount (weak & attackedBy[Them][QUEEN]);
519
522
}
520
523
521
524
// Bonus for restricting their piece moves
0 commit comments