Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add improving to a condition of NMP #5813

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ Kian E (KJE-98)
kinderchocolate
Kiran Panditrao (Krgp)
Kojirion
Krisztián Peőcz
Krystian Kuzniarek (kuzkry)
Leonardo Ljubičić (ICCF World Champion)
Leonid Pechenik (lp--)
Expand Down
6 changes: 3 additions & 3 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -799,11 +799,9 @@ Value Search::Worker::search(
&& eval >= beta && (!ttData.move || ttCapture) && !is_loss(beta) && !is_win(eval))
return beta + (eval - beta) / 3;

improving |= ss->staticEval >= beta + 97;

// Step 9. Null move search with verification search (~35 Elo)
if (cutNode && (ss - 1)->currentMove != Move::null() && eval >= beta
&& ss->staticEval >= beta - 20 * depth + 440 && !excludedMove && pos.non_pawn_material(us)
&& ss->staticEval >= beta - 20 * depth + 470 - 60 * improving && !excludedMove && pos.non_pawn_material(us)
&& ss->ply >= thisThread->nmpMinPly && !is_loss(beta))
{
assert(eval - beta >= 0);
Expand Down Expand Up @@ -842,6 +840,8 @@ Value Search::Worker::search(
}
}

improving |= ss->staticEval >= beta + 97;

// Step 10. Internal iterative reductions (~9 Elo)
// For PV nodes without a ttMove as well as for deep enough cutNodes, we decrease depth.
// This heuristic is known to scale non-linearly, current version was tested at VVLTC.
Expand Down
Loading