Increase endgame king danger for xiangqi
authorFabian Fichter <ianfab@users.noreply.github.com>
Thu, 21 Nov 2019 22:40:14 +0000 (23:40 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Thu, 21 Nov 2019 22:40:14 +0000 (23:40 +0100)
minixiangqi
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 508 W: 233 L: 145 D: 130

xiangqi
LLR: 0.25 (-2.94,2.94) [0.00,10.00]
Total: 2000 W: 602 L: 572 D: 826

src/evaluate.cpp

index d993d2b..85a4c38 100644 (file)
@@ -578,7 +578,7 @@ namespace {
     // Penalty if king flank is under attack, potentially moving toward the king
     score -= FlankAttacks * kingFlankAttack * (1 + 5 * pos.captures_to_hand() + pos.check_counting());
 
-    if (pos.check_counting())
+    if (pos.check_counting() || pos.xiangqi_general())
         score += make_score(0, mg_value(score) / 2);
 
     // For drop games, king danger is independent of game phase