Probe TT at each negamax recursion and store entries based on bounds

This commit is contained in:
stefiosif
2024-10-14 23:57:54 +03:00
parent 33617df497
commit b2df931d48
5 changed files with 135 additions and 68 deletions

View File

@@ -4,7 +4,7 @@ use std::{
};
use crate::{
board::game::Game,
board::{game::Game, transposition_table::TranspositionTable},
evaluation::{MAX_SCORE, MIN_SCORE},
movegen::r#move::Move,
search,
@@ -142,12 +142,14 @@ pub fn uci_go(go: &mut SplitWhitespace, game: &mut Game) -> Result<Move, String>
_ => (),
}
}
let mut tt = TranspositionTable::new(1000000);
Ok(search::negamax::negamax(
game,
MIN_SCORE,
MAX_SCORE,
params.depth.unwrap_or(MAX_DEPTH),
0,
&mut tt,
)
.0
.expect("No move selected"))