]> git.sesse.net Git - stockfish/commitdiff
Simplify pawn threats and merge into ThreatenedByPawn[]
authorAjith <achajo@yahoo.co.in>
Wed, 11 Jun 2014 23:31:33 +0000 (08:31 +0900)
committerMarco Costalba <mcostalba@gmail.com>
Wed, 11 Jun 2014 23:32:16 +0000 (08:32 +0900)
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

src/evaluate.cpp

index 84b9d1154bc46c439d2e5aefa1b3c7c00a1d2370..1e1e762c0a04fb378aaaa14ea7806be450f9317e 100644 (file)
@@ -147,7 +147,7 @@ namespace {
   // ThreatenedByPawn[PieceType] contains a penalty according to which piece
   // type is attacked by an enemy pawn.
   const Score ThreatenedByPawn[] = {
   // 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
   };
 
   // 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)
     {
     // 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)))];
 
         if (b)
             score += Threat[0][type_of(pos.piece_on(lsb(b)))];