From: Fabian Fichter Date: Sat, 30 May 2020 15:27:16 +0000 (+0200) Subject: Invert losing chess threat bonus X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=c4efab8ddc68a5eccc497084dd80bde6fb995cdb;p=fairystockfish.git Invert losing chess threat bonus giveaway STC LLR: 2.96 (-2.94,2.94) [0.00,10.00] Total: 162 W: 111 L: 25 D: 26 http://www.variantfishtest.org:6543/tests/view/5ed184f66e23db36d55f2c7b giveaway LTC LLR: 2.95 (-2.94,2.94) [0.00,10.00] Total: 185 W: 121 L: 34 D: 30 http://www.variantfishtest.org:6543/tests/view/5ed20bc76e23db36d55f2c88 losers STC LLR: 2.95 (-2.94,2.94) [0.00,10.00] Total: 297 W: 183 L: 86 D: 28 http://www.variantfishtest.org:6543/tests/view/5ed1850e6e23db36d55f2c7e losers LTC LLR: 2.97 (-2.94,2.94) [0.00,10.00] Total: 644 W: 338 L: 236 D: 70 http://www.variantfishtest.org:6543/tests/view/5ed20bd16e23db36d55f2c8a --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index d26fb11..9763547 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -622,7 +622,8 @@ namespace { if (pos.must_capture()) { // Penalties for possible captures - score -= make_score(100, 100) * popcount(attackedBy[Us][ALL_PIECES] & pos.pieces(Them)); + if (attackedBy[Us][ALL_PIECES] & pos.pieces(Them)) + score -= make_score(1000, 1000) / popcount(attackedBy[Us][ALL_PIECES] & pos.pieces(Them)); // Bonus if we threaten to force captures Bitboard moves = 0, piecebb = pos.pieces(Us);