Bonus for safe CTF squares
authorFabian Fichter <ianfab@users.noreply.github.com>
Tue, 13 Aug 2019 18:17:41 +0000 (20:17 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Thu, 15 Aug 2019 22:33:33 +0000 (00:33 +0200)
kingofthehill STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 2289 W: 1043 L: 921 D: 325
http://35.161.250.236:6543/tests/view/5d52ff166e23db34f4206d8e

kingofthehill STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 4480 W: 1967 L: 1815 D: 698
http://35.161.250.236:6543/tests/view/5d5307c46e23db34f4206d91

src/evaluate.cpp

index 082194e..08ab3c5 100644 (file)
@@ -861,6 +861,9 @@ namespace {
     int weight = pos.count<ALL_PIECES>(Us) - 1;
     Score score = make_score(bonus * weight * weight / 16, 0);
 
+    if (pos.capture_the_flag(Us))
+        score += make_score(200, 200) * popcount(behind & safe & pos.capture_the_flag(Us));
+
     if (T)
         Trace::add(SPACE, Us, score);