From: Fabian Fichter Date: Tue, 18 Dec 2018 23:41:24 +0000 (+0100) Subject: Decrease passed pawn bonus for antichess variants X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=294398c0470c30b1e2954faa8e961e9817e00f89;p=fairystockfish.git Decrease passed pawn bonus for antichess variants giveaway STC LLR: 2.97 (-2.94,2.94) [0.00,10.00] Total: 343 W: 166 L: 82 D: 95 http://35.161.250.236:6543/tests/view/5c1792fc6e23db24728955ae giveaway LTC LLR: 2.96 (-2.94,2.94) [0.00,10.00] Total: 555 W: 219 L: 137 D: 199 http://35.161.250.236:6543/tests/view/5c1950cb6e23db24728955b4 --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 3d3b068..5826d12 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -718,13 +718,17 @@ namespace { { Square blockSq = s + Up; - // Adjust bonus based on the king's proximity - bonus += make_score(0, ( king_proximity(Them, blockSq) * 5 - - king_proximity(Us, blockSq) * 2) * w); + // Skip bonus for antichess variants + if (pos.extinction_value() != VALUE_MATE) + { + // Adjust bonus based on the king's proximity + bonus += make_score(0, ( king_proximity(Them, blockSq) * 5 + - king_proximity(Us, blockSq) * 2) * w); - // If blockSq is not the queening square then consider also a second push - if (r != RANK_7) - bonus -= make_score(0, king_proximity(Us, blockSq + Up) * w); + // If blockSq is not the queening square then consider also a second push + if (r != RANK_7) + bonus -= make_score(0, king_proximity(Us, blockSq + Up) * w); + } // If the pawn is free to advance, then increase the bonus if (pos.empty(blockSq))