Tweak piece values for variants without checks
authorFabian Fichter <ianfab@users.noreply.github.com>
Sat, 1 Sep 2018 09:25:45 +0000 (11:25 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Mon, 3 Sep 2018 18:47:32 +0000 (20:47 +0200)
STC racingkings
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 349 W: 211 L: 111 D: 27
http://35.161.250.236:6543/tests/view/5b8a5c926e23db0fbab0dd13

src/evaluate.cpp

index b78ab09..3e2d138 100644 (file)
@@ -926,7 +926,7 @@ namespace {
     // Initialize score by reading the incrementally updated scores included in
     // the position object (material + piece square tables) and the material
     // imbalance. Score is computed internally from the white point of view.
-    Score score = pos.captures_to_hand() ? pos.psq_score() / 2 : pos.psq_score();
+    Score score = pos.captures_to_hand() || !pos.checking_permitted() ? pos.psq_score() / 2 : pos.psq_score();
     // For antichess-like variants, use negative piece values
     if (  (   pos.extinction_value() == VALUE_MATE
            && pos.extinction_piece_types().find(ALL_PIECES) != pos.extinction_piece_types().end())