]> git.sesse.net Git - stockfish/commitdiff
Sync with master
authorMarco Costalba <mcostalba@gmail.com>
Sun, 22 Feb 2015 13:19:12 +0000 (14:19 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 22 Feb 2015 13:20:23 +0000 (14:20 +0100)
bench: 8253813

src/evaluate.cpp
src/pawns.cpp

index 6c46cb4b78e3d393142738a37449e11c7e02f012..1593a68ca67a2e8cabc23fbd25e1d41b3c6c1e4f 100644 (file)
@@ -61,11 +61,11 @@ namespace {
     // KingAttackWeights array.
     int kingAttackersWeight[COLOR_NB];
 
-    // kingAdjacentZoneAttacksCount[color] is the number of attacks to squares
-    // directly adjacent to the king of the given color. Pieces which attack
-    // more than one square are counted multiple times. For instance, if black's
-    // king is on g8 and there's a white knight on g5, this knight adds
-    // 2 to kingAdjacentZoneAttacksCount[BLACK].
+    // kingAdjacentZoneAttacksCount[color] is the number of attacks by the given
+    // color to squares directly adjacent to the enemy king. Pieces which attack
+    // more than one square are counted multiple times. For instance, if there is
+    // a white knight on g5 and black's king is on g8, this white knight adds 2
+    // to kingAdjacentZoneAttacksCount[WHITE].
     int kingAdjacentZoneAttacksCount[COLOR_NB];
 
     Bitboard pinnedPieces[COLOR_NB];
@@ -162,7 +162,7 @@ namespace {
   const Score Unstoppable        = S( 0, 20);
   const Score Hanging            = S(31, 26);
   const Score PawnAttackThreat   = S(20, 20);
-  const Score PawnSafePush       = S( 5 , 5);
+  const Score PawnSafePush       = S( 5 5);
 
   // Penalty for a bishop on a1/h1 (a8/h8 for black) which is trapped by
   // a friendly pawn on b2/g2 (b7/g7 for black). This can obviously only
index d66233caa3f876da9ef8ffb9fe718e6350c4f819..41c9e15d16247d6e27762add2b08f45658c24162 100644 (file)
@@ -227,7 +227,8 @@ void init()
           for (Rank r = RANK_2; r < RANK_8; ++r)
           {
               int bonus = Seed[r] + (phalanx ? (Seed[r + 1] - Seed[r]) / 2 : 0);
-              Connected[opposed][phalanx][r] = make_score(bonus / 2, bonus >> opposed);
+              bonus >>= opposed;
+              Connected[opposed][phalanx][r] = make_score( 3 * bonus / 2, bonus);
           }
 }