Skip to content

Commit

Permalink
7M-1M-1M
Browse files Browse the repository at this point in the history
  • Loading branch information
eduherminio committed Nov 26, 2023
1 parent e003c92 commit b7ccc3a
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 118 deletions.
44 changes: 22 additions & 22 deletions src/Lynx.Cli/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,43 +46,43 @@

// Evaluation
"DoubledPawnPenalty": {
"MG": -6,
"EG": -13
"MG": -5,
"EG": -14
},
"IsolatedPawnPenalty": {
"MG": -17,
"EG": -14
},
"OpenFileRookBonus": {
"MG": 60,
"EG": 26
"EG": 29
},
"SemiOpenFileRookBonus": {
"MG": 26,
"EG": 22
"MG": 25,
"EG": 23
},
"BishopMobilityBonus": {
"MG": 9,
"MG": 10,
"EG": 10
},
"QueenMobilityBonus": {
"MG": 3,
"EG": 9
},
"SemiOpenFileKingPenalty": {
"MG": -35,
"EG": 24
"MG": -38,
"EG": 25
},
"OpenFileKingPenalty": {
"MG": -103,
"MG": -108,
"EG": 4
},
"KingShieldBonus": {
"MG": 18,
"EG": -5
"MG": 19,
"EG": -6
},
"BishopPairBonus": {
"MG": 29,
"MG": 30,
"EG": 88
},
"PassedPawnBonus": {
Expand All @@ -91,28 +91,28 @@
"EG": 0
},
"Rank1": {
"MG": -1,
"EG": 6
"MG": -2,
"EG": 7
},
"Rank2": {
"MG": -16,
"EG": 13
},
"Rank3": {
"MG": -15,
"EG": 43
"MG": -16,
"EG": 44
},
"Rank4": {
"MG": 22,
"EG": 81
"MG": 20,
"EG": 83
},
"Rank5": {
"MG": 69,
"EG": 165
"MG": 61,
"EG": 175
},
"Rank6": {
"MG": 106,
"EG": 249
"MG": 91,
"EG": 258
},
"Rank7": {
"MG": 0,
Expand Down
192 changes: 96 additions & 96 deletions src/Lynx/EvaluationConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,158 +26,158 @@ public static class EvaluationConstants

public static readonly int[] MiddleGamePieceValues =
[
+102, +381, +355, +502, +1115, 0,
-102, -381, -355, -502, -1115, 0
+102, +382, +352, +500, +1101, 0,
-102, -382, -352, -500, -1101, 0
];

public static readonly int[] EndGamePieceValues =
[
+146, +472, +420, +871, +1486, 0,
-146, -472, -420, -871, -1486, 0
+149, +485, +436, +893, +1533, 0,
-149, -485, -436, -893, -1533, 0
];

public static readonly int[] MiddleGamePawnTable =
[
0, 0, 0, 0, 0, 0, 0, 0,
-29, -22, -17, -11, -6, 25, 32, -16,
-26, -22, -6, 9, 17, 28, 27, 7,
-20, -12, 6, 20, 27, 34, 7, -3,
-20, -9, 3, 19, 28, 30, 6, -4,
-23, -20, -4, 2, 14, 23, 18, 3,
-29, -21, -20, -17, -8, 20, 21, -21,
-31, -23, -15, -11, -4, 25, 31, -18,
-29, -24, -5, 11, 19, 27, 26, 7,
-23, -14, 5, 20, 29, 34, 5, -3,
-23, -10, 2, 21, 29, 30, 3, -5,
-26, -18, -3, 4, 15, 22, 18, 1,
-31, -20, -20, -16, -7, 18, 20, -25,
0, 0, 0, 0, 0, 0, 0, 0,
];

public static readonly int[] EndGamePawnTable =
[
0, 0, 0, 0, 0, 0, 0, 0,
14, 12, 8, -16, 6, 4, -4, -11,
11, 11, -1, -14, -7, -5, -5, -11,
28, 19, -1, -21, -16, -12, 6, -2,
24, 19, -2, -16, -15, -9, 4, -4,
13, 10, -4, -12, -3, -3, -3, -12,
17, 12, 10, -11, 14, 8, -1, -8,
15, 12, 7, -15, 6, 3, -3, -10,
12, 13, 0, -14, -7, -6, -3, -11,
28, 20, 0, -22, -17, -13, 8, -1,
25, 19, -2, -16, -15, -9, 5, -4,
13, 10, -4, -13, -2, -3, -2, -11,
17, 12, 10, -15, 16, 7, -1, -7,
0, 0, 0, 0, 0, 0, 0, 0,
];

public static readonly int[] MiddleGameKnightTable =
[
-155, -25, -59, -41, -22, -26, -11, -95,
-45, -27, -2, 15, 17, 21, -11, -16,
-20, 4, 21, 61, 60, 42, 37, 0,
-7, 28, 44, 59, 61, 62, 51, 22,
-5, 29, 46, 49, 58, 57, 53, 21,
-22, 8, 20, 49, 59, 36, 31, -4,
-45, -19, 1, 15, 17, 13, -11, -16,
-171, -28, -58, -35, -16, -17, -16, -87,
-154, -31, -61, -44, -21, -26, -16, -97,
-46, -25, -2, 16, 18, 23, -12, -17,
-28, 4, 22, 60, 62, 43, 38, -1,
-8, 28, 45, 62, 63, 64, 50, 21,
-4, 27, 48, 49, 60, 61, 50, 21,
-25, 6, 21, 51, 61, 36, 31, -1,
-48, -16, 1, 15, 17, 17, -10, -18,
-171, -33, -59, -33, -19, -17, -24, -91,
];

public static readonly int[] EndGameKnightTable =
[
-67, -76, -13, -13, -9, -25, -69, -88,
-23, 1, 15, 9, 12, 8, -13, -19,
-19, 14, 40, 38, 39, 21, 12, -17,
4, 19, 51, 53, 57, 51, 28, -4,
4, 27, 49, 54, 60, 50, 33, 1,
-20, 18, 30, 45, 36, 20, 8, -10,
-28, 2, 5, 11, 4, 0, -14, -24,
-68, -77, -7, -14, -12, -27, -71, -90,
-74, -70, -12, -12, -10, -28, -64, -94,
-21, -1, 15, 9, 11, 9, -13, -21,
-13, 17, 39, 38, 37, 19, 10, -14,
8, 20, 52, 53, 56, 50, 25, -6,
4, 27, 51, 55, 58, 46, 31, 0,
-17, 20, 28, 45, 36, 21, 7, -11,
-28, 2, 5, 13, 5, 1, -14, -24,
-79, -69, -7, -15, -10, -26, -60, -94,
];

public static readonly int[] MiddleGameBishopTable =
[
-16, 7, -8, -27, -23, -20, -28, -1,
6, 4, 9, -18, 1, -4, 30, -10,
-4, 10, -2, 6, -4, 15, 8, 31,
-6, 0, -2, 27, 23, -14, 7, 2,
-10, 2, -10, 21, 11, -10, 0, 10,
5, 9, 7, -2, 7, 8, 11, 26,
9, 13, 13, -7, -1, -1, 24, -4,
10, 15, 2, -44, -24, -24, -4, -12,
-14, 12, -10, -26, -20, -21, -27, 3,
8, 4, 9, -18, 1, -2, 30, -11,
-5, 8, -3, 4, -6, 14, 7, 32,
-5, -5, -4, 25, 20, -16, 5, 1,
-13, 0, -13, 18, 7, -11, -3, 8,
5, 8, 8, -4, 6, 7, 10, 27,
9, 16, 13, -7, -4, 1, 22, -2,
12, 15, 3, -42, -24, -27, -4, -13,
];

public static readonly int[] EndGameBishopTable =
[
-10, 18, -26, 3, 0, -2, 3, -30,
-2, -6, -4, 5, 3, -8, -1, -14,
14, 16, 8, 2, 13, 4, 7, 10,
12, 7, 7, -1, -8, 8, 6, 4,
6, 11, 8, 3, -8, 6, 3, 5,
12, 4, 2, 2, 8, 0, 5, 8,
-12, -9, -13, 4, -1, -1, -4, -9,
-8, -11, -17, 5, 7, 2, 2, -16,
-14, 18, -24, 4, -2, 1, 1, -32,
-4, -6, -4, 6, 5, -10, -1, -15,
15, 16, 9, 4, 13, 5, 7, 10,
13, 8, 7, -1, -5, 7, 5, 5,
8, 10, 7, 4, -10, 6, 4, 4,
12, 4, 0, 1, 6, 1, 4, 6,
-15, -10, -17, 3, 2, -2, 0, -11,
-8, -11, -18, 8, 9, 5, 0, -21,
];

public static readonly int[] MiddleGameRookTable =
[
-10, -17, -14, -8, 5, -6, 2, -5,
-33, -17, -16, -15, -6, 0, 16, -7,
-33, -14, -18, -6, 6, 12, 57, 29,
-26, -16, -11, 0, 3, 16, 53, 26,
-19, -12, -10, 7, 1, 16, 45, 22,
-28, -10, -14, 0, 6, 21, 56, 34,
-26, -22, -9, -9, -4, -3, 22, -1,
-6, -10, -10, 0, 12, -2, 10, 7,
-8, -16, -13, -9, 6, -6, 2, -5,
-31, -13, -14, -14, -4, 0, 19, -6,
-31, -15, -18, -7, 8, 12, 60, 32,
-24, -18, -12, -3, 3, 13, 51, 26,
-18, -11, -6, 4, -1, 14, 40, 23,
-24, -11, -12, 0, 6, 23, 57, 33,
-28, -24, -8, -8, -2, -2, 24, 0,
-5, -8, -8, 2, 15, -1, 11, 8,
];

public static readonly int[] EndGameRookTable =
[
5, 6, 11, 2, -8, 4, 3, -7,
17, 20, 20, 9, -1, 0, -4, 3,
11, 6, 10, 1, -9, -6, -22, -20,
12, 12, 11, 4, -3, -1, -18, -20,
11, 8, 13, 1, -1, -5, -18, -15,
13, 10, 4, -3, -11, -11, -23, -14,
20, 21, 14, 5, -3, 0, -4, 4,
-2, 0, 7, -2, -13, -2, -5, -17,
6, 8, 13, 3, -6, 6, 6, -4,
15, 20, 20, 9, -1, 2, -4, 3,
9, 7, 10, 3, -9, -10, -23, -22,
11, 9, 11, 5, -4, -2, -17, -20,
11, 8, 12, 1, -2, -8, -15, -16,
11, 12, 2, -6, -11, -13, -22, -16,
20, 22, 16, 5, -3, 1, -5, 4,
0, 0, 8, -1, -13, -1, -5, -14,
];

public static readonly int[] MiddleGameQueenTable =
[
-15, -21, -16, -1, -9, -45, 1, 0,
-2, -10, 8, 1, 3, 4, 19, 47,
-7, -1, -7, -6, -6, 10, 37, 59,
-7, -15, -14, -5, -3, 5, 17, 28,
-11, -11, -13, -13, -2, 1, 17, 26,
-3, -1, -10, -9, -4, 6, 24, 43,
-16, -16, 5, 7, 7, 0, 5, 37,
-8, -22, -9, -1, -9, -51, -18, 34,
-16, -21, -20, -3, -12, -42, 4, -1,
0, -8, 8, -1, 2, 2, 22, 49,
-5, -2, -6, -5, -9, 9, 38, 61,
-9, -15, -14, -4, -5, 1, 16, 29,
-9, -9, -14, -14, -5, 1, 14, 25,
-3, 0, -12, -9, -4, 6, 24, 42,
-16, -18, 5, 9, 7, -1, 8, 35,
-12, -23, -10, -1, -9, -49, -21, 28,
];

public static readonly int[] EndGameQueenTable =
[
-21, -12, -10, -19, -8, 1, -28, 18,
-19, -10, -31, -7, -5, -20, -45, 0,
-12, -8, 3, -4, 13, 19, -4, 8,
-15, 6, 0, 11, 20, 33, 45, 40,
0, 1, 6, 22, 18, 31, 27, 50,
-18, -13, 8, 7, 13, 21, 22, 17,
-11, -7, -26, -16, -13, -14, -37, 8,
-13, -7, -8, -8, -2, 26, 17, 1,
-24, -14, -1, -13, -7, -3, -36, 13,
-19, -13, -28, -1, -1, -14, -47, 0,
-17, -7, 1, -4, 18, 22, -10, 5,
-11, 4, 0, 6, 22, 36, 45, 36,
-1, -2, 9, 22, 19, 29, 24, 48,
-19, -14, 11, 9, 14, 22, 22, 19,
-11, -7, -24, -17, -11, -7, -33, 10,
-12, -7, -8, -5, 2, 28, 22, -7,
];

public static readonly int[] MiddleGameKingTable =
[
33, 52, 22, -85, 6, -69, 43, 59,
-2, -10, -31, -70, -82, -58, -3, 25,
-81, -66, -110, -106, -117, -127, -82, -95,
-103, -98, -121, -156, -150, -141, -136, -176,
-70, -74, -108, -142, -152, -131, -148, -173,
-79, -41, -94, -107, -92, -111, -76, -97,
79, -3, -30, -62, -64, -47, 10, 34,
49, 79, 37, -71, 13, -60, 56, 73,
44, 58, 27, -83, 6, -66, 45, 65,
2, -8, -29, -70, -83, -57, -3, 28,
-82, -68, -114, -117, -129, -135, -87, -99,
-119, -122, -140, -182, -172, -160, -158, -191,
-83, -86, -130, -161, -174, -143, -164, -181,
-76, -40, -107, -116, -100, -114, -78, -90,
89, 2, -30, -60, -64, -45, 12, 37,
59, 85, 40, -67, 17, -55, 60, 79,
];

public static readonly int[] EndGameKingTable =
[
-82, -47, -22, 4, -46, -3, -38, -93,
-21, 15, 28, 41, 48, 35, 13, -25,
6, 42, 61, 72, 75, 68, 46, 23,
14, 54, 78, 93, 90, 84, 68, 44,
0, 47, 76, 90, 94, 82, 73, 42,
6, 38, 60, 72, 68, 63, 45, 22,
-45, 10, 28, 38, 41, 31, 8, -29,
-95, -60, -30, -3, -37, -6, -42, -100,
-87, -50, -24, 4, -42, -2, -40, -96,
-22, 16, 29, 43, 51, 36, 14, -24,
6, 43, 65, 77, 80, 71, 47, 25,
16, 60, 85, 102, 98, 90, 75, 47,
3, 49, 82, 98, 103, 88, 78, 45,
5, 40, 63, 77, 74, 66, 47, 20,
-47, 9, 30, 40, 43, 32, 9, -28,
-100, -62, -30, -3, -35, -6, -44, -101,
];

public static readonly int[] MiddleGamePawnTableBlack = MiddleGamePawnTable.Select((_, index) => -MiddleGamePawnTable[index ^ 56]).ToArray();
Expand Down

0 comments on commit b7ccc3a

Please sign in to comment.