Skip to content

Commit

Permalink
πŸ” Improve RFP return formula: (staticEval + beta)/2 (#652)
Browse files Browse the repository at this point in the history
  • Loading branch information
eduherminio authored Feb 14, 2024
1 parent 56fb596 commit 9b82924
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Lynx/Search/NegaMax.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,10 @@ private int NegaMax(int depth, int ply, int alpha, int beta, bool parentWasNullM
if (depth <= Configuration.EngineSettings.RFP_MaxDepth)
{
// πŸ” Reverse Futility Pruning (RFP) - https://www.chessprogramming.org/Reverse_Futility_Pruning
// Return formula by Ciekce, instead of just returning static eval
if (staticEval - (Configuration.EngineSettings.RFP_DepthScalingFactor * depth) >= beta)
{
return staticEval;
return (staticEval + beta) / 2;
}

// πŸ” Razoring - Strelka impl (CPW) - https://www.chessprogramming.org/Razoring#Strelka
Expand Down

0 comments on commit 9b82924

Please sign in to comment.