elo: simplify config
This commit is contained in:
parent
e966a3ac9a
commit
94831b720b
12
src/elo.rs
12
src/elo.rs
@ -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,
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user