From e12c2fc1aef4abc85e49b9e7ed817dde00ece5e0 Mon Sep 17 00:00:00 2001 From: Eren Araz Date: Tue, 8 Sep 2026 01:46:20 +0300 Subject: [PATCH 1/4] add bad noisy futility pruning heuristic --- src/search.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/search.cpp b/src/search.cpp index b5d6951f..d265e2c4 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -781,6 +781,15 @@ Value Worker::search( if (!SEE::see(pos, m, see_threshold - move_history * tuned::see_pvs_hist_mult / 1024)) { continue; } + + int bad_noisy_futility_margin = static_eval + 75 * depth; + if (!is_in_check && depth <= 8 && && moves.stage() == MovePicker::Stage::EmitBadNoisy && bad_noisy_futility_margin <= alpha) { + if (!is_decisive_score(beta) && best_value < bad_noisy_futility_margin) { + best_value = bad_noisy_futility_margin; + } + + break; + } } // Singular extensions From e92eb006329c3156ab0b492334aec18101c76c65 Mon Sep 17 00:00:00 2001 From: Eren Araz Date: Tue, 8 Sep 2026 01:50:16 +0300 Subject: [PATCH 2/4] some cleanups and check if it compiles --- src/search.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index d265e2c4..cf103eb6 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -782,8 +782,10 @@ Value Worker::search( continue; } - int bad_noisy_futility_margin = static_eval + 75 * depth; - if (!is_in_check && depth <= 8 && && moves.stage() == MovePicker::Stage::EmitBadNoisy && bad_noisy_futility_margin <= alpha) { + Value bad_noisy_futility_margin = ss->static_eval + 75 * depth; + if (!is_in_check && depth <= 8 + && moves.stage() == MovePicker::Stage::EmitBadNoisy + && bad_noisy_futility_margin <= alpha) { if (!is_decisive_score(beta) && best_value < bad_noisy_futility_margin) { best_value = bad_noisy_futility_margin; } From d061057b098778c9290745a612385bd0a6f317ab Mon Sep 17 00:00:00 2001 From: Eren Araz Date: Tue, 8 Sep 2026 01:53:01 +0300 Subject: [PATCH 3/4] mr bench and comment bench: 12155224 --- src/search.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index cf103eb6..65439525 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -783,13 +783,13 @@ Value Worker::search( } Value bad_noisy_futility_margin = ss->static_eval + 75 * depth; + // Bad Noisy Futility Pruning if (!is_in_check && depth <= 8 && moves.stage() == MovePicker::Stage::EmitBadNoisy && bad_noisy_futility_margin <= alpha) { if (!is_decisive_score(beta) && best_value < bad_noisy_futility_margin) { best_value = bad_noisy_futility_margin; - } - + } break; } } From c49c4eb5b4c1a97d05e429ec9198c005e053e0bb Mon Sep 17 00:00:00 2001 From: TheRealGioviok <425gioviok@gmail.com> Date: Fri, 11 Sep 2026 21:38:06 +0200 Subject: [PATCH 4/4] Format Bench: 12155224 --- src/search.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 65439525..47cb2cb4 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -784,12 +784,11 @@ Value Worker::search( Value bad_noisy_futility_margin = ss->static_eval + 75 * depth; // Bad Noisy Futility Pruning - if (!is_in_check && depth <= 8 - && moves.stage() == MovePicker::Stage::EmitBadNoisy + if (!is_in_check && depth <= 8 && moves.stage() == MovePicker::Stage::EmitBadNoisy && bad_noisy_futility_margin <= alpha) { if (!is_decisive_score(beta) && best_value < bad_noisy_futility_margin) { best_value = bad_noisy_futility_margin; - } + } break; } }