From: Fabian Fichter Date: Thu, 23 Jan 2020 18:25:59 +0000 (+0100) Subject: Speed-up for CTF variants X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=645590b4ba6af4476dbaa0ce7db42cd92ad8af32;p=fairystockfish.git 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 --- 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); }