initial elo rating stuff

This commit is contained in:
2025-03-02 22:08:12 -05:00
parent f6c2ef753d
commit 1dd1f3da25
8 changed files with 129 additions and 5 deletions

View File

@@ -41,6 +41,8 @@ pub struct FutureMoveConfig {
pub max_arena_size: usize,
pub do_not_prune: bool,
pub print: bool,
}
impl FutureMoves {
@@ -92,7 +94,7 @@ impl FutureMoves {
}
for _ in self.current_depth..self.config.max_depth {
let pstyle_inner = if cfg!(test) {
let pstyle_inner = if cfg!(test) || !self.config.print {
""
} else {
&format!(
@@ -273,7 +275,9 @@ impl FutureMoves {
self.set_root_idx_raw(curr_board_idx);
false
} else {
println!("regenerating arena from board");
if self.config.print {
println!("regenerating arena from board");
}
self.set_root_from_board(*board);
true
}
@@ -304,6 +308,9 @@ impl FutureMoves {
self.refocus_tree();
self.extend_layers();
if self.config.print {
println!("# of moves stored: {}", self.arena_len());
}
self.compute_values(0..self.arena.len());
// check arena's consistancy
@@ -467,6 +474,7 @@ mod tests {
up_to_minus: 0,
max_arena_size: 100,
do_not_prune: true,
print: false,
};
#[test]