diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 8a21b0bb5b2..7ecc06aa0f1 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -101,7 +101,7 @@ namespace { // MobilityBonus[PieceType-2][attacked] contains bonuses for middle and end game, // indexed by piece type and number of attacked squares in the mobility area. - constexpr Score MobilityBonus[][32] = { + Score MobilityBonus[][32] = { { S(-62,-81), S(-53,-56), S(-12,-30), S( -4,-14), S( 3, 8), S( 13, 15), // Knights S( 22, 23), S( 28, 27), S( 33, 33) }, { S(-48,-59), S(-20,-23), S( 16, -3), S( 26, 13), S( 38, 24), S( 51, 42), // Bishops @@ -117,6 +117,8 @@ namespace { S(106,184), S(109,191), S(113,206), S(116,212) } }; + TUNE(SetRange(-150, 150), MobilityBonus[KNIGHT - 2]); + // Outpost[knight/bishop][supported by pawn] contains bonuses for minor // pieces if they occupy or can reach an outpost square, bigger if that // square is supported by a pawn. diff --git a/src/psqt.cpp b/src/psqt.cpp index 934f98986c2..bc6cbfb4e06 100644 --- a/src/psqt.cpp +++ b/src/psqt.cpp @@ -35,7 +35,7 @@ namespace PSQT { // type on a given square a (middlegame, endgame) score pair is assigned. Table // is defined for files A..D and white side: it is symmetric for black side and // second half of the files. -constexpr Score Bonus[][RANK_NB][int(FILE_NB) / 2] = { +Score Bonus[][RANK_NB][int(FILE_NB) / 2] = { { }, { // Pawn { S( 0, 0), S( 0, 0), S( 0, 0), S( 0, 0) }, @@ -123,4 +123,6 @@ void init() { } } +TUNE(SetRange(-250, 250), Bonus[KNIGHT], init); + } // namespace PSQT