diff options
author | eug-vs <eugene@eug-vs.xyz> | 2024-01-21 17:22:49 +0100 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2024-01-21 17:32:25 +0100 |
commit | 9926ba6c4f97669c9683996a7c9d37499f118135 (patch) | |
tree | bb9aac689d5246201d44af65f52741d42370f4d6 /src/grossmeister/search.rs | |
parent | 5c931ac8a8c8a1ec83e4ca1e5e6d54844df87eb7 (diff) | |
download | chessnost-9926ba6c4f97669c9683996a7c9d37499f118135.tar.gz |
feat: implement two-tier transposition table
Diffstat (limited to 'src/grossmeister/search.rs')
-rw-r--r-- | src/grossmeister/search.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/grossmeister/search.rs b/src/grossmeister/search.rs index d9dbdf1..a4b6707 100644 --- a/src/grossmeister/search.rs +++ b/src/grossmeister/search.rs @@ -267,7 +267,7 @@ impl Grossmeister { let mut pv = Vec::with_capacity(depth as usize); if depth > 0 { - if let Some(transposition) = self.transposition() { + if let Some(transposition) = self.transposition().cloned() { if let Some(mov) = transposition.mov { debug_assert!(transposition.depth >= depth, "TTable node should be at least as deep as we expect"); if transposition.depth > depth { @@ -362,7 +362,7 @@ impl Grossmeister { } } - println!("info hashfull {}", 1000 * self.transposition_table.iter().filter(|item| item.is_some()).count() / self.transposition_table.len()); + println!("info hashfull {}", self.table_full()); if !pv.is_empty() { print!("bestmove {}", pv[0]); if pv.len() > 1 { |