Struct minimax::strategies::negamax::Negamax
source · pub struct Negamax<E: Evaluator> { /* private fields */ }
Implementations§
Trait Implementations§
source§impl<E: Evaluator> Strategy<<E as Evaluator>::G> for Negamax<E>where
<E::G as Game>::S: Clone,
<E::G as Game>::M: Copy,
impl<E: Evaluator> Strategy<<E as Evaluator>::G> for Negamax<E>where <E::G as Game>::S: Clone, <E::G as Game>::M: Copy,
fn choose_move(&mut self, s: &<E::G as Game>::S) -> Option<<E::G as Game>::M>
source§fn set_max_depth(&mut self, depth: u8)
fn set_max_depth(&mut self, depth: u8)
Set the maximum depth to evaluate (instead of the timeout).
This can be changed between calls to choose_move.
source§fn set_timeout(&mut self, _timeout: Duration)
fn set_timeout(&mut self, _timeout: Duration)
For strategies that can ponder indefinitely, set the timeout.
This can be changed between calls to choose_move.
source§fn principal_variation(&self) -> Vec<G::M>
fn principal_variation(&self) -> Vec<G::M>
From the last choose_move call, return the principal variation,
i.e. the best sequence of moves for both players.
Auto Trait Implementations§
impl<E> !RefUnwindSafe for Negamax<E>
impl<E> !Send for Negamax<E>
impl<E> !Sync for Negamax<E>
impl<E> Unpin for Negamax<E>where E: Unpin, <<E as Evaluator>::G as Game>::M: Unpin,
impl<E> !UnwindSafe for Negamax<E>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more