From 645590b4ba6af4476dbaa0ce7db42cd92ad8af32 Mon Sep 17 00:00:00 2001 From: Fabian Fichter Date: Thu, 23 Jan 2020 19:25:59 +0100 Subject: [PATCH] Speed-up for CTF variants racingkings STC LLR: 2.95 (-2.94,2.94) [0.00,10.00] Total: 576 W: 235 L: 151 D: 190 http://www.variantfishtest.org:6543/tests/view/5e28c2806e23db46beba4cc8 kingofthehill STC LLR: 2.95 (-2.94,2.94) [0.00,10.00] Total: 842 W: 410 L: 309 D: 123 http://www.variantfishtest.org:6543/tests/view/5e28c2726e23db46beba4cc5 --- src/evaluate.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/evaluate.cpp b/src/evaluate.cpp index e552fe0..86f383a 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -892,7 +892,7 @@ namespace { { Square s2 = pop_lsb(&target_squares); int dist = distance(s1, s2) - + (isKingCTF ? popcount(pos.attackers_to(s2) & pos.pieces(Them)) : 0) + + (isKingCTF ? popcount(pos.attackers_to(s2, Them)) : 0) + !!(pos.pieces(Us) & s2); score += make_score(2500, 2500) / (1 + scale * dist * dist); } -- 1.7.0.4