Struct zero_sum::analysis::search::PvSearch [] [src]

pub struct PvSearch<S, E> where
    S: State + Extrapolatable<<S as State>::Ply>,
    E: Evaluator<State = S>, 
{ /* fields omitted */ }

A PVS implementation of Search with a few common optimizations.

Example

let state = State::new();
let (interrupt_sender, interrupt_receiver) = std::sync::mpsc::channel();

let evaluator = Evaluator;
let mut search = PvSearch::with_depth(evaluator, 5);
let analysis = search.search(&state, Some(interrupt_receiver));

Methods

impl<S, E> PvSearch<S, E> where
    S: State + Extrapolatable<<S as State>::Ply>,
    E: Evaluator<State = S>, 
[src]

Creates a PvSearch without a target depth or time goal. It will search until it finds a favorable resolution, or until the search is interrupted.

Creates a PvSearch that will search to a maximum depth of depth.

Creates a PvSearch that will search until it predicts that it will exceed goal seconds with the next depth. branching_factor is used to predict the required time to search at the next depth.

Trait Implementations

impl<S, E> Search<S> for PvSearch<S, E> where
    S: 'static + State + Extrapolatable<<S as State>::Ply>,
    E: 'static + Evaluator<State = S>, 
[src]

Generates an analysis of state. interrupt is optionally provided to interrupt long searches.