Blocked pawns in CTF bonus
authorFabian Fichter <ianfab@users.noreply.github.com>
Sun, 14 Jun 2020 17:33:00 +0000 (19:33 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Sun, 14 Jun 2020 17:33:00 +0000 (19:33 +0200)
kingofthehill STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 3352 W: 1506 L: 1369 D: 477
http://www.variantfishtest.org:6543/tests/view/5ee3f28a6e23db104fb88b00

kingofthehill LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 839 W: 403 L: 303 D: 133
http://www.variantfishtest.org:6543/tests/view/5ee63d316e23db104fb88ba8

src/evaluate.cpp

index b2d6d99..262d83b 100644 (file)
@@ -928,6 +928,7 @@ namespace {
         Bitboard doubleBlocked =  attackedBy2[Them]
                                 | (pos.pieces(Us, PAWN) & (shift<Down>(pos.pieces()) | attackedBy[Them][ALL_PIECES]))
                                 | (pawn_attacks_bb<Them>(pos.pieces(Them, PAWN) & pe->pawn_attacks(Them)));
+        Bitboard inaccessible = pos.pieces(Us, PAWN) & shift<Down>(pos.pieces(Them, PAWN));
         // Traverse all paths of the CTF pieces to the CTF targets.
         // Put squares that are attacked or occupied on hold for one iteration.
         for (int dist = 0; (ctfPieces || onHold || onHold2) && (ctfTargets & ~processed); dist++)
@@ -947,7 +948,7 @@ namespace {
                                     | (PseudoMoves[Us][ptCtf][s] & ~pos.pieces())) & ~processed & pos.board_bb();
                 ctfPieces |= attacks & ~blocked;
                 onHold |= attacks & ~doubleBlocked;
-                onHold2 |= attacks;
+                onHold2 |= attacks & ~inaccessible;
             }
         }
     }