From a5ddce7aa5d06a0257388d2caae3e04c95030e39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20C=C3=A1ceres?= Date: Tue, 26 Sep 2023 21:58:46 +0200 Subject: [PATCH] Tune eval values (#415) Tune eval values without taking into account king shield bonus and bishop and queen mobility bonus --- src/Lynx.Cli/appsettings.json | 101 ++++++------- src/Lynx/Configuration.cs | 32 +++-- src/Lynx/EvaluationConstants.cs | 200 +++++++++++++------------- src/Lynx/Model/Position.cs | 16 +-- tests/Lynx.Test/Model/PositionTest.cs | 14 +- 5 files changed, 187 insertions(+), 176 deletions(-) diff --git a/src/Lynx.Cli/appsettings.json b/src/Lynx.Cli/appsettings.json index 35083447b..c19800230 100644 --- a/src/Lynx.Cli/appsettings.json +++ b/src/Lynx.Cli/appsettings.json @@ -30,14 +30,47 @@ "NMP_DepthReduction": 3, "AspirationWindowAlpha": 50, "AspirationWindowBeta": 50, + // Evaluation + "DoubledPawnPenalty": { + "MG": -3, + "EG": -10 + }, "IsolatedPawnPenalty": { - "MG": 10, - "EG": 10 + "MG": -14, + "EG": -9 }, - "DoubledPawnPenalty": { - "MG": 10, - "EG": 10 + "OpenFileRookBonus": { + "MG": 45, + "EG": 19 + }, + "SemiOpenFileRookBonus": { + "MG": 20, + "EG": 16 + }, + "BishopMobilityBonus": { + "MG": 1, + "EG": 1 + }, + "QueenMobilityBonus": { + "MG": 1, + "EG": 1 + }, + "SemiOpenFileKingPenalty": { + "MG": -31, + "EG": 20 + }, + "OpenFileKingPenalty": { + "MG": -82, + "EG": 5 + }, + "KingShieldBonus": { + "MG": 5, + "EG": 5 + }, + "BishopPairBonus": { + "MG": 26, + "EG": 63 }, "PassedPawnBonus": { "Rank0": { @@ -45,66 +78,36 @@ "EG": 0 }, "Rank1": { - "MG": 10, - "EG": 10 + "MG": 0, + "EG": 5 }, "Rank2": { - "MG": 30, - "EG": 30 + "MG": -10, + "EG": 9 }, "Rank3": { - "MG": 50, - "EG": 50 + "MG": -12, + "EG": 30 }, "Rank4": { - "MG": 75, - "EG": 75 + "MG": 16, + "EG": 58 }, "Rank5": { - "MG": 100, - "EG": 100 + "MG": 44, + "EG": 127 }, "Rank6": { - "MG": 150, - "EG": 150 + "MG": 50, + "EG": 190 }, "Rank7": { "MG": 200, "EG": 200 } }, - "SemiOpenFileRookBonus": { - "MG": 10, - "EG": 10 - }, - "OpenFileRookBonus": { - "MG": 15, - "EG": 15 - }, - "SemiOpenFileKingPenalty": { - "MG": 10, - "EG": 10 - }, - "OpenFileKingPenalty": { - "MG": 15, - "EG": 15 - }, - "KingShieldBonus": { - "MG": 5, - "EG": 5 - }, - "BishopMobilityBonus": { - "MG": 1, - "EG": 1 - }, - "QueenMobilityBonus": { - "MG": 1, - "EG": 1 - }, - "BishopPairBonus": { - "MG": 0, - "EG": 100 - }, + // End of evaluation + "TranspositionTableEnabled": true, "TranspositionTableSize": "256", "UseOnlineTablebaseInRootPositions": false, diff --git a/src/Lynx/Configuration.cs b/src/Lynx/Configuration.cs index 521458529..1cbd2487b 100644 --- a/src/Lynx/Configuration.cs +++ b/src/Lynx/Configuration.cs @@ -243,27 +243,35 @@ public sealed class EngineSettings #region Evaluation - public TaperedEvaluationTerm IsolatedPawnPenalty { get; set; } = new(10, 10); + public TaperedEvaluationTerm DoubledPawnPenalty { get; set; } = new(-3, -10); - public TaperedEvaluationTerm DoubledPawnPenalty { get; set; } = new(10, 10); + public TaperedEvaluationTerm IsolatedPawnPenalty { get; set; } = new(-14, -9); - public TaperedEvaluationTermByRank PassedPawnBonus { get; set; } = new(new(0), new(10), new(30), new(50), new(75), new(100), new(150), new TaperedEvaluationTerm(200)); + public TaperedEvaluationTerm OpenFileRookBonus { get; set; } = new(45, 19); - public TaperedEvaluationTerm SemiOpenFileRookBonus { get; set; } = new(10, 10); + public TaperedEvaluationTerm SemiOpenFileRookBonus { get; set; } = new(20, 16); - public TaperedEvaluationTerm OpenFileRookBonus { get; set; } = new(15, 15); + public TaperedEvaluationTerm BishopMobilityBonus { get; set; } = new(1, 1); - public TaperedEvaluationTerm SemiOpenFileKingPenalty { get; set; } = new(10, 10); + public TaperedEvaluationTerm QueenMobilityBonus { get; set; } = new(1, 1); - public TaperedEvaluationTerm OpenFileKingPenalty { get; set; } = new(15, 15); + public TaperedEvaluationTerm SemiOpenFileKingPenalty { get; set; } = new(-31, 20); - public TaperedEvaluationTerm KingShieldBonus { get; set; } = new(5, 5); + public TaperedEvaluationTerm OpenFileKingPenalty { get; set; } = new(-82, 5); - public TaperedEvaluationTerm BishopMobilityBonus { get; set; } = new(1, 1); - - public TaperedEvaluationTerm QueenMobilityBonus { get; set; } = new(1, 1); + public TaperedEvaluationTerm KingShieldBonus { get; set; } = new(5, 5); - public TaperedEvaluationTerm BishopPairBonus { get; set; } = new(0, 100); + public TaperedEvaluationTerm BishopPairBonus { get; set; } = new(26, 63); + + public TaperedEvaluationTermByRank PassedPawnBonus { get; set; } = new( + new(0), + new(0, 5), + new(-10, 9), + new(-12, 30), + new(16, 58), + new(44, 127), + new(50, 190), + new(200)); #endregion diff --git a/src/Lynx/EvaluationConstants.cs b/src/Lynx/EvaluationConstants.cs index 1064c4787..aefbd2b6d 100644 --- a/src/Lynx/EvaluationConstants.cs +++ b/src/Lynx/EvaluationConstants.cs @@ -10,14 +10,14 @@ public static class EvaluationConstants { public static readonly int[] MiddleGamePieceValues = [ - +82, +337, +365, +477, +1025, 0, - -82, -337, -365, -477, -1025, 0, + +56, +295, +329, +389, +885, 0, + -56, -295, -329, -389, -885, 0 ]; public static readonly int[] EndGamePieceValues = [ - +94, +281, +297, +512, +936, 0, - -94, -281, -297, -512, -936, 0 + +160, +327, +346, +615, +1171, 0, + -160, -327, -346, -615, -1171, 0 ]; public static readonly int[] GamePhaseByPiece = @@ -28,146 +28,146 @@ public static class EvaluationConstants public static readonly int[] MiddleGamePawnTable = [ - 0, 0, 0, 0, 0, 0, 0, 0, - 98, 134, 61, 95, 68, 126, 34, -11, - -6, 7, 26, 31, 65, 56, 25, -20, - -14, 13, 6, 21, 23, 12, 17, -23, - -27, -2, -5, 12, 17, 6, 10, -25, - -26, -4, -4, -10, 3, 3, 33, -12, - -35, -1, -20, -23, -15, 24, 38, -22, - 0, 0, 0, 0, 0, 0, 0, 0 + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 5, 12, 5, 20, 54, 53, 22, + 0, 2, 18, 24, 30, 38, 40, 25, + 2, 10, 23, 36, 40, 45, 25, 17, + 4, 12, 21, 38, 41, 40, 22, 14, + 1, 5, 18, 20, 29, 34, 35, 23, + 0, 7, 8, 2, 17, 47, 45, 16, + 0, 0, 0, 0, 0, 0, 0, 0, ]; public static readonly int[] EndGamePawnTable = [ - 0, 0, 0, 0, 0, 0, 0, 0, - 178, 173, 158, 134, 147, 132, 165, 187, - 94, 100, 85, 67, 56, 53, 82, 84, - 32, 24, 13, 5, -2, 4, 17, 17, - 13, 9, -3, -7, -7, -8, 3, -1, - 4, 7, -6, 1, 0, -5, -1, -8, - 13, 8, 8, 10, 13, 0, 2, -7, - 0, 0, 0, 0, 0, 0, 0, 0 + 0, 0, 0, 0, 0, 0, 0, 0, + -44, -47, -51, -66, -55, -59, -61, -66, + -47, -47, -57, -64, -60, -61, -58, -63, + -35, -42, -56, -73, -69, -66, -51, -56, + -37, -42, -58, -69, -68, -63, -53, -57, + -45, -47, -59, -63, -58, -58, -58, -64, + -43, -47, -48, -66, -49, -55, -59, -64, + 0, 0, 0, 0, 0, 0, 0, 0, ]; public static readonly int[] MiddleGameKnightTable = [ - -167, -89, -34, -49, 61, -97, -15, -107, - -73, -41, 72, 36, 23, 62, 7, -17, - -47, 60, 37, 65, 84, 129, 73, 44, - -9, 17, 19, 53, 37, 69, 18, 22, - -13, 4, 16, 13, 28, 19, 21, -8, - -23, -9, 12, 10, 19, 17, 25, -16, - -29, -53, -12, -3, -1, 18, -14, -19, - -105, -21, -58, -33, -17, -28, -19, -23 + -110, -12, -35, -17, -8, 2, -5, -62, + -25, -12, 10, 18, 22, 36, 10, 9, + -13, 13, 28, 51, 51, 37, 41, 9, + 7, 34, 42, 54, 55, 57, 42, 23, + 9, 29, 44, 45, 53, 55, 41, 19, + -9, 17, 28, 43, 48, 33, 34, 8, + -23, 1, 17, 16, 20, 29, 11, 6, + -125, -14, -30, -11, -7, 8, -10, -54, ]; public static readonly int[] EndGameKnightTable = [ - -58, -38, -13, -28, -31, -27, -63, -99, - -25, -8, -25, -2, -9, -25, -24, -52, - -24, -20, 10, 9, -1, -9, -19, -41, - -17, 3, 22, 22, 22, 11, 8, -18, - -18, -6, 16, 25, 16, 17, 4, -18, - -23, -3, -1, 15, 10, -3, -20, -22, - -42, -20, -10, -5, -2, -20, -23, -44, - -29, -51, -23, -15, -22, -18, -50, -64 + -46, -34, -4, -2, -2, -19, -32, -64, + -12, 2, 15, 15, 12, 5, -8, -17, + -1, 15, 28, 32, 33, 20, 7, -9, + 9, 19, 42, 43, 44, 37, 20, 1, + 9, 24, 39, 44, 44, 34, 25, 4, + -6, 16, 22, 38, 31, 20, 8, -4, + -19, 2, 7, 16, 9, 5, -9, -16, + -45, -37, -2, -4, -2, -16, -33, -61, ]; public static readonly int[] MiddleGameBishopTable = [ - -29, 4, -82, -37, -25, -42, 7, -8, - -26, 16, -18, -13, 30, 59, 18, -47, - -16, 37, 43, 40, 35, 50, 37, -2, - -4, 5, 19, 50, 37, 37, 7, -2, - -6, 13, 13, 26, 34, 12, 10, 4, - 0, 15, 15, 15, 14, 27, 18, 10, - 4, 15, 16, 0, 7, 21, 33, 1, - -33, -3, -14, -21, -13, -12, -39, -21 + -36, -4, -23, -28, -27, -26, -15, -17, + -7, -1, 7, -12, 2, 10, 26, -6, + -11, 7, 4, 15, 5, 13, 7, 18, + -14, -1, 12, 30, 30, 7, 8, -12, + -19, 5, 6, 29, 22, 8, 3, -6, + -1, 6, 11, 8, 14, 7, 8, 15, + -6, 9, 9, -4, -3, 10, 20, 3, + -12, -4, -11, -34, -32, -26, -7, -26, ]; public static readonly int[] EndGameBishopTable = [ - -14, -21, -11, -8, -7, -9, -17, -24, - -8, -4, 7, -12, -3, -13, -4, -14, - 2, -8, 0, -1, -2, 6, 0, 4, - -3, 9, 12, 9, 14, 10, 3, 2, - -6, 3, 13, 19, 7, 10, -3, -9, - -12, -3, 8, 10, 13, 3, -7, -15, - -14, -18, -7, -1, 4, -9, -15, -27, - -23, -9, -23, -5, -9, -16, -5, -17 + -14, 5, -22, 2, -6, -6, -11, -32, + -9, -1, 3, 10, 12, -3, -2, -20, + 6, 19, 24, 23, 28, 23, 10, -2, + 9, 21, 27, 28, 26, 26, 16, 1, + 8, 19, 25, 31, 24, 23, 14, 0, + 6, 9, 18, 21, 24, 20, 6, -1, + -19, -4, -5, 11, 13, 6, 1, -23, + -15, -13, -17, 3, 5, -3, -6, -19, ]; public static readonly int[] MiddleGameRookTable = [ - 32, 42, 32, 51, 63, 9, 31, 43, - 27, 32, 58, 62, 80, 67, 26, 44, - -5, 19, 26, 36, 17, 45, 61, 16, - -24, -11, 7, 26, 24, 35, -8, -20, - -36, -26, -12, -1, 9, -7, 6, -23, - -45, -25, -16, -17, 3, 0, -5, -33, - -44, -16, -20, -9, -1, 11, -6, -71, - -19, -13, 1, 17, 16, 7, -37, -26 + 6, -2, -1, 5, 14, 19, 18, 10, + -14, -1, -4, -4, 4, 17, 32, 12, + -13, -1, -7, 0, 11, 18, 56, 36, + -10, -5, 0, 1, 9, 16, 44, 35, + -6, 0, 2, 9, 6, 17, 37, 32, + -8, -1, 2, 6, 11, 25, 55, 40, + -12, -11, -1, -2, 3, 16, 38, 12, + 8, 4, 5, 15, 20, 23, 23, 21, ]; public static readonly int[] EndGameRookTable = [ - 13, 10, 18, 15, 12, 12, 8, 5, - 11, 13, 13, 11, -3, 3, 8, 3, - 7, 7, 7, 5, 4, -3, -5, -3, - 4, 3, 13, 1, 2, 1, -1, 2, - 3, 5, 8, 4, -5, -6, -8, -11, - -4, 0, -5, -1, -7, -12, -8, -16, - -6, -6, 0, 2, -9, -9, -11, -3, - -9, 2, 3, -1, -5, -13, 4, -20 + 9, 11, 17, 8, 2, 4, 6, -2, + 14, 19, 20, 14, 5, 4, -1, 3, + 10, 8, 11, 8, -1, -4, -14, -15, + 11, 8, 11, 9, 1, 1, -9, -14, + 10, 8, 13, 6, 3, -1, -9, -11, + 10, 12, 4, 0, -3, -6, -14, -11, + 18, 21, 17, 10, 3, 3, -3, 7, + 4, 5, 12, 4, -3, -1, 0, -11, ]; public static readonly int[] MiddleGameQueenTable = [ - -28, 0, 29, 12, 59, 44, 43, 45, - -24, -39, -5, 1, -16, 57, 28, 54, - -13, -17, 7, 8, 29, 56, 47, 57, - -27, -27, -16, -16, -1, 17, -2, 1, - -9, -26, -9, -10, -2, -4, 3, -3, - -14, 2, -11, -2, -5, 2, 14, 5, - -35, -8, 11, 2, 8, 15, -3, 1, - -1, -18, -9, 10, -15, -25, -31, -50 + -20, -24, -21, 1, -15, -27, -4, -15, + -7, -7, 6, -1, 4, 15, 18, 35, + -6, 1, -2, 1, -4, 10, 30, 43, + -7, -10, -3, 0, 3, 7, 20, 23, + -10, -2, -5, -5, 3, 8, 13, 16, + -5, 1, -4, -3, 0, 10, 22, 30, + -15, -15, 3, 8, 6, 10, 16, 30, + -14, -26, -16, 2, -12, -35, -17, -6, ]; public static readonly int[] EndGameQueenTable = [ - -9, 22, 22, 27, 27, 19, 10, 20, - -17, 20, 32, 41, 58, 25, 30, 0, - -20, 6, 9, 49, 47, 35, 19, 9, - 3, 22, 24, 45, 57, 40, 57, 36, - -18, 28, 19, 47, 31, 34, 39, 23, - -16, -27, 15, 6, 9, 17, 10, 5, - -22, -23, -30, -16, -16, -23, -36, -32, - -33, -28, -22, -43, -5, -32, -20, -41 + -11, 5, 18, -8, 16, 6, -24, 7, + -13, 4, 0, 23, 18, 4, -14, -16, + -9, 9, 36, 35, 54, 44, 8, -4, + -3, 30, 32, 61, 64, 58, 42, 17, + 9, 24, 43, 67, 64, 53, 35, 31, + -10, 7, 44, 44, 53, 44, 27, 7, + -7, 12, 7, 10, 17, 15, -17, -10, + -1, 10, 21, -3, 24, 29, 18, 7, ]; public static readonly int[] MiddleGameKingTable = [ - -65, 23, 16, -15, -56, -34, 2, 13, - 29, -1, -20, -7, -8, -4, -38, -29, - -9, 24, 2, -16, -20, 6, 22, -22, - -17, -20, -12, -27, -30, -25, -14, -36, - -49, -1, -27, -39, -46, -44, -33, -51, - -14, -14, -22, -46, -44, -30, -15, -27, - 1, 7, -8, -64, -43, -16, 9, 8, - -15, 36, 12, -54, 8, -28, 24, 14 + 2, 22, 9, -80, -18, -72, 13, 11, + -19, -16, -32, -70, -75, -46, -7, 1, + -75, -62, -100, -102, -107, -109, -73, -90, + -99, -96, -117, -148, -144, -135, -131, -161, + -78, -83, -106, -136, -140, -119, -129, -157, + -64, -27, -91, -99, -87, -92, -61, -80, + 55, -8, -29, -63, -63, -39, 5, 10, + 16, 49, 21, -72, -13, -60, 25, 24, ]; public static readonly int[] EndGameKingTable = [ - -74, -35, -18, -18, -11, 15, 4, -17, - -12, 17, 14, 17, 17, 38, 23, 11, - 10, 17, 23, 15, 20, 45, 44, 13, - -8, 22, 24, 27, 26, 33, 26, 3, - -18, -4, 21, 24, 27, 23, 9, -11, - -19, -3, 11, 21, 23, 16, 7, -9, - -27, -11, 4, 13, 14, 4, -5, -17, - -53, -34, -21, -11, -28, -14, -24, -43 + -48, -26, -11, 15, -20, 9, -20, -51, + -7, 17, 27, 40, 44, 31, 14, -6, + 8, 34, 51, 60, 62, 56, 40, 25, + 12, 43, 63, 77, 75, 68, 57, 40, + 3, 37, 60, 74, 77, 67, 58, 39, + 4, 28, 49, 59, 58, 52, 38, 22, + -28, 11, 25, 38, 38, 29, 11, -11, + -59, -38, -17, 9, -15, 5, -24, -57, ]; public static readonly int[] MiddleGamePawnTableBlack = MiddleGamePawnTable.Select((_, index) => -MiddleGamePawnTable[index ^ 56]).ToArray(); diff --git a/src/Lynx/Model/Position.cs b/src/Lynx/Model/Position.cs index 1069f5613..9a3a55f27 100644 --- a/src/Lynx/Model/Position.cs +++ b/src/Lynx/Model/Position.cs @@ -769,14 +769,14 @@ public static int EvaluateFinalPosition(int ply, bool isInCheck) var doublePawnsCount = (PieceBitBoards[pieceIndex] & Masks.FileMasks[squareIndex]).CountBits(); if (doublePawnsCount > 1) { - middleGameBonus -= doublePawnsCount * Configuration.EngineSettings.DoubledPawnPenalty.MG; - endGameBonus -= doublePawnsCount * Configuration.EngineSettings.DoubledPawnPenalty.EG; + middleGameBonus += doublePawnsCount * Configuration.EngineSettings.DoubledPawnPenalty.MG; + endGameBonus += doublePawnsCount * Configuration.EngineSettings.DoubledPawnPenalty.EG; } if ((PieceBitBoards[pieceIndex] & Masks.IsolatedPawnMasks[squareIndex]) == default) // isIsolatedPawn { - middleGameBonus -= Configuration.EngineSettings.IsolatedPawnPenalty.MG; - endGameBonus -= Configuration.EngineSettings.IsolatedPawnPenalty.EG; + middleGameBonus += Configuration.EngineSettings.IsolatedPawnPenalty.MG; + endGameBonus += Configuration.EngineSettings.IsolatedPawnPenalty.EG; } if ((PieceBitBoards[(int)Piece.p - pieceIndex] & Masks.PassedPawns[pieceIndex][squareIndex]) == default) // isPassedPawn @@ -874,13 +874,13 @@ public static int EvaluateFinalPosition(int ply, bool isInCheck) { if (((PieceBitBoards[(int)Piece.P] | PieceBitBoards[(int)Piece.p]) & Masks.FileMasks[squareIndex]) == default) // isOpenFile { - middleGameBonus -= Configuration.EngineSettings.OpenFileKingPenalty.MG; - endGameBonus -= Configuration.EngineSettings.OpenFileKingPenalty.EG; + middleGameBonus += Configuration.EngineSettings.OpenFileKingPenalty.MG; + endGameBonus += Configuration.EngineSettings.OpenFileKingPenalty.EG; } else if ((PieceBitBoards[(int)Piece.P + kingSideOffset] & Masks.FileMasks[squareIndex]) == default) // isSemiOpenFile { - middleGameBonus -= Configuration.EngineSettings.SemiOpenFileKingPenalty.MG; - endGameBonus -= Configuration.EngineSettings.SemiOpenFileKingPenalty.EG; + middleGameBonus += Configuration.EngineSettings.SemiOpenFileKingPenalty.MG; + endGameBonus += Configuration.EngineSettings.SemiOpenFileKingPenalty.EG; } } diff --git a/tests/Lynx.Test/Model/PositionTest.cs b/tests/Lynx.Test/Model/PositionTest.cs index 2cc998e93..07e78addc 100644 --- a/tests/Lynx.Test/Model/PositionTest.cs +++ b/tests/Lynx.Test/Model/PositionTest.cs @@ -216,7 +216,7 @@ public void StaticEvaluation_IsolatedPawnPenalty(string fen) evaluation = -evaluation; } - Assert.AreEqual(-Configuration.EngineSettings.IsolatedPawnPenalty.MG, evaluation); + Assert.AreEqual(Configuration.EngineSettings.IsolatedPawnPenalty.MG, evaluation); } /// @@ -248,7 +248,7 @@ public void StaticEvaluation_DoublePawnPenalty(string fen) evaluation = -evaluation; } - Assert.AreEqual(-4 * Configuration.EngineSettings.DoubledPawnPenalty.MG, evaluation); + Assert.AreEqual(4 * Configuration.EngineSettings.DoubledPawnPenalty.MG, evaluation); } /// @@ -281,7 +281,7 @@ public void StaticEvaluation_TriplePawnPenalty(string fen) evaluation = -evaluation; } - Assert.AreEqual(-9 * Configuration.EngineSettings.DoubledPawnPenalty.MG, evaluation); + Assert.AreEqual(9 * Configuration.EngineSettings.DoubledPawnPenalty.MG, evaluation); } /// @@ -423,8 +423,8 @@ public void StaticEvaluation_PassedPawnBonus(string fen, BoardSquare square) } Assert.AreEqual( - 4 * Configuration.EngineSettings.DoubledPawnPenalty.MG - - Configuration.EngineSettings.IsolatedPawnPenalty.MG + -4 * Configuration.EngineSettings.DoubledPawnPenalty.MG + + Configuration.EngineSettings.IsolatedPawnPenalty.MG + Configuration.EngineSettings.PassedPawnBonus[rank].MG, evaluation); @@ -586,7 +586,7 @@ public void StaticEvaluation_SemiOpenFileKingPenalty(string fen) evaluation = -evaluation; } - Assert.AreEqual(-Configuration.EngineSettings.SemiOpenFileKingPenalty.MG, evaluation); + Assert.AreEqual(Configuration.EngineSettings.SemiOpenFileKingPenalty.EG, evaluation); } /// @@ -618,7 +618,7 @@ public void StaticEvaluation_OpenFileKingPenalty(string fen) evaluation = -evaluation; } - Assert.AreEqual(-Configuration.EngineSettings.OpenFileKingPenalty.MG, evaluation); + Assert.AreEqual(Configuration.EngineSettings.OpenFileKingPenalty.EG, evaluation); } ///