[][src]Struct myopic_brain::negamax::Searcher

pub struct Searcher<'a, T, B, M> where
    T: SearchTerminator,
    B: EvalBoard,
    M: MoveQualityEstimator<B>, 
{ pub terminator: &'a T, pub principle_variation: &'a Vec<Move>, pub move_quality_estimator: M, pub board_type: PhantomData<B>, }

Fields

terminator: &'a T

The terminator is responsible for deciding when the search is complete

principle_variation: &'a Vec<Move>

The principle variation is a search optimisation which comes from "iterative deepening". The idea is that if we do a search at a lower depth then the optimal path recovered from that is a good candidate to search first in a deeper search

move_quality_estimator: M

Used for performing an initial sort on the moves generated in each position for optimising the search

board_type: PhantomData<B>

Placeholder to satisfy the compiler because of the 'unused' type parameter for the board

Implementations

impl<T, B, M, '_> Searcher<'_, T, B, M> where
    T: SearchTerminator,
    B: EvalBoard,
    M: MoveQualityEstimator<B>, 
[src]

pub fn search(
    &self,
    root: &mut B,
    ctx: SearchContext
) -> Result<SearchResponse, String>
[src]

Auto Trait Implementations

impl<'a, T, B, M> RefUnwindSafe for Searcher<'a, T, B, M> where
    B: RefUnwindSafe,
    M: RefUnwindSafe,
    T: RefUnwindSafe
[src]

impl<'a, T, B, M> Send for Searcher<'a, T, B, M> where
    M: Send,
    T: Sync
[src]

impl<'a, T, B, M> Sync for Searcher<'a, T, B, M> where
    B: Sync,
    M: Sync,
    T: Sync
[src]

impl<'a, T, B, M> Unpin for Searcher<'a, T, B, M> where
    B: Unpin,
    M: Unpin
[src]

impl<'a, T, B, M> UnwindSafe for Searcher<'a, T, B, M> where
    B: UnwindSafe,
    M: UnwindSafe,
    T: RefUnwindSafe
[src]

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