Increase close enemies penalty
authorianfab <ianfab@users.noreply.github.com>
Sat, 25 Aug 2018 17:37:58 +0000 (19:37 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Sun, 2 Sep 2018 15:51:54 +0000 (17:51 +0200)
For drop and nCheck variants, increase close enemies penalty.

STC 3check
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 1504 W: 762 L: 644 D: 98
http://35.161.250.236:6543/tests/view/5b8194426e23db0fbab0dce0

STC crazyhouse
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 3254 W: 1665 L: 1518 D: 71
http://35.161.250.236:6543/tests/view/5b81942c6e23db0fbab0dcdd

src/evaluate.cpp

index cc6d0ba..b78ab09 100644 (file)
@@ -514,7 +514,7 @@ namespace {
     b2 = b1 & attackedBy2[Them] & ~attackedBy[Us][PAWN];
 
     // King tropism, to anticipate slow motion attacks on our king
-    score -= CloseEnemies * (popcount(b1) + popcount(b2));
+    score -= CloseEnemies * (popcount(b1) + popcount(b2)) * (1 + pos.captures_to_hand() + !!pos.max_check_count());
 
     if (T)
         Trace::add(KING, Us, score);