Tweak scaling of passed pawn evaluation
authorFabian Fichter <ianfab@users.noreply.github.com>
Thu, 11 Apr 2019 18:38:58 +0000 (20:38 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Thu, 11 Apr 2019 18:38:58 +0000 (20:38 +0200)
shatranj STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 4787 W: 590 L: 504 D: 3693
http://35.161.250.236:6543/tests/view/5c8ccad36e23db76ed25260d

shatranj LTC
LLR: 15.68 (-2.94,2.94) [0.00,10.00]
Total: 15959 W: 1537 L: 1169 D: 13253
http://35.161.250.236:6543/tests/view/5c8d69876e23db76ed252610

ELO: 6.25 +-6.4 (95%) LOS: 97.3%
Total: 2000 W: 194 L: 158 D: 1648
http://35.161.250.236:6543/tests/view/5cab9f0d6e23db76ed2526c0

kinglet LTC
ELO: -9.56 +-14.2 (95%) LOS: 9.4%
Total: 2000 W: 846 L: 901 D: 253
http://35.161.250.236:6543/tests/view/5cab9eed6e23db76ed2526be

src/evaluate.cpp

index c91b9e5..48e2c86 100644 (file)
@@ -802,8 +802,8 @@ namespace {
         maxMg = std::max(maxMg, PieceValue[MG][pt]);
         maxEg = std::max(maxEg, PieceValue[EG][pt]);
     }
-    score = make_score(mg_value(score) * int(maxMg) / QueenValueMg,
-                       eg_value(score) * int(maxEg) / QueenValueEg);
+    score = make_score(mg_value(score) * int(maxMg - PawnValueMg) / (QueenValueMg - PawnValueMg),
+                       eg_value(score) * int(maxEg - PawnValueEg) / (QueenValueEg - PawnValueEg));
 
     // Score passed shogi pawns
     const Square* pl = pos.squares(Us, SHOGI_PAWN);