@@ -414,7 +414,7 @@ fn refine(
414414/// probability to lead to a large reward when followed by more slices.
415415pub fn run ( input_part : & Part , config : & Config ) -> Option < CanonicalPlane > {
416416 // A deterministic random number generator.
417- let mut rng = ChaCha8Rng :: seed_from_u64 ( config. random_seed ) ;
417+ let mut rng = ChaCha8Rng :: seed_from_u64 ( config. mcts_random_seed ) ;
418418
419419 // The root MCTS node contains just the input part, unmodified.
420420 let root_node = MctsNode :: new (
@@ -423,24 +423,24 @@ pub fn run(input_part: &Part, config: &Config) -> Option<CanonicalPlane> {
423423 parent_rewards : vec ! [ ] ,
424424 depth : 0 ,
425425 } ,
426- all_actions ( config. num_nodes , & mut rng) ,
426+ all_actions ( config. mcts_grid_nodes , & mut rng) ,
427427 None ,
428428 None ,
429429 ) ;
430430
431431 // Run the MCTS algorithm for the specified compute time to compute a
432432 // probabilistic best path.
433433 let mut mcts = Mcts :: new ( root_node) ;
434- for _ in 0 ..config. iterations {
435- let mut v = mcts. select ( config. exploration_param ) ;
434+ for _ in 0 ..config. mcts_iterations {
435+ let mut v = mcts. select ( config. mcts_exploration ) ;
436436
437- if !mcts. nodes [ v] . is_terminal ( config. max_depth ) {
438- mcts. expand ( v, config. num_nodes , & mut rng) ;
437+ if !mcts. nodes [ v] . is_terminal ( config. mcts_depth ) {
438+ mcts. expand ( v, config. mcts_grid_nodes , & mut rng) ;
439439 let children = & mcts. nodes [ v] . children ;
440440 v = * children. choose ( & mut rng) . unwrap ( ) ;
441441 }
442442
443- let reward = mcts. nodes [ v] . state . simulate ( config. max_depth ) ;
443+ let reward = mcts. nodes [ v] . state . simulate ( config. mcts_depth ) ;
444444 mcts. backprop ( v, reward) ;
445445 }
446446
@@ -454,7 +454,7 @@ pub fn run(input_part: &Part, config: &Config) -> Option<CanonicalPlane> {
454454 & best_path,
455455 // TODO: use one node width scaled to mesh bbox
456456 1.0 ,
457- config. max_depth ,
457+ config. mcts_depth ,
458458 ) ;
459459 Some ( refined_plane)
460460 } else {
0 commit comments