Skip to content

Commit

Permalink
Add rest of tuned values, averaged for those ones we aren't tapering yet
Browse files Browse the repository at this point in the history
  • Loading branch information
eduherminio committed Sep 21, 2023
1 parent 0468daa commit ca2d671
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
27 changes: 14 additions & 13 deletions src/Lynx.Cli/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,22 @@
"AspirationWindowAlpha": 50,
"AspirationWindowBeta": 50,

"IsolatedPawnPenalty": 10,
"DoubledPawnPenalty": 10,
"IsolatedPawnPenalty": 1,
"DoubledPawnPenalty": 1,
"PassedPawnBonus": [
0,
10,
30,
50,
75,
100,
150,
4,
-2,
19,
44,
82,
136,
200
],
"SemiOpenFileRookBonus": 10,
"OpenFileRookBonus": 15,
"SemiOpenFileKingPenalty": 10,
"OpenFileKingPenalty": 15,
"SemiOpenFileRookBonus": 17,
"OpenFileRookBonus": 31,
"SemiOpenFileKingPenalty": 0,
"OpenFileKingPenalty": -41,
"KingShieldBonus": 5,
"BishopMobilityBonus": 1,
"QueenMobilityBonus": 1,
Expand All @@ -55,7 +55,8 @@
"UseOnlineTablebaseInRootPositions": false,
"UseOnlineTablebaseInSearch": false,
"BenchDepth": 5,
"BishopPairMaxBonus": 100,
"BishopPairMaxBonus": 66,
"BishopPairMinBonus": 23,
"RFP_MaxDepth": 6,
"RFP_DepthScalingFactor": 75
},
Expand Down
1 change: 1 addition & 0 deletions src/Lynx/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ public sealed class EngineSettings
/// It'll be scaled with phase
/// </summary>
public int BishopPairMaxBonus { get; set; } = 100;
public int BishopPairMinBonus { get; set; } = 23;

public int RFP_MaxDepth { get; set; } = 6;

Expand Down
4 changes: 2 additions & 2 deletions src/Lynx/Model/Position.cs
Original file line number Diff line number Diff line change
Expand Up @@ -692,11 +692,11 @@ public int StaticEvaluation(int movesWithoutCaptureOrPawnMove, CancellationToken

if (pieceCount[(int)Piece.B] >= 2)
{
eval += Configuration.EngineSettings.BishopPairMaxBonus * endGamePhase / 24;
eval += ((Configuration.EngineSettings.BishopPairMinBonus * gamePhase) + (Configuration.EngineSettings.BishopPairMaxBonus * endGamePhase)) / 24;
}
if (pieceCount[(int)Piece.b] >= 2)
{
eval -= Configuration.EngineSettings.BishopPairMaxBonus * endGamePhase / 24;
eval -= ((Configuration.EngineSettings.BishopPairMinBonus * gamePhase) + (Configuration.EngineSettings.BishopPairMaxBonus * endGamePhase)) / 24;
}

return Side == Side.White
Expand Down

0 comments on commit ca2d671

Please sign in to comment.