- // Values modified by Joona Kiiski
- const Value MidgameLimit = Value(15581);
- const Value EndgameLimit = Value(3998);
-
- // 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[][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 } };
-
- typedef EndgameEvaluationFunctionBase EF;
- typedef EndgameScalingFunctionBase SF;
- typedef map<Key, EF*> EFMap;
- typedef map<Key, SF*> SFMap;
-
- // Endgame evaluation and scaling functions accessed direcly and not through
- // the function maps because correspond to more then one material hash key.
- EvaluationFunction<KmmKm> EvaluateKmmKm[] = { EvaluationFunction<KmmKm>(WHITE), EvaluationFunction<KmmKm>(BLACK) };
- EvaluationFunction<KXK> EvaluateKXK[] = { EvaluationFunction<KXK>(WHITE), EvaluationFunction<KXK>(BLACK) };
- ScalingFunction<KBPsK> ScaleKBPsK[] = { ScalingFunction<KBPsK>(WHITE), ScalingFunction<KBPsK>(BLACK) };
- ScalingFunction<KQKRPs> ScaleKQKRPs[] = { ScalingFunction<KQKRPs>(WHITE), ScalingFunction<KQKRPs>(BLACK) };
- ScalingFunction<KPsK> ScaleKPsK[] = { ScalingFunction<KPsK>(WHITE), ScalingFunction<KPsK>(BLACK) };
- ScalingFunction<KPKP> ScaleKPKP[] = { ScalingFunction<KPKP>(WHITE), ScalingFunction<KPKP>(BLACK) };
+ // Polynomial material imbalance parameters
+
+ // 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.
+ Endgame<KXK> EvaluateKXK[] = { Endgame<KXK>(WHITE), Endgame<KXK>(BLACK) };
+
+ Endgame<KBPsK> ScaleKBPsK[] = { Endgame<KBPsK>(WHITE), Endgame<KBPsK>(BLACK) };
+ Endgame<KQKRPs> ScaleKQKRPs[] = { Endgame<KQKRPs>(WHITE), Endgame<KQKRPs>(BLACK) };
+ Endgame<KPsK> ScaleKPsK[] = { Endgame<KPsK>(WHITE), Endgame<KPsK>(BLACK) };
+ Endgame<KPKP> ScaleKPKP[] = { Endgame<KPKP>(WHITE), Endgame<KPKP>(BLACK) };