Skip to content

Commit 84dabe5

Browse files
ajithcjmcostalba
authored andcommitted
Simplify pawn threats and merge into ThreatenedByPawn[]
Tested in no-regression mode, passed STC LLR: 2.96 (-2.94,2.94) [-3.00,1.00] Total: 14477 W: 2493 L: 2362 D: 9622 and LTC LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 51964 W: 7091 L: 7013 D: 37860 bench: 7875814
1 parent e10276f commit 84dabe5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/evaluate.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ namespace {
147147
// ThreatenedByPawn[PieceType] contains a penalty according to which piece
148148
// type is attacked by an enemy pawn.
149149
const Score ThreatenedByPawn[] = {
150-
S(0, 0), S(0, 0), S(56, 70), S(56, 70), S(76, 99), S(86, 118)
150+
S(0, 0), S(0, 0), S(80, 119), S(80, 119), S(117, 199), S(127, 218)
151151
};
152152

153153
// Hanging contains a bonus for each enemy hanging piece
@@ -506,7 +506,7 @@ namespace {
506506
// Add a bonus according if the attacking pieces are minor or major
507507
if (weakEnemies)
508508
{
509-
b = weakEnemies & (ei.attackedBy[Us][PAWN] | ei.attackedBy[Us][KNIGHT] | ei.attackedBy[Us][BISHOP]);
509+
b = weakEnemies & (ei.attackedBy[Us][KNIGHT] | ei.attackedBy[Us][BISHOP]);
510510
if (b)
511511
score += Threat[0][type_of(pos.piece_on(lsb(b)))];
512512

0 commit comments

Comments
 (0)