fix logic and minmax
This commit is contained in:
17
src/elo.rs
17
src/elo.rs
@@ -2,7 +2,7 @@ use crate::{
|
||||
agent::{Agent, RandomAgent},
|
||||
complexagent::ComplexAgent,
|
||||
game_inner::GameInner,
|
||||
logic::{ChildrenEvalMethod, FutureMoveConfig},
|
||||
logic::{ChildrenEvalMethod, FutureMoveConfig, FutureMoves},
|
||||
repr::{Board, Piece, Winner},
|
||||
};
|
||||
use indicatif::{ProgressBar, ProgressStyle};
|
||||
@@ -18,18 +18,25 @@ type AgentMaker = Box<dyn Fn(Piece) -> Box<dyn Agent>>;
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn run() {
|
||||
let total_memory = 30_000_000_000;
|
||||
let num_threads = std::thread::available_parallelism()
|
||||
.map(NonZero::get)
|
||||
.expect("unable to get number of threads");
|
||||
let mem_per_thread = total_memory / num_threads;
|
||||
|
||||
let fmv_base = FutureMoveConfig {
|
||||
max_depth: 20,
|
||||
max_depth: 10,
|
||||
min_arena_depth: 14,
|
||||
top_k_children: 2,
|
||||
up_to_minus: 10,
|
||||
max_arena_size: usize::MAX,
|
||||
// max_arena_size: usize::MAX,
|
||||
max_arena_size: mem_per_thread / FutureMoves::ARENA_ENTRY_SIZE,
|
||||
do_prune: false,
|
||||
print: false,
|
||||
children_eval_method: Default::default(),
|
||||
};
|
||||
|
||||
let configs = [4, 5, 6]
|
||||
let configs = [20]
|
||||
.into_iter()
|
||||
.map(move |d| FutureMoveConfig {
|
||||
max_depth: d,
|
||||
@@ -129,7 +136,7 @@ pub fn run() {
|
||||
|
||||
let mut arena = PlayerArena::new(vec);
|
||||
|
||||
arena.prop_arena(100);
|
||||
arena.prop_arena(500);
|
||||
|
||||
println!("{}", arena);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user