From 0f1a6eb72127971aaf8dfc85de3080285dceb91e Mon Sep 17 00:00:00 2001 From: Fabian Fichter Date: Sun, 28 Jul 2019 17:11:27 +0200 Subject: [PATCH] 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 --- src/evaluate.cpp | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) 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()); -- 1.7.0.4