From: Fabian Fichter Date: Thu, 3 Jan 2019 22:22:45 +0000 (+0100) Subject: Simplify king danger for non-standard board sizes X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=2fe931db9d542018b5ffc732b6e2af5dfb97d8fe;p=fairystockfish.git Simplify king danger for non-standard board sizes Turns out to be a big improvement for small board sizes. losalamos LLR: 3.06 (-2.94,2.94) [-10.00,5.00] Total: 56 W: 50 L: 1 D: 5 minishogi LLR: 2.97 (-2.94,2.94) [-10.00,5.00] Total: 104 W: 84 L: 18 D: 2 --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index a1d5839..a607a08 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -555,7 +555,7 @@ namespace { kingDanger += kingAttackersCount[Them] * kingAttackersWeight[Them] + 102 * kingAttacksCount[Them] * (1 + pos.captures_to_hand() + !!pos.max_check_count()) + 191 * popcount(kingRing[Us] & weak) * (1 + pos.captures_to_hand() + !!pos.max_check_count()) - + 143 * popcount(pos.blockers_for_king(Us) | unsafeChecks) * 64 / popcount(pos.board_bb()) + + 143 * popcount(pos.blockers_for_king(Us) | unsafeChecks) - 848 * !(pos.count(Them) || pos.captures_to_hand()) - 9 * mg_value(score) / 8 + 40;