Double pawn evaluation for horde chess
authorFabian Fichter <ianfab@users.noreply.github.com>
Mon, 15 Apr 2019 18:04:32 +0000 (20:04 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Mon, 15 Apr 2019 18:04:32 +0000 (20:04 +0200)
horde STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 512 W: 310 L: 200 D: 2
http://35.161.250.236:6543/tests/view/5cb375166e23db76ed25270b

horde LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 372 W: 238 L: 131 D: 3
http://35.161.250.236:6543/tests/view/5cb392e06e23db76ed252717

giveaway STC
LLR: 2.97 (-2.94,2.94) [-10.00,5.00]
Total: 1388 W: 567 L: 520 D: 301
http://35.161.250.236:6543/tests/view/5cb38d356e23db76ed252713

kinglet STC
LLR: 2.96 (-2.94,2.94) [-10.00,5.00]
Total: 1412 W: 645 L: 594 D: 173
http://35.161.250.236:6543/tests/view/5cb398846e23db76ed252719

extinction STC (failed)
LLR: -2.96 (-2.94,2.94) [-10.00,5.00]
Total: 5129 W: 2307 L: 2407 D: 415
http://35.161.250.236:6543/tests/view/5cb38d486e23db76ed252715

src/pawns.cpp

index 0aa8027..22be218 100644 (file)
@@ -146,6 +146,10 @@ namespace {
             score -= Doubled;
     }
 
+    // Double pawn evaluation if there are no non-pawn pieces
+    if (pos.count<ALL_PIECES>(Us) == pos.count<PAWN>(Us))
+        score = score * 2;
+
     const Square* pl_shogi = pos.squares<SHOGI_PAWN>(Us);
 
     ourPawns   = pos.pieces(Us,   SHOGI_PAWN);