Skip to content

Commit

Permalink
Increase search margins by 5%
Browse files Browse the repository at this point in the history
  • Loading branch information
codedeliveryservice committed May 11, 2024
1 parent e6c4916 commit 2e2aab6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/search/alphabeta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::{
types::{Move, Score, MAX_PLY},
};

const DEEPER_SEARCH_MARGIN: i32 = 80;
const DEEPER_SEARCH_MARGIN: i32 = 84;
const IIR_DEPTH: i32 = 4;

impl super::SearchThread<'_> {
Expand Down Expand Up @@ -32,7 +32,7 @@ impl super::SearchThread<'_> {
return alpha;
}
}

// Prevent overflows
if self.board.ply >= MAX_PLY - 1 {
return self.board.evaluate();
Expand Down
2 changes: 1 addition & 1 deletion src/search/quiescence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::{
types::{Move, Piece, Score, MAX_PLY},
};

const PIECE_VALUES: [i32; 5] = [400, 750, 800, 1200, 1900];
const PIECE_VALUES: [i32; 5] = [420, 787, 840, 1260, 1995];

impl super::SearchThread<'_> {
/// Performs a search until the position becomes stable enough for static evaluation.
Expand Down
10 changes: 5 additions & 5 deletions src/search/selectivity.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
use crate::types::{Move, Score};

const RFP_MARGIN: i32 = 75;
const RFP_MARGIN: i32 = 78;
const RFP_DEPTH: i32 = 7;

const NMP_DEPTH: i32 = 3;
const NMP_REDUCTION: i32 = 3;
const NMP_DIVISOR: i32 = 4;

const RAZORING_DEPTH: i32 = 4;
const RAZORING_MARGIN: i32 = 220;
const RAZORING_FIXED_MARGIN: i32 = 135;
const RAZORING_MARGIN: i32 = 231;
const RAZORING_FIXED_MARGIN: i32 = 141;

const LMR_MOVES_PLAYED: i32 = 3;
const LMR_DEPTH: i32 = 3;
Expand All @@ -21,8 +21,8 @@ const QLMP_DEPTH: i32 = 4;
const QLMP_QUIETS_PLAYED: i32 = 3;

const FUTILITY_DEPTH: i32 = 5;
const FUTILITY_MARGIN: i32 = 130;
const FUTILITY_FIXED_MARGIN: i32 = 45;
const FUTILITY_MARGIN: i32 = 136;
const FUTILITY_FIXED_MARGIN: i32 = 47;

impl super::SearchThread<'_> {
/// If the static evaluation of the position is significantly higher than beta
Expand Down

0 comments on commit 2e2aab6

Please sign in to comment.