- 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) };
+ // pair pawn knight bishop rook queen
+ const int Linear[6] = { 1852, -162, -1122, -183, 249, -154 };
+
+ const int QuadraticSameSide[][PIECE_TYPE_NB] = {
+ // OUR PIECES
+ // pair pawn knight bishop rook queen
+ { 0 }, // Bishop pair
+ { 39, 2 }, // Pawn
+ { 35, 271, -4 }, // knight OUR PIECES
+ { 0, 105, 4, 0 }, // Bishop
+ { -27, -2, 46, 100, -141 }, // Rook
+ {-177, 25, 129, 142, -137, 0 } // Queen
+ };
+
+ const int QuadraticOppositeSide[][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
+ { 98, 105, -39, 141, 274, 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.