Invert losing chess threat bonus
authorFabian Fichter <ianfab@users.noreply.github.com>
Sat, 30 May 2020 15:27:16 +0000 (17:27 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Sat, 30 May 2020 15:27:16 +0000 (17:27 +0200)
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

src/evaluate.cpp

index d26fb11..9763547 100644 (file)
@@ -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);