Penalty for isolated shogi pawns
authorFabian Fichter <ianfab@users.noreply.github.com>
Sat, 3 Nov 2018 18:36:41 +0000 (19:36 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Sat, 3 Nov 2018 18:40:55 +0000 (19:40 +0100)
shogi
ELO: 6.95 +-33.2 (95%) LOS: 66.0%
Total: 400 W: 193 L: 185 D: 22

euroshogi
ELO: 20.87 +-33.1 (95%) LOS: 89.3%
Total: 400 W: 200 L: 176 D: 24

minishogi
ELO: 26.11 +-32.9 (95%) LOS: 94.1%
Total: 400 W: 200 L: 170 D: 30

src/pawns.cpp

index 805c816..2ce62e8 100644 (file)
@@ -166,6 +166,9 @@ namespace {
 
         if (phalanx)
             score += Connected[opposed][bool(phalanx)][0][relative_rank(Us, s, pos.max_rank())] / 2;
+
+        else if (!neighbours)
+            score -= Isolated / 2;
     }
 
     return score;