Add log for soft limit reach, tweak values, clippy
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user