min_arena_depth_sub -> min_arena_depth

This commit is contained in:
Simon Gardling 2025-03-02 10:52:44 -05:00
parent 19b5b856db
commit ed739c7f64
Signed by: titaniumtown
GPG Key ID: 9AB28AC10ECE533D
3 changed files with 6 additions and 10 deletions

View File

@ -7,7 +7,7 @@ use othello::{
fn extend_layers_no_pruning(depth: usize, arena_size: usize) -> usize {
let config = FutureMoveConfig {
max_depth: depth,
min_arena_depth_sub: 0,
min_arena_depth: 0,
top_k_children: 5,
up_to_minus: 4,
max_arena_size: arena_size,

View File

@ -26,10 +26,8 @@ pub struct FutureMoveConfig {
/// Max depth of that we should try and traverse
pub max_depth: usize,
/// subtract this value from FutureMove.max_depth
/// and that would be the min depth an arena should fill for
/// pruning to happen
pub min_arena_depth_sub: usize,
/// the min depth an arena should fill for pruning to happen
pub min_arena_depth: usize,
/// when pruning, keep the top_k # of children
pub top_k_children: usize,
@ -357,9 +355,7 @@ impl FutureMoves {
}
fn prune_bad_children(&mut self) {
if self.config.max_depth > (self.current_depth + self.config.min_arena_depth_sub)
|| self.config.do_not_prune
{
if self.current_depth < self.config.min_arena_depth || self.config.do_not_prune {
return;
}
@ -466,7 +462,7 @@ mod tests {
const FUTURE_MOVES_CONFIG: FutureMoveConfig = FutureMoveConfig {
max_depth: 3, // we want great-grand children for traversing moves
min_arena_depth_sub: 0,
min_arena_depth: 0,
top_k_children: 1,
up_to_minus: 0,
max_arena_size: 100,

View File

@ -14,7 +14,7 @@ fn main() {
Piece::Black,
FutureMoveConfig {
max_depth: 20,
min_arena_depth_sub: 14,
min_arena_depth: 14,
top_k_children: 2,
up_to_minus: 10,
max_arena_size: 50_000_000,