From: Fabian Fichter Date: Tue, 2 Jun 2020 18:50:44 +0000 (+0200) Subject: Count unsafe captures in antichess threat evaluation X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=5f7542020f2fab3e3f80c63c46f936bec6eadb81;p=fairystockfish.git Count unsafe captures in antichess threat evaluation giveaway STC LLR: 2.95 (-2.94,2.94) [0.00,10.00] Total: 543 W: 258 L: 167 D: 118 http://www.variantfishtest.org:6543/tests/view/5ed2d2266e23db36d55f2cb3 giveaway LTC LLR: 2.95 (-2.94,2.94) [0.00,10.00] Total: 663 W: 280 L: 192 D: 191 http://www.variantfishtest.org:6543/tests/view/5ed3b2ba6e23db36d55f2cd7 losers STC LLR: 2.99 (-2.94,2.94) [-10.00,5.00] Total: 856 W: 407 L: 351 D: 98 http://www.variantfishtest.org:6543/tests/view/5ed393136e23db36d55f2cce losers LTC LLR: 2.98 (-2.94,2.94) [-10.00,5.00] Total: 3105 W: 1364 L: 1325 D: 416 http://www.variantfishtest.org:6543/tests/view/5ed3b2c26e23db36d55f2cd9 --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 6ca09bb..a11be4b 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -621,8 +621,9 @@ namespace { if (pos.must_capture()) { // Penalties for possible captures - if (attackedBy[Us][ALL_PIECES] & pos.pieces(Them)) - score -= make_score(1000, 1000) / popcount(attackedBy[Us][ALL_PIECES] & pos.pieces(Them)); + Bitboard captures = attackedBy[Us][ALL_PIECES] & pos.pieces(Them); + if (captures) + score -= make_score(2000, 2000) / (1 + popcount(captures & attackedBy[Them][ALL_PIECES] & ~attackedBy2[Us])); // Bonus if we threaten to force captures Bitboard moves = 0, piecebb = pos.pieces(Us);