Tweak horde space bonus
authorFabian Fichter <ianfab@users.noreply.github.com>
Mon, 26 Oct 2020 07:51:30 +0000 (08:51 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Mon, 26 Oct 2020 07:51:30 +0000 (08:51 +0100)
horde STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 464 W: 283 L: 175 D: 6
http://www.variantfishtest.org:6543/tests/view/5f954c276e23db221d9e9394

horde LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 969 W: 540 L: 424 D: 5
http://www.variantfishtest.org:6543/tests/view/5f9574466e23db221d9e9397

src/evaluate.cpp

index 2f3d1fb..f8c6030 100644 (file)
@@ -1059,7 +1059,7 @@ namespace {
 
     if (pawnsOnly)
     {
-        safe = behind & ~attackedBy[Them][ALL_PIECES];
+        safe = pos.board_bb() & ((attackedBy2[Us] & ~attackedBy2[Them]) | (attackedBy[Us][PAWN] & ~pos.pieces(Us, PAWN)));
         behind = 0;
     }
     int bonus = popcount(safe) + popcount(behind & safe & ~attackedBy[Them][ALL_PIECES]);