]> git.sesse.net Git - stockfish/commitdiff
Fine tuning of unsupported pawn penalty
authorAlain SAVARD <support@multicim.com>
Sun, 3 Jan 2016 14:15:29 +0000 (14:15 +0000)
committerJoona Kiiski <joona@zoox.com>
Sun, 3 Jan 2016 14:15:29 +0000 (14:15 +0000)
Adjust the unsupported pawn penalty when the pawn is supporting 2 pawns
(for example g7 in f6-g7-h6)

Passed STC
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 23833 W: 4384 L: 4158 D: 15291

Passed LTC
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 42711 W: 5918 L: 5655 D: 31138

Bench: 8390233

Resolves #549

src/pawns.cpp

index 83ff4f28c1b608c3e314c8dfcef83f9ca8fcea1a..52f626f16b5c302c071d64d03f418c817230a0e8 100644 (file)
@@ -42,8 +42,9 @@ namespace {
   // Backward pawn penalty by opposed flag
   const Score Backward[2] = { S(67, 42), S(49, 24) };
   
-  // Unsupported pawn penalty, for pawns which are neither isolated or backward
-  const Score Unsupported = S(20, 10);
+  // Unsupported pawn penalty for pawns which are neither isolated or backward,
+  // by number of pawns it supports [less than 2 / exactly 2].
+  const Score Unsupported[2] = { S(20, 10), S(25, 15) };
 
   // Connected pawn bonus by opposed, phalanx, twice supported and rank
   Score Connected[2][2][2][RANK_NB];
@@ -182,7 +183,7 @@ namespace {
             score -= Backward[opposed];
 
         else if (!supported)
-            score -= Unsupported;
+            score -= Unsupported[more_than_one(neighbours & rank_bb(s + Up))];
 
         if (connected)
             score += Connected[opposed][!!phalanx][more_than_one(supported)][relative_rank(Us, s)];