From: Fabian Fichter Date: Thu, 18 Oct 2018 21:49:33 +0000 (+0200) Subject: Smoothen PSQTs for large boards X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=66ea9f2ad2dfbca708615c440d387b97c4bebd77;p=fairystockfish.git Smoothen PSQTs for large boards shogi ELO: 36.62 +-47.5 (95%) LOS: 93.7% Total: 200 W: 106 L: 85 D: 9 No functional change for board sizes <= 8x8. --- diff --git a/src/psqt.cpp b/src/psqt.cpp index c646508..82544cb 100644 --- a/src/psqt.cpp +++ b/src/psqt.cpp @@ -128,7 +128,7 @@ void init() { for (Square s = SQ_A1; s <= SQ_MAX; ++s) { File f = std::min(file_of(s), ~file_of(s)); - psq[ pc][ s] = score + (pt == KING ? KingBonus[rank_of(s)][f] : Bonus[pc][rank_of(s)][f]); + psq[ pc][ s] = score + (pt == KING ? KingBonus[std::min(rank_of(s), RANK_8)][std::min(f, FILE_D)] : Bonus[pc][std::min(rank_of(s), RANK_8)][std::min(f, FILE_D)]); psq[~pc][~s] = -psq[pc][s]; } // pieces in pocket