Skip to content

Commit

Permalink
Simplify pawn threats and merge into ThreatenedByPawn[]
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ajithcj authored and mcostalba committed Jun 11, 2014
1 parent e10276f commit 84dabe5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/evaluate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ namespace {
// ThreatenedByPawn[PieceType] contains a penalty according to which piece
// type is attacked by an enemy pawn.
const Score ThreatenedByPawn[] = {
S(0, 0), S(0, 0), S(56, 70), S(56, 70), S(76, 99), S(86, 118)
S(0, 0), S(0, 0), S(80, 119), S(80, 119), S(117, 199), S(127, 218)
};

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

Expand Down

0 comments on commit 84dabe5

Please sign in to comment.