Increase king danger for drop variants
authorFabian Fichter <ianfab@users.noreply.github.com>
Fri, 9 Aug 2019 16:46:17 +0000 (18:46 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Tue, 13 Aug 2019 17:32:04 +0000 (19:32 +0200)
crazyhouse STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 2010 W: 1043 L: 914 D: 53
http://35.161.250.236:6543/tests/view/5d4da3906e23db34f4206d69

crazyhouse LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 2902 W: 1473 L: 1332 D: 97
http://35.161.250.236:6543/tests/view/5d4da5e16e23db34f4206d6c

src/evaluate.cpp

index 573b7f9..082194e 100644 (file)
@@ -543,7 +543,7 @@ namespace {
     int kingFlankAttacks = popcount(b1) + popcount(b2);
 
     kingDanger +=        kingAttackersCount[Them] * kingAttackersWeight[Them]
-                 + 69  * kingAttacksCount[Them] * (1 + 4 * !!pos.max_check_count())
+                 + 69  * kingAttacksCount[Them] * (2 + 8 * !!pos.max_check_count() + pos.captures_to_hand()) / 2
                  + 185 * popcount(kingRing[Us] & weak) * (1 + pos.captures_to_hand() + !!pos.max_check_count())
                  - 100 * bool(attackedBy[Us][KNIGHT] & attackedBy[Us][KING])
                  -  35 * bool(attackedBy[Us][BISHOP] & attackedBy[Us][KING])