From: Fabian Fichter Date: Sun, 28 Jul 2019 15:11:27 +0000 (+0200) Subject: Increase king danger for nCheck endgames X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=0f1a6eb72127971aaf8dfc85de3080285dceb91e;p=fairystockfish.git Increase king danger for nCheck endgames 3check STC LLR: 2.96 (-2.94,2.94) [0.00,10.00] Total: 1085 W: 569 L: 456 D: 60 http://35.161.250.236:6543/tests/view/5d3dcc106e23db34f4206d19 3check LTC LLR: 2.94 (-2.94,2.94) [0.00,10.00] Total: 1107 W: 587 L: 473 D: 47 http://35.161.250.236:6543/tests/view/5d3de4a46e23db34f4206d1e --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 95174d7..c469a85 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -566,6 +566,9 @@ namespace { // King tropism bonus, to anticipate slow motion attacks on our king score -= FlankAttacks * kingFlankAttacks * (1 + 5 * pos.captures_to_hand() + !!pos.max_check_count()); + if (pos.max_check_count()) + score += make_score(0, mg_value(score) / 2); + // For drop games, king danger is independent of game phase if (pos.captures_to_hand()) score = make_score(mg_value(score), mg_value(score)) / (1 + !pos.shogi_doubled_pawn());