Consider protected pawns in CTF bonus
authorFabian Fichter <ianfab@users.noreply.github.com>
Sat, 13 Jun 2020 10:50:41 +0000 (12:50 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Sat, 13 Jun 2020 10:50:41 +0000 (12:50 +0200)
kingofthehill STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 1009 W: 485 L: 381 D: 143
http://www.variantfishtest.org:6543/tests/view/5ee3f57f6e23db104fb88b04

kingofthehill LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 772 W: 384 L: 283 D: 105
http://www.variantfishtest.org:6543/tests/view/5ee48b3c6e23db104fb88b09

src/evaluate.cpp

index 675ab8e..f471bb2 100644 (file)
@@ -942,7 +942,7 @@ namespace {
                 Bitboard attacks = (  (PseudoAttacks[Us][ptCtf][s] & pos.pieces())
                                     | (PseudoMoves[Us][ptCtf][s] & ~pos.pieces())) & ~processed & pos.board_bb();
                 ctfPieces |= attacks & ~(pos.pieces(Us, PAWN) | attackedBy[Them][ALL_PIECES]);
-                onHold |= attacks & ~((pos.pieces(Us, PAWN) & (shift<Down>(pos.pieces()) | attackedBy[Them][ALL_PIECES])) | attackedBy2[Them]);
+                onHold |= attacks & ~((pos.pieces(Us, PAWN) & (shift<Down>(pos.pieces()) | attackedBy[Them][ALL_PIECES])) | attackedBy2[Them] | (pawn_attacks_bb<Them>(pos.pieces(Them, PAWN) & pe->pawn_attacks(Them))));
                 onHold2 |= attacks;
             }
         }