]> git.sesse.net Git - stockfish/commitdiff
Simplify space formula
authorAlain SAVARD <support@multicim.com>
Fri, 5 Aug 2016 14:09:22 +0000 (10:09 -0400)
committerMarco Costalba <mcostalba@gmail.com>
Wed, 10 Aug 2016 10:49:24 +0000 (12:49 +0200)
STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 16868 W: 3260 L: 3132 D: 10476

LTC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 16910 W: 2381 L: 2255 D: 12274

bench: 6663531

src/evaluate.cpp

index 489422fc96f163770aa71791f987baa6d4b0a8a4..84a37dfcfe8fd356f189011271e220b2a47fc008 100644 (file)
@@ -703,10 +703,9 @@ namespace {
 
     // ...count safe + (behind & safe) with a single popcount
     int bonus = popcount((Us == WHITE ? safe << 32 : safe >> 32) | (behind & safe));
 
     // ...count safe + (behind & safe) with a single popcount
     int bonus = popcount((Us == WHITE ? safe << 32 : safe >> 32) | (behind & safe));
-    int weight =  pos.count<KNIGHT>(Us) + pos.count<BISHOP>(Us)
-                + pos.count<KNIGHT>(Them) + pos.count<BISHOP>(Them);
+    int weight = pos.count<ALL_PIECES>(Us);
 
 
-    return make_score(bonus * weight * weight * 2 / 11, 0);
+    return make_score(bonus * weight * weight  / 22, 0);
   }
 
 
   }