Cover all paths in CTF bonus
authorFabian Fichter <ianfab@users.noreply.github.com>
Wed, 15 Apr 2020 15:20:47 +0000 (17:20 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Wed, 15 Apr 2020 15:20:47 +0000 (17:20 +0200)
racingkings STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 748 W: 283 L: 198 D: 267
http://www.variantfishtest.org:6543/tests/view/5e95e2ff6e23db4f73614caf

racingkings LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 1801 W: 565 L: 472 D: 764
http://www.variantfishtest.org:6543/tests/view/5e9600cd6e23db4f73614cc3

src/evaluate.cpp

index f478716..5f9bfce 100644 (file)
@@ -912,7 +912,7 @@ namespace {
         Bitboard processed = 0;
         // Traverse all paths of the CTF pieces to the CTF targets.
         // Put squares that are attacked or occupied on hold for one iteration.
-        for (int dist = 0; ctfPieces && (ctfTargets & ~processed); dist++)
+        for (int dist = 0; (ctfPieces || onHold) && (ctfTargets & ~processed); dist++)
         {
             score += make_score(2500, 2500) * popcount(ctfTargets & ctfPieces) / (1 + dist * dist);
             Bitboard current = ctfPieces;