Tweak piece values for drop games
authorFabian Fichter <ianfab@users.noreply.github.com>
Sun, 17 Feb 2019 12:34:56 +0000 (13:34 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Sun, 17 Feb 2019 12:34:56 +0000 (13:34 +0100)
Decrease value of strong pieces for drop games and games where checks are prohibited.

crazyhouse STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 1687 W: 883 L: 759 D: 45
http://35.161.250.236:6543/tests/view/5c6723ee6e23db07348e86aa

crazyhouse LTC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 1096 W: 586 L: 471 D: 39
http://35.161.250.236:6543/tests/view/5c6745716e23db07348e86af

racingkings STC
LLR: 7.35 (-2.94,2.94) [0.00,10.00]
Total: 17215 W: 6182 L: 5762 D: 5271
http://35.161.250.236:6543/tests/view/5c6724056e23db07348e86ad

racingkings LTC
LLR: 2.98 (-2.94,2.94) [-10.00,5.00]
Total: 1634 W: 527 L: 487 D: 620
http://35.161.250.236:6543/tests/view/5c67d4776e23db07348e86b5

shogi
LLR: 3.00 (-2.94,2.94) [-10.00,5.00]
Total: 1066 W: 548 L: 488 D: 30

minishogi
LLR: 2.95 (-2.94,2.94) [-10.00,5.00]
Total: 1126 W: 591 L: 531 D: 4

src/psqt.cpp

index 653bc08..78331c9 100644 (file)
@@ -128,7 +128,8 @@ void init(const Variant* v) {
 
       // For drop variants, halve the piece values
       if (v->capturesToHand || !v->checking)
-          score = score / 2;
+          score = make_score(mg_value(score) * int(MidgameLimit / 2) / (MidgameLimit + mg_value(score)),
+                             eg_value(score) * int(MidgameLimit / 2) / (MidgameLimit + eg_value(score)));
 
       // For antichess variants, use negative piece values
       if (   v->extinctionValue == VALUE_MATE