]> git.sesse.net Git - stockfish/commitdiff
Extend King Threats to all pieces (other than pawns).
authorAjith <achajo@yahoo.co.in>
Fri, 3 Oct 2014 19:54:12 +0000 (03:54 +0800)
committerGary Linscott <glinscott@gmail.com>
Fri, 3 Oct 2014 19:54:12 +0000 (03:54 +0800)
STC
LLR: 2.99 (-2.94,2.94) [-1.50,4.50]
Total: 20559 W: 4261 L: 4095 D: 12203

LTC
LLR: 2.96 (-2.94,2.94) [0.00,4.00]
Total: 75232 W: 13097 L: 12696 D: 49439

Bench: 7543790

Resolves #63

src/evaluate.cpp

index 7892f3155c57e64fc2feff79d56569511c6eb92c..ae52d203ffc0b565b317aa1d945de1bd468b71b3 100644 (file)
@@ -151,8 +151,8 @@ namespace {
   };
 
   // Assorted bonuses and penalties used by evaluation
   };
 
   // Assorted bonuses and penalties used by evaluation
-  const Score KingOnPawnOne    = S(0 , 64);
-  const Score KingOnPawnMany   = S(0 ,128);
+  const Score KingOnOne        = S(2 , 58);
+  const Score KingOnMany       = S(6 ,125);
   const Score RookOnPawn       = S(10, 28);
   const Score RookOpenFile     = S(43, 21);
   const Score RookSemiOpenFile = S(19, 10);
   const Score RookOnPawn       = S(10, 28);
   const Score RookOpenFile     = S(43, 21);
   const Score RookSemiOpenFile = S(19, 10);
@@ -530,9 +530,9 @@ namespace {
         if (b)
             score += more_than_one(b) ? Hanging * popcount<Max15>(b) : Hanging;
 
         if (b)
             score += more_than_one(b) ? Hanging * popcount<Max15>(b) : Hanging;
 
-        b = weakEnemies & pos.pieces(Them, PAWN) & ei.attackedBy[Us][KING];
+        b = weakEnemies & ei.attackedBy[Us][KING];
         if (b)
         if (b)
-            score += more_than_one(b) ? KingOnPawnMany : KingOnPawnOne;
+            score += more_than_one(b) ? KingOnMany : KingOnOne;
     }
 
     if (Trace)
     }
 
     if (Trace)