From: Ajith Date: Wed, 11 Jun 2014 23:31:33 +0000 (+0900) Subject: Simplify pawn threats and merge into ThreatenedByPawn[] X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=84dabe5982dab5ee65770eeb77c4f966db9514f8 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 --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 84b9d115..1e1e762c 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -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 @@ -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)))];