From: Fabian Fichter Date: Tue, 18 Dec 2018 22:09:31 +0000 (+0100) Subject: Unlimited mobility area for losing chess variants X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=e11d07b062afd0dd4d08e1c4bfc37579917bbc67;p=fairystockfish.git Unlimited mobility area for losing chess variants losers STC LLR: 2.97 (-2.94,2.94) [0.00,10.00] Total: 1778 W: 818 L: 703 D: 257 http://35.161.250.236:6543/tests/view/5c1971166e23db24728955cb giveaway STC LLR: -2.98 (-2.94,2.94) [0.00,10.00] Total: 19458 W: 6544 L: 6373 D: 6541 http://35.161.250.236:6543/tests/view/5c1970fc6e23db24728955c8 --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index fcd53cf..c0e7b0d 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -265,7 +265,10 @@ namespace { // Squares occupied by those pawns, by our king or queen, or controlled by enemy pawns // are excluded from the mobility area. - mobilityArea[Us] = ~(b | pos.pieces(Us, KING, QUEEN) | pe->pawn_attacks(Them) | shift(pos.pieces(Them, SHOGI_PAWN))); + if (pos.must_capture()) + mobilityArea[Us] = AllSquares; + else + mobilityArea[Us] = ~(b | pos.pieces(Us, KING, QUEEN) | pe->pawn_attacks(Them) | shift(pos.pieces(Them, SHOGI_PAWN))); // Initialise attackedBy bitboards for kings and pawns attackedBy[Us][KING] = pos.count(Us) ? pos.attacks_from(Us, pos.square(Us)) : 0;