elo changes
This commit is contained in:
22
src/elo.rs
22
src/elo.rs
@@ -29,7 +29,8 @@ pub fn run() {
|
|||||||
children_eval_method: ChildrenEvalMethod::Average,
|
children_eval_method: ChildrenEvalMethod::Average,
|
||||||
};
|
};
|
||||||
|
|
||||||
let configs = (6..=7)
|
let configs = [4, 6, 8]
|
||||||
|
.into_iter()
|
||||||
.map(move |d| FutureMoveConfig {
|
.map(move |d| FutureMoveConfig {
|
||||||
max_depth: d,
|
max_depth: d,
|
||||||
..FMV_BASE
|
..FMV_BASE
|
||||||
@@ -38,6 +39,13 @@ pub fn run() {
|
|||||||
// create children which enable, and disable pruning
|
// create children which enable, and disable pruning
|
||||||
[true, false].map(move |do_prune| FutureMoveConfig { do_prune, ..prev_c })
|
[true, false].map(move |do_prune| FutureMoveConfig { do_prune, ..prev_c })
|
||||||
})
|
})
|
||||||
|
.filter(move |move_c| {
|
||||||
|
if move_c.do_prune {
|
||||||
|
move_c.max_depth >= 8
|
||||||
|
} else {
|
||||||
|
move_c.max_depth < 8
|
||||||
|
}
|
||||||
|
})
|
||||||
.flat_map(move |prev_c| {
|
.flat_map(move |prev_c| {
|
||||||
if !prev_c.do_prune {
|
if !prev_c.do_prune {
|
||||||
// do not bother making configs when pruning is disabled
|
// do not bother making configs when pruning is disabled
|
||||||
@@ -46,7 +54,7 @@ pub fn run() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// different values of top_k_children
|
// different values of top_k_children
|
||||||
[1, 2]
|
[1, 2, 3]
|
||||||
.map(move |top_k_children| FutureMoveConfig {
|
.map(move |top_k_children| FutureMoveConfig {
|
||||||
top_k_children,
|
top_k_children,
|
||||||
..prev_c
|
..prev_c
|
||||||
@@ -61,7 +69,7 @@ pub fn run() {
|
|||||||
|
|
||||||
// different values to be subtracted from max_depth
|
// different values to be subtracted from max_depth
|
||||||
// to become min_arena_depth
|
// to become min_arena_depth
|
||||||
[prev_c.max_depth, 1, 3]
|
[1, 2, 3]
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter(|&x| x <= prev_c.max_depth)
|
.filter(|&x| x <= prev_c.max_depth)
|
||||||
.map(move |ad_offset| FutureMoveConfig {
|
.map(move |ad_offset| FutureMoveConfig {
|
||||||
@@ -77,7 +85,7 @@ pub fn run() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// different values of up_to_minus
|
// different values of up_to_minus
|
||||||
[0, 2, 4]
|
[prev_c.max_depth, 1, 2, 3]
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter(|&x| x <= prev_c.max_depth)
|
.filter(|&x| x <= prev_c.max_depth)
|
||||||
.map(move |up_to_minus| FutureMoveConfig {
|
.map(move |up_to_minus| FutureMoveConfig {
|
||||||
@@ -169,11 +177,9 @@ impl PlayerArena {
|
|||||||
std::thread::spawn(move || {
|
std::thread::spawn(move || {
|
||||||
rayon::ThreadPoolBuilder::new()
|
rayon::ThreadPoolBuilder::new()
|
||||||
.num_threads(
|
.num_threads(
|
||||||
(std::thread::available_parallelism()
|
std::thread::available_parallelism()
|
||||||
.map(NonZero::get)
|
.map(NonZero::get)
|
||||||
.expect("unable to get number of threads")
|
.expect("unable to get number of threads"),
|
||||||
/ 5)
|
|
||||||
* 3,
|
|
||||||
)
|
)
|
||||||
.build_global()
|
.build_global()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|||||||
Reference in New Issue
Block a user