Skip to content

Commit

Permalink
⚖️ Remove double pawns penalty [proper SPRT pawn eval] (#746)
Browse files Browse the repository at this point in the history
  • Loading branch information
eduherminio committed May 16, 2024
1 parent df0c6b3 commit 25cb24f
Show file tree
Hide file tree
Showing 5 changed files with 177 additions and 189 deletions.
56 changes: 26 additions & 30 deletions src/Lynx.Cli/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,17 @@
"FP_Margin": 250,

// Evaluation
"DoubledPawnPenalty": {
"MG": -6,
"EG": -12
},
"IsolatedPawnPenalty": {
"MG": -17,
"EG": -13
"MG": -21,
"EG": -17
},
"OpenFileRookBonus": {
"MG": 47,
"EG": 10
"MG": 46,
"EG": 9
},
"SemiOpenFileRookBonus": {
"MG": 18,
"EG": 17
"MG": 15,
"EG": 15
},
"BishopMobilityBonus": {
"MG": 10,
Expand All @@ -84,22 +80,22 @@
},
"QueenMobilityBonus": {
"MG": 4,
"EG": 7
"EG": 8
},
"SemiOpenFileKingPenalty": {
"MG": -36,
"EG": 24
"MG": -41,
"EG": 21
},
"OpenFileKingPenalty": {
"MG": -105,
"EG": 8
"MG": -110,
"EG": 10
},
"KingShieldBonus": {
"MG": 16,
"EG": -6
"MG": 17,
"EG": -5
},
"BishopPairBonus": {
"MG": 31,
"MG": 33,
"EG": 80
},
"PassedPawnBonus": {
Expand All @@ -108,28 +104,28 @@
"EG": 0
},
"Rank1": {
"MG": -2,
"EG": 7
"MG": 4,
"EG": 12
},
"Rank2": {
"MG": -15,
"EG": 13
"MG": -11,
"EG": 19
},
"Rank3": {
"MG": -14,
"EG": 41
"MG": -11,
"EG": 47
},
"Rank4": {
"MG": 20,
"EG": 74
"MG": 21,
"EG": 80
},
"Rank5": {
"MG": 60,
"EG": 150
"MG": 62,
"EG": 158
},
"Rank6": {
"MG": 98,
"EG": 217
"MG": 104,
"EG": 243
},
"Rank7": {
"MG": 0,
Expand Down
30 changes: 14 additions & 16 deletions src/Lynx/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -203,36 +203,34 @@ public sealed class EngineSettings

#region Evaluation

public TaperedEvaluationTerm DoubledPawnPenalty { get; set; } = new(-6, -12);
public TaperedEvaluationTerm IsolatedPawnPenalty { get; set; } = new(-21, -17);

public TaperedEvaluationTerm IsolatedPawnPenalty { get; set; } = new(-17, -13);
public TaperedEvaluationTerm OpenFileRookBonus { get; set; } = new(46, 9);

public TaperedEvaluationTerm OpenFileRookBonus { get; set; } = new(47, 10);

public TaperedEvaluationTerm SemiOpenFileRookBonus { get; set; } = new(18, 17);
public TaperedEvaluationTerm SemiOpenFileRookBonus { get; set; } = new(15, 15);

public TaperedEvaluationTerm BishopMobilityBonus { get; set; } = new(10, 9);

public TaperedEvaluationTerm RookMobilityBonus { get; set; } = new(5, 5);

public TaperedEvaluationTerm QueenMobilityBonus { get; set; } = new(4, 7);
public TaperedEvaluationTerm QueenMobilityBonus { get; set; } = new(4, 8);

public TaperedEvaluationTerm SemiOpenFileKingPenalty { get; set; } = new(-36, 24);
public TaperedEvaluationTerm SemiOpenFileKingPenalty { get; set; } = new(-41, 21);

public TaperedEvaluationTerm OpenFileKingPenalty { get; set; } = new(-105, 8);
public TaperedEvaluationTerm OpenFileKingPenalty { get; set; } = new(-110, 10);

public TaperedEvaluationTerm KingShieldBonus { get; set; } = new(16, -6);
public TaperedEvaluationTerm KingShieldBonus { get; set; } = new(17, -5);

public TaperedEvaluationTerm BishopPairBonus { get; set; } = new(31, 80);
public TaperedEvaluationTerm BishopPairBonus { get; set; } = new(33, 80);

public TaperedEvaluationTermByRank PassedPawnBonus { get; set; } = new(
new(0, 0),
new(-2, 7),
new(-15, 13),
new(-14, 41),
new(20, 74),
new(60, 150),
new(98, 217),
new(4, 12),
new(-11, 19),
new(-11, 47),
new(21, 80),
new(62, 158),
new(104, 243),
new(0, 0));

#endregion
Expand Down

0 comments on commit 25cb24f

Please sign in to comment.