mirror of
https://github.com/Noratrieb/monte-carlo-tree-search.git
synced 2026-01-14 07:15:07 +01:00
less broken
This commit is contained in:
parent
00c5fd3754
commit
36128c22c8
2 changed files with 3 additions and 5 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -62,16 +62,14 @@ mod mcts {
|
|||
}
|
||||
}
|
||||
|
||||
const MAX_TRIES: u64 = 5;
|
||||
const MAX_TRIES: u64 = 10_000;
|
||||
|
||||
pub fn find_next_move<S: GameState>(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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue