From: Fabian Fichter Date: Wed, 28 Nov 2018 13:59:38 +0000 (+0100) Subject: Bonus for threats by shogi pawns X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=cb02d7488453b7fc51acb38d7bdd9195be50831e;p=fairystockfish.git Bonus for threats by shogi pawns shogi LLR: 2.97 (-2.94,2.94) [0.00,10.00] Total: 1510 W: 787 L: 666 D: 57 minishogi LLR: 2.96 (-2.94,2.94) [-10.00,5.00] Total: 1544 W: 744 L: 691 D: 109 --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 673ecb4..e79b8f1 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -620,7 +620,7 @@ namespace { b = pos.pieces(Us, PAWN) & (~attackedBy[Them][ALL_PIECES] | attackedBy[Us][ALL_PIECES]); - safeThreats = pawn_attacks_bb(b) & nonPawnEnemies; + safeThreats = (pawn_attacks_bb(b) | shift(pos.pieces(Us, SHOGI_PAWN))) & nonPawnEnemies; score += ThreatBySafePawn * popcount(safeThreats); // Find squares where our pawns can push on the next move