[][src]Trait oxymcts::LazyTreePolicy

pub trait LazyTreePolicy<State: GameTrait, EV: Evaluator<State, Reward, A>, A: Clone + Default, Reward: Clone> {
    fn tree_policy(
        tree: &mut LazyMctsTree<State, Reward, A>,
        root_state: State,
        evaluator_args: &EV::Args
    ) -> (NodeId, State);
fn best_child(
        tree: &LazyMctsTree<State, Reward, A>,
        turn: &State::Player,
        parent_id: NodeId,
        evaluator_args: &EV::Args
    ) -> NodeId; fn update_state(root_state: State, historic: &[State::Move]) -> State { ... } }

Required methods

fn tree_policy(
    tree: &mut LazyMctsTree<State, Reward, A>,
    root_state: State,
    evaluator_args: &EV::Args
) -> (NodeId, State)

Choose the best node, for example we apply the UCT to choose the best node then we expand it and we return the expansion.

fn best_child(
    tree: &LazyMctsTree<State, Reward, A>,
    turn: &State::Player,
    parent_id: NodeId,
    evaluator_args: &EV::Args
) -> NodeId

This method use the Evaluator to get best child using evaluate_child.

Loading content...

Provided methods

fn update_state(root_state: State, historic: &[State::Move]) -> State

This method is only needed because we don't store the state in each node so we need, to update the state with the stored historic in each node before simulating or expanding it.

Loading content...

Implementors

impl<State, EV, A, Reward> LazyTreePolicy<State, EV, A, Reward> for DefaultLazyTreePolicy<State, EV, A, Reward> where
    State: GameTrait,
    Reward: Clone + Div + Add + ToPrimitive + Zero,
    EV: Evaluator<State, Reward, A, Args = f64>,
    A: Clone + Default
[src]

Loading content...