Tweak threat evaluation for antichess variants
authorFabian Fichter <ianfab@users.noreply.github.com>
Tue, 18 Dec 2018 21:33:04 +0000 (22:33 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Tue, 18 Dec 2018 21:33:04 +0000 (22:33 +0100)
giveaway STC
LLR: 2.98 (-2.94,2.94) [0.00,10.00]
Total: 921 W: 372 L: 280 D: 269
http://35.161.250.236:6543/tests/view/5c1666936e23db24728955a5

losers STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 1753 W: 826 L: 710 D: 217
http://35.161.250.236:6543/tests/view/5c1666a66e23db24728955a8

src/evaluate.cpp

index 226272b..3d3b068 100644 (file)
@@ -578,7 +578,8 @@ namespace {
             if (type_of(pos.piece_on(s)) != KING)
                 moves |= pos.moves_from(Us, type_of(pos.piece_on(s)), s);
         }
-        score += make_score(300, 300) * popcount(attackedBy[Them][ALL_PIECES] & moves & ~pos.pieces());
+        score += make_score(200, 200) * popcount(attackedBy[Them][ALL_PIECES] & moves & ~pos.pieces());
+        score += make_score(200, 200) * popcount(attackedBy[Them][ALL_PIECES] & moves & ~pos.pieces() & ~attackedBy2[Us]);
     }
 
     // Non-pawn enemies