Increase king danger for drop games and nCheck
authorianfab <ianfab@users.noreply.github.com>
Sat, 28 Jul 2018 14:53:18 +0000 (16:53 +0200)
committerianfab <ianfab@users.noreply.github.com>
Mon, 30 Jul 2018 17:29:35 +0000 (19:29 +0200)
3check STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 229 W: 162 L: 60 D: 7

crazyhouse STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 722 W: 404 L: 294 D: 24

src/evaluate.cpp

index 079b57a..84b0aab 100644 (file)
@@ -486,8 +486,8 @@ namespace {
         unsafeChecks &= mobilityArea[Them];
 
         kingDanger +=        kingAttackersCount[Them] * kingAttackersWeight[Them]
-                     + 102 * kingAttacksCount[Them]
-                     + 191 * popcount(kingRing[Us] & weak)
+                     + 102 * kingAttacksCount[Them] * (1 + pos.captures_to_hand() + !!pos.max_check_count())
+                     + 191 * popcount(kingRing[Us] & weak) * (1 + pos.captures_to_hand() + !!pos.max_check_count())
                      + 143 * popcount(pos.blockers_for_king(Us) | unsafeChecks)
                      - 848 * !pos.count<QUEEN>(Them)
                      -   9 * mg_value(score) / 8