- // Values modified by Joona Kiiski
- const Value MidgameLimit = Value(15581);
- const Value EndgameLimit = Value(3998);
-
- // Scale factors used when one side has no more pawns
- const int NoPawnsSF[4] = { 6, 12, 32 };
-
- // Polynomial material balance parameters
- const Value RedundantQueenPenalty = Value(320);
- const Value RedundantRookPenalty = Value(554);
-
- const int LinearCoefficients[6] = { 1617, -162, -1172, -190, 105, 26 };
-
- const int QuadraticCoefficientsSameColor[][PIECE_TYPE_NB] = {
- { 7, 7, 7, 7, 7, 7 }, { 39, 2, 7, 7, 7, 7 }, { 35, 271, -4, 7, 7, 7 },
- { 7, 25, 4, 7, 7, 7 }, { -27, -2, 46, 100, 56, 7 }, { 58, 29, 83, 148, -3, -25 } };
-
- const int QuadraticCoefficientsOppositeColor[][PIECE_TYPE_NB] = {
- { 41, 41, 41, 41, 41, 41 }, { 37, 41, 41, 41, 41, 41 }, { 10, 62, 41, 41, 41, 41 },
- { 57, 64, 39, 41, 41, 41 }, { 50, 40, 23, -22, 41, 41 }, { 106, 101, 3, 151, 171, 41 } };
-
- // Endgame evaluation and scaling functions accessed direcly and not through
- // the function maps because correspond to more then one material hash key.
- Endgame<KmmKm> EvaluateKmmKm[] = { Endgame<KmmKm>(WHITE), Endgame<KmmKm>(BLACK) };
- Endgame<KXK> EvaluateKXK[] = { Endgame<KXK>(WHITE), Endgame<KXK>(BLACK) };
+ // Polynomial material imbalance parameters
+
+ constexpr int QuadraticOurs[][PIECE_TYPE_NB] = {
+ // OUR PIECES
+ // pair pawn knight bishop rook queen
+ {1438 }, // Bishop pair
+ { 40, 38 }, // Pawn
+ { 32, 255, -62 }, // Knight OUR PIECES
+ { 0, 104, 4, 0 }, // Bishop
+ { -26, -2, 47, 105, -208 }, // Rook
+ {-189, 24, 117, 133, -134, -6 } // Queen
+ };
+
+ constexpr int QuadraticTheirs[][PIECE_TYPE_NB] = {
+ // THEIR PIECES
+ // pair pawn knight bishop rook queen
+ { 0 }, // Bishop pair
+ { 36, 0 }, // Pawn
+ { 9, 63, 0 }, // Knight OUR PIECES
+ { 59, 65, 42, 0 }, // Bishop
+ { 46, 39, 24, -24, 0 }, // Rook
+ { 97, 100, -42, 137, 268, 0 } // Queen
+ };
+
+ // Endgame evaluation and scaling functions are accessed directly and not through
+ // the function maps because they correspond to more than one material hash key.
+ Endgame<KXK> EvaluateKXK[] = { Endgame<KXK>(WHITE), Endgame<KXK>(BLACK) };