elo: simplify config

This commit is contained in:
Simon Gardling 2025-04-28 19:45:47 -04:00
parent e966a3ac9a
commit 94831b720b
Signed by: titaniumtown
GPG Key ID: 9AB28AC10ECE533D
2 changed files with 4 additions and 10 deletions

View File

@ -18,25 +18,19 @@ type AgentMaker = Box<dyn Fn(Piece) -> Box<dyn Agent>>;
#[allow(dead_code)] #[allow(dead_code)]
pub fn run() { pub fn run() {
let total_memory = 30_000_000_000; let total_memory = 30_000_000_000; // 30 GB
let num_threads = std::thread::available_parallelism() let num_threads = std::thread::available_parallelism()
.map(NonZero::get) .map(NonZero::get)
.expect("unable to get number of threads"); .expect("unable to get number of threads");
let mem_per_thread = total_memory / num_threads; let mem_per_thread = total_memory / num_threads;
let fmv_base = FutureMoveConfig { let fmv_base = FutureMoveConfig {
max_depth: 10,
min_arena_depth: 14,
top_k_children: 2,
up_to_minus: 10,
// max_arena_size: usize::MAX,
max_arena_size: mem_per_thread / FutureMoves::ARENA_ENTRY_SIZE, max_arena_size: mem_per_thread / FutureMoves::ARENA_ENTRY_SIZE,
do_prune: false,
print: false, print: false,
children_eval_method: Default::default(), ..Default::default()
}; };
let configs = [4, 5, 6] let configs = [2, 4, 6, 8]
.into_iter() .into_iter()
.map(move |d| FutureMoveConfig { .map(move |d| FutureMoveConfig {
max_depth: d, max_depth: d,

View File

@ -34,7 +34,7 @@ pub struct FutureMoves {
board: Board, board: Board,
} }
#[derive(Copy, Clone, Allocative)] #[derive(Copy, Clone, Allocative, Default)]
pub struct FutureMoveConfig { pub struct FutureMoveConfig {
/// Max depth of that we should try and traverse /// Max depth of that we should try and traverse
pub max_depth: usize, pub max_depth: usize,