Tweak king danger for knightmate
authorFabian Fichter <ianfab@users.noreply.github.com>
Fri, 10 Apr 2020 13:47:53 +0000 (15:47 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Fri, 10 Apr 2020 13:47:53 +0000 (15:47 +0200)
knightmate STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 5689 W: 1622 L: 1486 D: 2581
http://www.variantfishtest.org:6543/tests/view/5e8f4d286e23db4f73614bd9

knightmate LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 2918 W: 800 L: 699 D: 1419
http://www.variantfishtest.org:6543/tests/view/5e8f6ec76e23db4f73614bdc

src/evaluate.cpp

index a1bf1ee..b59de40 100644 (file)
@@ -569,7 +569,7 @@ namespace {
                  +  69 * kingAttacksCount[Them] * (2 + 8 * pos.check_counting() + pos.captures_to_hand()) / 2
                  +   3 * kingFlankAttack * kingFlankAttack / 8
                  +       mg_value(mobility[Them] - mobility[Us])
-                 - 873 * !(pos.major_pieces(Them) || pos.captures_to_hand() || (pos.king_type() == WAZIR && !pos.diagonal_lines()))
+                 - 873 * !(pos.major_pieces(Them) || pos.captures_to_hand() || (pos.king_type() != KING && !pos.diagonal_lines()))
                        / (1 + pos.check_counting() + pos.two_boards() + pos.makpong())
                  - 100 * bool(attackedBy[Us][KNIGHT] & attackedBy[Us][KING])
                  -   6 * mg_value(score) / 8