Remove blocked shogi pawns from mobility area
authorFabian Fichter <ianfab@users.noreply.github.com>
Fri, 2 Oct 2020 09:34:06 +0000 (11:34 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Fri, 2 Oct 2020 09:34:06 +0000 (11:34 +0200)
shogi STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 10872 W: 5545 L: 5286 D: 41
http://www.variantfishtest.org:6543/tests/view/5f6253786e23db221d9e91b8

shogi LTC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 17489 W: 8874 L: 8520 D: 95
http://www.variantfishtest.org:6543/tests/view/5f645f406e23db221d9e91c1

src/evaluate.cpp

index 04a57c1..68af824 100644 (file)
@@ -258,6 +258,7 @@ namespace {
         mobilityArea[Us] = AllSquares;
     else
         mobilityArea[Us] = ~(b | pos.pieces(Us, KING, QUEEN) | pos.blockers_for_king(Us) | pe->pawn_attacks(Them)
+                               | (pos.pieces(Us, SHOGI_PAWN) & shift<Down>(pos.pieces(Us)))
                                | shift<Down>(pos.pieces(Them, SHOGI_PAWN, SOLDIER))
                                | shift<EAST>(pos.promoted_soldiers(Them))
                                | shift<WEST>(pos.promoted_soldiers(Them)));