[][src]Struct oxymcts::LazyMcts

pub struct LazyMcts<'a, State, TP, PP, BP, EV, AddInfo, Reward> where
    State: GameTrait,
    TP: LazyTreePolicy<State, EV, AddInfo, Reward>,
    PP: Playout<State>,
    BP: BackPropPolicy<Vec<State::Move>, State::Move, Reward, AddInfo, EV::EvalResult>,
    EV: Evaluator<State, Reward, AddInfo>,
    AddInfo: Clone + Default,
    Reward: Clone
{ /* fields omitted */ }

This is a special MCTS because it doesn't store the state in the node but instead stores the historic to the node.

Implementations

impl<'a, State, TP, PP, BP, EV, A, R> LazyMcts<'a, State, TP, PP, BP, EV, A, R> where
    State: GameTrait,
    TP: LazyTreePolicy<State, EV, A, R>,
    PP: Playout<State>,
    BP: BackPropPolicy<Vec<State::Move>, State::Move, R, A, EV::EvalResult>,
    EV: Evaluator<State, R, A>,
    A: Clone + Default,
    R: Clone + Div + ToPrimitive + Zero + Add + Display
[src]

pub fn new(root_state: &'a State) -> Self[src]

pub fn with_capacity(root_state: &'a State, capacity: usize) -> Self[src]

pub fn execute(&mut self, evaluation_args: &EV::Args, playout_args: PP::Args)[src]

Executes one selection, expansion?, simulation, backpropagation.

pub fn best_move(&self, evaluator_args: &EV::Args) -> State::Move[src]

Returns the best move from the root.

pub fn write_tree(&self) -> String[src]

pub fn tree(&self) -> &LazyMctsTree<State, R, A>[src]

Trait Implementations

impl<'a, State: Clone, TP: Clone, PP: Clone, BP: Clone, EV: Clone, AddInfo: Clone, Reward: Clone> Clone for LazyMcts<'a, State, TP, PP, BP, EV, AddInfo, Reward> where
    State: GameTrait,
    TP: LazyTreePolicy<State, EV, AddInfo, Reward>,
    PP: Playout<State>,
    BP: BackPropPolicy<Vec<State::Move>, State::Move, Reward, AddInfo, EV::EvalResult>,
    EV: Evaluator<State, Reward, AddInfo>,
    AddInfo: Clone + Default,
    Reward: Clone
[src]

impl<State, TP, PP, BP, EV, A, R, '_> Debug for LazyMcts<'_, State, TP, PP, BP, EV, A, R> where
    State: GameTrait,
    TP: LazyTreePolicy<State, EV, A, R>,
    PP: Playout<State>,
    BP: BackPropPolicy<Vec<State::Move>, State::Move, R, A, EV::EvalResult>,
    EV: Evaluator<State, R, A>,
    EV::EvalResult: Debug,
    A: Clone + Default + Debug,
    R: Clone + Debug + Div + Add + Zero + ToPrimitive
[src]

Auto Trait Implementations

impl<'a, State, TP, PP, BP, EV, AddInfo, Reward> RefUnwindSafe for LazyMcts<'a, State, TP, PP, BP, EV, AddInfo, Reward> where
    AddInfo: RefUnwindSafe,
    BP: RefUnwindSafe,
    EV: RefUnwindSafe,
    PP: RefUnwindSafe,
    Reward: RefUnwindSafe,
    State: RefUnwindSafe,
    TP: RefUnwindSafe,
    <State as GameTrait>::Move: RefUnwindSafe

impl<'a, State, TP, PP, BP, EV, AddInfo, Reward> Send for LazyMcts<'a, State, TP, PP, BP, EV, AddInfo, Reward> where
    AddInfo: Send,
    BP: Send,
    EV: Send,
    PP: Send,
    Reward: Send,
    State: Sync,
    TP: Send,
    <State as GameTrait>::Move: Send

impl<'a, State, TP, PP, BP, EV, AddInfo, Reward> Sync for LazyMcts<'a, State, TP, PP, BP, EV, AddInfo, Reward> where
    AddInfo: Sync,
    BP: Sync,
    EV: Sync,
    PP: Sync,
    Reward: Sync,
    State: Sync,
    TP: Sync,
    <State as GameTrait>::Move: Sync

impl<'a, State, TP, PP, BP, EV, AddInfo, Reward> Unpin for LazyMcts<'a, State, TP, PP, BP, EV, AddInfo, Reward> where
    AddInfo: Unpin,
    BP: Unpin,
    EV: Unpin,
    PP: Unpin,
    Reward: Unpin,
    TP: Unpin,
    <State as GameTrait>::Move: Unpin

impl<'a, State, TP, PP, BP, EV, AddInfo, Reward> UnwindSafe for LazyMcts<'a, State, TP, PP, BP, EV, AddInfo, Reward> where
    AddInfo: UnwindSafe,
    BP: UnwindSafe,
    EV: UnwindSafe,
    PP: UnwindSafe,
    Reward: UnwindSafe,
    State: RefUnwindSafe,
    TP: UnwindSafe,
    <State as GameTrait>::Move: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,