Skip to content

Commit

Permalink
Tune eval values (#415)
Browse files Browse the repository at this point in the history
Tune eval values without taking into account king shield bonus and bishop and queen mobility bonus
  • Loading branch information
eduherminio authored Sep 26, 2023
1 parent 04705bf commit a5ddce7
Show file tree
Hide file tree
Showing 5 changed files with 187 additions and 176 deletions.
101 changes: 52 additions & 49 deletions src/Lynx.Cli/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,81 +30,84 @@
"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": {
"MG": 0,
"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,
Expand Down
32 changes: 20 additions & 12 deletions src/Lynx/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading

0 comments on commit a5ddce7

Please sign in to comment.