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

SEE prune tacticals #325

Merged
merged 1 commit into from
Oct 4, 2024
Merged
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
20 changes: 12 additions & 8 deletions simbelmyne/src/search/negamax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,17 +384,21 @@ impl<'a> SearchRunner<'a> {
//
////////////////////////////////////////////////////////////////////

let see_margin = -see_quiet_margin() * depth as Score;

if legal_moves.stage() > Stage::GoodTacticals
// FIXME: Make this mv.is_quiet() at some point, but tweak the
// pruning margin
&& mv.get_type() == MoveType::Quiet
&& (mv.is_tactical() || mv.get_type() == MoveType::Quiet)
&& move_count > 0
&& !in_root
&& !best_score.is_mate()
&& !pos.board.see(mv, see_margin) {
continue;
&& !best_score.is_mate() {

let margin = if mv.get_type() == MoveType::Quiet {
-see_quiet_margin() * depth as Score
} else {
-see_tactical_margin() * depth as Score
};

if !pos.board.see(mv, margin) {
continue;
}
}

////////////////////////////////////////////////////////////////////
Expand Down
3 changes: 3 additions & 0 deletions simbelmyne/src/search/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ pub mod tunable_params {
#[uci(min = 0, max = 200, step = 10)]
const SEE_QUIET_MARGIN: i32 = 40;

#[uci(min = 0, max = 200, step = 10)]
const SEE_TACTICAL_MARGIN: i32 = 100;

////////////////////////////////////////////////////////////////////////////
//
// Singular extensions
Expand Down
Loading