diff --git a/src/search/iterative_deepening.rs b/src/search/iterative_deepening.rs index 2fcaba9..f7eb55c 100644 --- a/src/search/iterative_deepening.rs +++ b/src/search/iterative_deepening.rs @@ -18,6 +18,7 @@ pub fn iterative_deepening( for depth in 1..=max_depth { if time.exceed_soft_limit() { + write_response(&mut io::stdout(), &Response::Info("Soft limit exceeded in negamax".to_string()))?; return Ok(best_move); } diff --git a/src/search/mod.rs b/src/search/mod.rs index b94e492..56d4b73 100644 --- a/src/search/mod.rs +++ b/src/search/mod.rs @@ -7,8 +7,8 @@ pub mod time; pub mod transposition_table; pub const MAX_DEPTH: u8 = 50; -pub const TIME: u128 = 1000; -pub const INC: u128 = 1000; +pub const TIME: u128 = 8000; +pub const INC: u128 = 80; pub const HARD_LIMIT_DIVISION: u128 = 3; pub const SOFT_LIMIT_DIVISION: u128 = 20; -pub const MAX_TT_SIZE: u64 = 3000000; +pub const MAX_TT_SIZE: u64 = 1500000; diff --git a/src/search/transposition_table.rs b/src/search/transposition_table.rs index 877740f..5ac30da 100644 --- a/src/search/transposition_table.rs +++ b/src/search/transposition_table.rs @@ -15,8 +15,7 @@ impl TranspositionTable { } pub fn lookup(&self, zobrist_hash: ZobristHash) -> Option<&TTEntry> { - self - .positions + self.positions .get((zobrist_hash.0 % self.size) as usize) .and_then(|entry| entry.as_ref()) }