Tweak PSQT for pseudo-kings
authorFabian Fichter <ianfab@users.noreply.github.com>
Fri, 19 Mar 2021 12:09:37 +0000 (13:09 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Fri, 19 Mar 2021 12:09:37 +0000 (13:09 +0100)
extinction STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 495 W: 285 L: 181 D: 29
http://www.variantfishtest.org:6543/tests/view/605300756e23db669974ead6

extinction LTC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 429 W: 253 L: 150 D: 26
http://www.variantfishtest.org:6543/tests/view/605390b36e23db669974eada

atomic STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 3389 W: 1195 L: 1074 D: 1120
http://www.variantfishtest.org:6543/tests/view/605271e06e23db669974eacc

atomic LTC
LLR: 2.94 (-2.94,2.94) [0.00,10.00]
Total: 1599 W: 546 L: 452 D: 601
http://www.variantfishtest.org:6543/tests/view/605390e86e23db669974eade

src/psqt.cpp

index b9090bb..1a2d1ae 100644 (file)
@@ -228,6 +228,7 @@ void init(const Variant* v) {
                                  : pt == KING  ? KingBonus[std::clamp(Rank(r - pawnRank + 1), RANK_1, 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)]
+                                 : pt == COMMONER && v->extinctionValue == -VALUE_MATE && v->extinctionPieceTypes.find(COMMONER) != v->extinctionPieceTypes.end() ? KingBonus[std::clamp(Rank(r - pawnRank + 1), RANK_1, RANK_8)][std::min(f, FILE_D)]
                                  : isSlider    ? make_score(5, 5) * (2 * f + std::max(std::min(r, Rank(v->maxRank - r)), RANK_1) - v->maxFile - 1)
                                  : isPawn      ? make_score(5, 5) * (2 * f - v->maxFile)
                                                : make_score(10, 10) * (1 + isSlowLeaper) * (f + std::max(std::min(r, Rank(v->maxRank - r)), RANK_1) - v->maxFile / 2));