Use knight PSQT for horse
authorFabian Fichter <ianfab@users.noreply.github.com>
Fri, 15 May 2020 19:06:28 +0000 (21:06 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Fri, 15 May 2020 19:06:28 +0000 (21:06 +0200)
xiangqi
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 994 W: 329 L: 245 D: 420

janggi
Total: 1000 W: 431 L: 445 D: 124

src/psqt.cpp
src/types.h

index 23edde7..e78a231 100644 (file)
@@ -193,6 +193,7 @@ void init(const Variant* v) {
           psq[ pc][ s] = score + (  pt == PAWN  ? PBonus[std::min(r, RANK_8)][std::min(file_of(s), FILE_H)]
                                   : pt == KING  ? KingBonus[std::min(r, RANK_8)][std::min(f, FILE_D)] * (1 + v->capturesToHand)
                                   : pt <= QUEEN ? Bonus[pc][std::min(r, RANK_8)][std::min(f, FILE_D)]
+                                  : pt == HORSE ? Bonus[KNIGHT][std::min(r, RANK_8)][std::min(f, FILE_D)]
                                                 : make_score(5, 5) * (2 * f + std::max(std::min(r, Rank(v->maxRank - r)), RANK_1) - 8));
           if (pt == SOLDIER && r < v->soldierPromotionRank)
               psq[pc][s] -= score * (v->soldierPromotionRank - r) / (4 + f);
index 31a97ae..8702e74 100644 (file)
@@ -344,7 +344,7 @@ enum Value : int {
   CannonPieceValueMg       = 800,   CannonPieceValueEg       = 700,
   JanggiCannonPieceValueMg = 800,   JanggiCannonPieceValueEg = 600,
   SoldierValueMg           = 200,   SoldierValueEg           = 270,
-  HorseValueMg             = 500,   HorseValueEg             = 800,
+  HorseValueMg             = 520,   HorseValueEg             = 800,
   ElephantValueMg          = 300,   ElephantValueEg          = 300,
   JanggiElephantValueMg    = 340,   JanggiElephantValueEg    = 350,
   BannerValueMg            = 3400,  BannerValueEg            = 3500,