]> git.sesse.net Git - stockfish/commitdiff
Passed pawn bonus simplification
authormbootsector <mbootsector@gmail.com>
Thu, 25 Feb 2016 22:59:16 +0000 (23:59 +0100)
committerJoona Kiiski <joona@zoox.com>
Wed, 2 Mar 2016 19:10:56 +0000 (19:10 +0000)
STC: (yellow)

LLR: -2.96 (-2.94,2.94) [0.00,4.00]
Total: 86114 W: 16063 L: 15921 D: 54130

LTC:

LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 14347 W: 2025 L: 1896 D: 10426

Bench: 8576437

Resolves #595

src/evaluate.cpp

index e8d3834343bc33215357310f3eedf304dce62260..c0e94cdacd4caf76b9a9c88f36dcd23aae8f2024 100644 (file)
@@ -168,7 +168,7 @@ namespace {
   // Passed[mg/eg][Rank] contains midgame and endgame bonuses for passed pawns.
   // We don't use a Score because we process the two components independently.
   const Value Passed[][RANK_NB] = {
   // Passed[mg/eg][Rank] contains midgame and endgame bonuses for passed pawns.
   // We don't use a Score because we process the two components independently.
   const Value Passed[][RANK_NB] = {
-    { V(0), V( 1), V(26), V(68), V(161), V(247) },
+    { V(5), V( 5), V(31), V(73), V(166), V(252) },
     { V(7), V(14), V(38), V(64), V(137), V(193) }
   };
 
     { V(7), V(14), V(38), V(64), V(137), V(193) }
   };
 
@@ -615,10 +615,10 @@ namespace {
                 else if (defendedSquares & blockSq)
                     k += 4;
 
                 else if (defendedSquares & blockSq)
                     k += 4;
 
-                mbonus += k * rr * 3 / 4, ebonus += k * rr;
+                mbonus += k * rr, ebonus += k * rr;
             }
             else if (pos.pieces(Us) & blockSq)
             }
             else if (pos.pieces(Us) & blockSq)
-                mbonus += (rr * 3 + r * 2 + 3) * 3 / 4, ebonus += rr + r * 2;
+                mbonus += rr + r * 2, ebonus += rr + r * 2;
         } // rr != 0
 
         if (pos.count<PAWN>(Us) < pos.count<PAWN>(Them))
         } // rr != 0
 
         if (pos.count<PAWN>(Us) < pos.count<PAWN>(Them))