From 4bcfde6461e11196c2b8ecf743f84c3a2c60c5c9 Mon Sep 17 00:00:00 2001 From: dogeystamp Date: Tue, 24 Dec 2024 10:40:57 -0500 Subject: [PATCH] tune: quiescence parameters --- src/search.rs | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/src/search.rs b/src/search.rs index 464b312..570fecf 100644 --- a/src/search.rs +++ b/src/search.rs @@ -124,7 +124,7 @@ impl Default for SearchConfig { alpha_beta_on: true, // try to make this even to be more conservative and avoid horizon problem depth: 10, - qdepth: 2, + qdepth: 3, enable_trans_table: true, transposition_size: 24, } @@ -272,7 +272,7 @@ fn minmax(board: &mut Board, state: &mut EngineState, mm: MinmaxState) -> (Vec bool { let see = board.eval_see(mv.dest, board.turn); - see > 0 + see >= 0 }); } @@ -419,12 +419,25 @@ impl TimeLimits { ) -> TimeLimits { // hard timeout (max) let mut hard_ms = 100_000; - // soft timeout (max) + // soft timeout (default max) let mut soft_ms = 1_200; - // if we have more than 5 minutes, and we're out of the opening, we can afford to think longer - if ourtime_ms > 300_000 && eval.phase <= 13 { - soft_ms = 4_500 + // in some situations we can think longer + if eval.phase <= 13 { + // phase 13 is a single capture of a minor/major piece, so consider that out of the + // opening + + soft_ms = if ourtime_ms > 150_000 { + 2_500 + } else if ourtime_ms > 300_000 { + 4_500 + } else if ourtime_ms > 600_000 { + 8_000 + } else if ourtime_ms > 1_200_000 { + 12_000 + } else { + soft_ms + } } let factor = if ourtime_ms > 5_000 { 10 } else { 40 };