Struct minimax::strategies::random::Random
source · pub struct Random<G: Game> { /* private fields */ }
Implementations§
Trait Implementations§
source§impl<G: Game> Strategy<G> for Random<G>where
G::M: Copy,
impl<G: Game> Strategy<G> for Random<G>where G::M: Copy,
fn choose_move(&mut self, s: &G::S) -> Option<G::M>
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 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 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<G> !RefUnwindSafe for Random<G>
impl<G> !Send for Random<G>
impl<G> !Sync for Random<G>
impl<G> Unpin for Random<G>where G: Unpin,
impl<G> !UnwindSafe for Random<G>
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