Tweak connected bonus for horde chess
authorFabian Fichter <ianfab@users.noreply.github.com>
Fri, 24 May 2019 17:55:16 +0000 (19:55 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Sat, 25 May 2019 13:51:04 +0000 (15:51 +0200)
horde STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 443 W: 273 L: 165 D: 5
http://35.161.250.236:6543/tests/view/5ce8fc696e23db34f4206b38

horde LTC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 394 W: 250 L: 142 D: 2
http://35.161.250.236:6543/tests/view/5ce914f66e23db34f4206b3b

src/pawns.cpp

index 2acdf0b..921e53b 100644 (file)
@@ -130,6 +130,8 @@ namespace {
         if (support | phalanx)
         {
             int v = (phalanx ? 3 : 2) * Connected[r];
+            if (r >= RANK_4 && pos.count<PAWN>(Us) > popcount(pos.board_bb()) / 4)
+                v = std::max(v, popcount(support | phalanx) * 100);
             v = 17 * popcount(support) + (v >> (opposed + 1));
             score += make_score(v, v * (r - 2) / 4);
         }