Use increment from uci winc/binc in time management

This commit is contained in:
stefiosif
2025-01-26 11:00:55 +02:00
parent 2d9076cd1d
commit 7667f7b5d2
8 changed files with 82 additions and 134 deletions

View File

@@ -58,12 +58,12 @@ mod tests {
fn test_transposition_table() -> anyhow::Result<()> {
init_attacks();
let mut game = from_fen(FEN).unwrap();
let time_info = TimeInfo::new(std::time::Instant::now(), 30000);
let time_info = TimeInfo::new(std::time::Instant::now(), 30000, 100);
negamax(&mut game, MIN_SCORE, MAX_SCORE, 2, 0, &time_info, &mut 0)
.expect("Expected a search result");
dbg!(time_info.time.elapsed());
dbg!(time_info.instant.elapsed());
let will_be_hash = from_fen(FEN_POSSIBLE).unwrap().hash;
let tt_entry = game.tt.lookup(will_be_hash);