Struct arbor::MCTS[][src]

pub struct MCTS {
    pub time: Duration,
    pub exploration: f32,
    pub expansion: u32,
    pub use_custom_evaluation: bool,
}

This struct provides methods to set search parameters and control execution. It uses a builder pattern allowing only the desired parameters to be changed from default.

Fields

time: Duration

The amount of time the search is allowed to run before stopping.

exploration: f32

Controls whether exploration vs. exploitation is preferred by the MCTS algorithm. This parameter is described in more detail by the UCT algorithm.

expansion: u32

The minimum number of times a leaf node is visited before it expands to a branch node. A high number will result in a smaller game tree but more confidence about which node to expand next.

use_custom_evaluation: bool

Sets whether the custom evaluation method is used instead of a random playout.

Implementations

impl MCTS[src]

pub fn search<A: Action, S: GameState<A>>(self, state: S) -> A[src]

Call this method to begin searching the given game state.

impl MCTS[src]

pub fn new() -> Self[src]

Call this method to instantiate a new search with default parameters.

pub fn with_time(self, time: Duration) -> Self[src]

Sets the time parameter.

pub fn with_exploration(self, exploration: f32) -> Self[src]

Sets the exploration parameter.

pub fn with_expansion_minimum(self, expansion: u32) -> Self[src]

Sets the expansion parameter

pub fn with_custom_evaluation(self) -> Self[src]

Enables the custom evaluation method.

Trait Implementations

impl Clone for MCTS[src]

impl Copy for MCTS[src]

impl Debug for MCTS[src]

Auto Trait Implementations

impl RefUnwindSafe for MCTS

impl Send for MCTS

impl Sync for MCTS

impl Unpin for MCTS

impl UnwindSafe for MCTS

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>,