Probe TT at each negamax recursion and store entries based on bounds
This commit is contained in:
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user