- const int LinearCoefficients[6] = { 1617, -162, -1172, -190, 105, 26 };
-
- const int QuadraticCoefficientsSameColor[][8] = {
- { 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[][8] = {
- { 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.
+ // pair pawn knight bishop rook queen
+ const int LinearCoefficients[6] = { 1852, -162, -1122, -183, 249, -52 };
+
+ const int QuadraticCoefficientsSameColor[][PIECE_TYPE_NB] = {
+ // pair pawn knight bishop rook queen
+ { 0 }, // Bishop pair
+ { 39, 2 }, // Pawn
+ { 35, 271, -4 }, // Knight
+ { 0, 105, 4, 0 }, // Bishop
+ { -27, -2, 46, 100, -141 }, // Rook
+ { 58, 29, 83, 148, -163, 0 } // Queen
+ };
+
+ const int QuadraticCoefficientsOppositeColor[][PIECE_TYPE_NB] = {
+ // THEIR PIECES
+ // pair pawn knight bishop rook queen
+ { 0 }, // Bishop pair
+ { 37, 0 }, // Pawn
+ { 10, 62, 0 }, // Knight OUR PIECES
+ { 57, 64, 39, 0 }, // Bishop
+ { 50, 40, 23, -22, 0 }, // Rook
+ { 106, 101, 3, 151, 171, 0 } // Queen
+ };
+
+ // Endgame evaluation and scaling functions are accessed directly and not through
+ // the function maps because they correspond to more then one material hash key.