Tweak endgame PSQ score for losers chess
authorFabian Fichter <ianfab@users.noreply.github.com>
Tue, 18 Dec 2018 20:06:21 +0000 (21:06 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Wed, 19 Dec 2018 09:57:12 +0000 (10:57 +0100)
losers STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 450 W: 262 L: 159 D: 29
http://35.161.250.236:6543/tests/view/5c1954486e23db24728955b9

losers LTC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 345 W: 209 L: 109 D: 27
http://35.161.250.236:6543/tests/view/5c197ea96e23db24728955cd

src/evaluate.cpp

index 5826d12..fcd53cf 100644 (file)
@@ -992,9 +992,10 @@ namespace {
     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())
-        || pos.bare_king_value() == VALUE_MATE)
+           && pos.extinction_piece_types().find(ALL_PIECES) != pos.extinction_piece_types().end()))
         score = -score / 4;
+    else if (pos.bare_king_value() == VALUE_MATE)
+        score = make_score(-mg_value(score) / 4, -eg_value(score) / 8);
     if (T)
         Trace::add(MATERIAL, score);
     score += me->imbalance() + pos.this_thread()->contempt;