def greedy_iterations_maxchild( iterations: int = 100, exploration_weight: float = 0.0) -> 'MonteCarloTreeSearch': stop_cond = IterationsStoppingCondition(iterations=iterations) select_crit = MaxChild() return GreedyMCTS(stopping_condition=stop_cond, selection_criteria=select_crit)
def uct_iterations_maxchild_random_expansion( iterations: int = 100, exploration_weight: float = 0.5) -> 'MonteCarloTreeSearch': stop_cond = IterationsStoppingCondition(iterations=iterations) select_crit = MaxChild() return UCTRandomExpansion(stopping_condition=stop_cond, selection_criteria=select_crit, exploration_weight=exploration_weight)
def uct_anytime_maxchild_random_expansion( seconds: int = 1, exploration_weight: float = 0.5) -> 'MonteCarloTreeSearch': stop_cond = AnytimeStoppingCondition(seconds=seconds) select_crit = MaxChild() return UCTRandomExpansion(stopping_condition=stop_cond, selection_criteria=select_crit, exploration_weight=exploration_weight)
def montecarlo_iterations_maxchild( iterations: int = 100) -> 'MonteCarloBasic': stop_cond = IterationsStoppingCondition(iterations=iterations) select_crit = MaxChild() return MonteCarloBasic(stopping_condition=stop_cond, selection_criteria=select_crit)
def montecarlo_anytime_maxchild(seconds: int = 1) -> 'MonteCarloBasic': stop_cond = AnytimeStoppingCondition(seconds=seconds) select_crit = MaxChild() return MonteCarloBasic(stopping_condition=stop_cond, selection_criteria=select_crit)