Tweak piece values for losing chess variants
authorFabian Fichter <ianfab@users.noreply.github.com>
Wed, 19 Feb 2020 19:07:41 +0000 (20:07 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Wed, 19 Feb 2020 19:07:41 +0000 (20:07 +0100)
giveaway STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 968 W: 416 L: 320 D: 232
http://www.variantfishtest.org:6543/tests/view/5e4c62af6e23db46beba4e49

giveaway STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 808 W: 338 L: 247 D: 223
http://www.variantfishtest.org:6543/tests/view/5e4cdfff6e23db46beba4e60

losers STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 1862 W: 903 L: 783 D: 176
http://www.variantfishtest.org:6543/tests/view/5e4c62c36e23db46beba4e4c

losers LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 3538 W: 1617 L: 1476 D: 445
http://www.variantfishtest.org:6543/tests/view/5e4ce00a6e23db46beba4e62

src/psqt.cpp

index 1f8602f..acb913a 100644 (file)
@@ -159,9 +159,9 @@ void init(const Variant* v) {
       // For antichess variants, use negative piece values
       if (   v->extinctionValue == VALUE_MATE
           && v->extinctionPieceTypes.find(ALL_PIECES) != v->extinctionPieceTypes.end())
-          score = -score / 8;
+          score = -make_score(mg_value(score) / 8, eg_value(score) / 8 / (1 + !pi->sliderCapture.size()));
       else if (v->bareKingValue == VALUE_MATE)
-          score = -score / 8;
+          score = -make_score(mg_value(score) / 8, eg_value(score) / 8 / (1 + !pi->sliderCapture.size()));
 
       for (Square s = SQ_A1; s <= SQ_MAX; ++s)
       {