Skip to content

Commit

Permalink
Make new nmp params tunable
Browse files Browse the repository at this point in the history
bench 6356992
  • Loading branch information
sroelants committed Oct 6, 2024
1 parent fc9122c commit a3b7ae8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion simbelmyne/src/search/negamax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,9 @@ impl<'a> SearchRunner<'a> {
// shouldn't bother searching it any further
//
////////////////////////////////////////////////////////////////////////
let nmp_margin = -120 + 20 * depth as Score + nmp_improving_margin() * improving as Score;
let nmp_margin = nmp_base_margin()
+ nmp_margin_factor() * depth as Score
+ nmp_improving_margin() * improving as Score;

let should_null_prune = try_null
&& !PV
Expand Down
6 changes: 6 additions & 0 deletions simbelmyne/src/search/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ pub mod tunable_params {
#[uci(min = 0, max = 8, step = 1)]
const NMP_REDUCTION_FACTOR: usize = 4;

#[uci(min = 0, max = 100, step = 5)]
const NMP_BASE_MARGIN: i32 = -120;

#[uci(min = -200 , max = 0, step = 10)]
const NMP_MARGIN_FACTOR: i32 = 20;

#[uci(min = 0, max = 150, step = 10)]
const NMP_IMPROVING_MARGIN: i32 = 70;

Expand Down

0 comments on commit a3b7ae8

Please sign in to comment.