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]
S: State + Extrapolatable<<S as State>::Ply>,
E: Evaluator<State = S>,
fn new(evaluator: E) -> PvSearch<S, E>
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.
fn with_depth(evaluator: E, depth: u8) -> PvSearch<S, E>
Creates a PvSearch
that will search to a maximum depth of depth
.
fn with_goal(evaluator: E, goal: u16, branching_factor: f32) -> PvSearch<S, E>
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]
S: 'static + State + Extrapolatable<<S as State>::Ply>,
E: 'static + Evaluator<State = S>,