Tweak king danger for nCheck chess
authorFabian Fichter <ianfab@users.noreply.github.com>
Thu, 24 Jan 2019 19:59:16 +0000 (20:59 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Thu, 24 Jan 2019 19:59:16 +0000 (20:59 +0100)
3check STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 523 W: 295 L: 192 D: 36
http://35.161.250.236:6543/tests/view/5c478ad56e23db07348e85f0

3check LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 795 W: 418 L: 312 D: 65
http://35.161.250.236:6543/tests/view/5c487f756e23db07348e85f3

src/evaluate.cpp

index 0062d98..937e734 100644 (file)
@@ -556,7 +556,7 @@ namespace {
         unsafeChecks &= mobilityArea[Them];
 
         kingDanger +=        kingAttackersCount[Them] * kingAttackersWeight[Them]
-                     + 102 * kingAttacksCount[Them] * (1 + pos.captures_to_hand() + !!pos.max_check_count())
+                     + 102 * kingAttacksCount[Them] * (1 + pos.captures_to_hand() + 2 * !!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) || pos.captures_to_hand()) / (1 + !!pos.max_check_count())