]> git.sesse.net Git - stockfish/commitdiff
Reduce penalty for doubled pawns further away from each other
authorGary Linscott <glinscott@gmail.com>
Fri, 11 Apr 2014 15:04:48 +0000 (11:04 -0400)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 12 Apr 2014 05:05:02 +0000 (07:05 +0200)
Passed both STC
LLR: 2.96 (-2.94,2.94) [-1.50,4.50]
Total: 38339 W: 6849 L: 6649 D: 24841

and LTC
LLR: 2.95 (-2.94,2.94) [0.00,6.00]
Total: 22693 W: 3455 L: 3256 D: 15982

bench: 7508468

src/pawns.cpp

index 1e62557784199b1a4a135ef796d93bd053233762..6d90f6b5858f9fb314a8f2bf61092a7ef7142a23 100644 (file)
@@ -89,10 +89,10 @@ namespace {
     const Square Right = (Us == WHITE ? DELTA_NE : DELTA_SW);
     const Square Left  = (Us == WHITE ? DELTA_NW : DELTA_SE);
 
     const Square Right = (Us == WHITE ? DELTA_NE : DELTA_SW);
     const Square Left  = (Us == WHITE ? DELTA_NW : DELTA_SE);
 
-    Bitboard b, p;
+    Bitboard b, p, doubled;
     Square s;
     File f;
     Square s;
     File f;
-    bool passed, isolated, doubled, opposed, connected, backward, candidate, unsupported;
+    bool passed, isolated, opposed, connected, backward, candidate, unsupported;
     Score value = SCORE_ZERO;
     const Square* pl = pos.list<PAWN>(Us);
 
     Score value = SCORE_ZERO;
     const Square* pl = pos.list<PAWN>(Us);
 
@@ -177,7 +177,7 @@ namespace {
             value -= UnsupportedPawnPenalty;
 
         if (doubled)
             value -= UnsupportedPawnPenalty;
 
         if (doubled)
-            value -= Doubled[f];
+            value -= Doubled[f] / rank_distance(s, lsb(doubled));
 
         if (backward)
             value -= Backward[opposed][f];
 
         if (backward)
             value -= Backward[opposed][f];