From: Fabian Fichter Date: Sun, 10 May 2020 08:48:47 +0000 (+0200) Subject: Consider blocked pawns in CTF bonus X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=5dbdebc7a4e9757aa228330062aa1cf0aff7d57e;p=fairystockfish.git Consider blocked pawns in CTF bonus kingofthehill STC LLR: 2.97 (-2.94,2.94) [0.00,10.00] Total: 1552 W: 729 L: 616 D: 207 http://www.variantfishtest.org:6543/tests/view/5eb66c286e23db36d55f2af6 kingofthehill LTC LLR: 2.95 (-2.94,2.94) [0.00,10.00] Total: 1165 W: 530 L: 427 D: 208 http://www.variantfishtest.org:6543/tests/view/5eb6d1a46e23db36d55f2b24 --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 1f9a485..d2209fd 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -902,7 +902,8 @@ namespace { template template Score Evaluation::variant() const { - constexpr Color Them = (Us == WHITE ? BLACK : WHITE); + constexpr Color Them = ~Us; + constexpr Direction Down = pawn_push(Them); Score score = SCORE_ZERO; @@ -933,7 +934,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) & attackedBy[Them][ALL_PIECES]) | attackedBy2[Them]); + onHold |= attacks & ~((pos.pieces(Us, PAWN) & (shift(pos.pieces()) | attackedBy[Them][ALL_PIECES])) | attackedBy2[Them]); onHold2 |= attacks; } }