From 36128c22c81ea8444302fea88fe4876c55328b19 Mon Sep 17 00:00:00 2001 From: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> Date: Fri, 28 Jan 2022 22:51:27 +0100 Subject: [PATCH] less broken --- Cargo.toml | 2 +- src/lib.rs | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c71cee9..5bc7823 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,5 +6,5 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -bumpalo = { version = "3.9.1", features = ["collections"] } +bumpalo = { version = "3.9.1", features = [] } rand = "0.8.4" diff --git a/src/lib.rs b/src/lib.rs index 0b41e60..9ce4e36 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -62,16 +62,14 @@ mod mcts { } } - const MAX_TRIES: u64 = 5; + const MAX_TRIES: u64 = 10_000; pub fn find_next_move(current_state: S, opponent: S::Player) -> S { let alloc = Bump::new(); let root_node = alloc.alloc(Node::new(current_state, &alloc)); - for i in 0..MAX_TRIES { - dbg!(i); - + for _ in 0..MAX_TRIES { let promising_node = select_promising_node(root_node); if promising_node.state.status() == Status::InProgress {