langgoap.MCTSReuseConfig#
- class MCTSReuseConfig(reuse_tree=False, tree_reuse_decay=0.6, anytime_fallback=False, path_length_budget=None, force_deterministic_tree=False)[source]#
Tree-reuse and variable-depth selection config.
- Parameters:
reuse_tree (bool)
tree_reuse_decay (float)
anytime_fallback (bool)
path_length_budget (int | None)
force_deterministic_tree (bool)
- reuse_tree#
Soemers–Winands CIG 2016 §IV-B tree reuse. When
True, the subtree rooted at the action played last tick is retained across consecutiveMCTSStrategy.plan()calls viaMCTSStrategy.advance(); stored visit counts are multiplied bytree_reuse_decaybefore the next search.- Type:
bool
- tree_reuse_decay#
Decay factor in
[0, 1]applied to carry-over visits. Ignored whenreuse_treeis False.- Type:
float
- anytime_fallback#
Kocsis–Szepesvári “robust” anytime fallback: when
Trueand no goal-terminal leaf was discovered, return a partial plan whose first action is the most-visited root child.- Type:
bool
- path_length_budget#
Pepels BSc §4.1 variable-depth selection budget. When set, selection stops once the cumulative action cost along the root→leaf path reaches this value.
- Type:
int | None
- force_deterministic_tree#
Kocsis–Szepesvári 2006 Determinized UCT. When
True, the tree expands through the deterministic path even when a stochasticTransitionModelis supplied.- Type:
bool
- __init__(reuse_tree=False, tree_reuse_decay=0.6, anytime_fallback=False, path_length_budget=None, force_deterministic_tree=False)#
- Parameters:
reuse_tree (bool)
tree_reuse_decay (float)
anytime_fallback (bool)
path_length_budget (int | None)
force_deterministic_tree (bool)
- Return type:
None
Methods
__init__([reuse_tree, tree_reuse_decay, ...])Attributes