From: Fabian Fichter Date: Sat, 10 Nov 2018 13:19:40 +0000 (+0100) Subject: Tweak evaluation for capture the flag variants X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=8950b5020adb1b207a835e9597bb735d00881af0;p=fairystockfish.git Tweak evaluation for capture the flag variants breakthrough ELO: 269.37 +-44.7 (95%) LOS: 100.0% Total: 400 W: 327 L: 67 D: 6 jesonmor ELO: 338.04 +-110.9 (95%) LOS: 100.0% Total: 100 W: 87 L: 12 D: 1 No functional change for other variants. --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 4ece5f2..4c0a341 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -824,6 +824,7 @@ namespace { { bool isKingCTF = pos.capture_the_flag_piece() == KING; Bitboard ctfPieces = pos.pieces(Us, pos.capture_the_flag_piece()); + int scale = pos.count(Us, pos.capture_the_flag_piece()); while (ctfPieces) { Square s1 = pop_lsb(&ctfPieces); @@ -834,7 +835,7 @@ namespace { int dist = distance(s1, s2) + (isKingCTF ? popcount(pos.attackers_to(s2) & pos.pieces(Them)) : 0) + !!(pos.pieces(Us) & s2); - score += make_score(2500, 2500) / (1 + dist * (!isKingCTF || pos.checking_permitted() ? dist : 1)); + score += make_score(2500, 2500) / (1 + scale * dist * (!isKingCTF || pos.checking_permitted() ? dist : 1)); } } }