Double safe check bonus for nCheck chess
authorFabian Fichter <ianfab@users.noreply.github.com>
Fri, 18 Jan 2019 19:46:15 +0000 (20:46 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Fri, 18 Jan 2019 19:46:15 +0000 (20:46 +0100)
3check STC
LLR: 2.94 (-2.94,2.94) [0.00,10.00]
Total: 1944 W: 961 L: 838 D: 145
http://35.161.250.236:6543/tests/view/5c39dfb76e23db07348e85ac

3check LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 1953 W: 951 L: 829 D: 173
http://35.161.250.236:6543/tests/view/5c39fb726e23db07348e85ae

src/evaluate.cpp

index 7c1784b..fed73da 100644 (file)
@@ -548,6 +548,9 @@ namespace {
             }
         }
 
+        if (pos.max_check_count())
+            kingDanger *= 2;
+
         // Unsafe or occupied checking squares will also be considered, as long as
         // the square is in the attacker's mobility area.
         unsafeChecks &= mobilityArea[Them];