pub struct MinimaxEngine {
pub config: MinimaxConfig,
/* private fields */
}Expand description
Alpha-beta negamax search engine over the exact Quantik game tree.
Fields§
§config: MinimaxConfigImplementations§
Source§impl MinimaxEngine
impl MinimaxEngine
pub fn new(config: MinimaxConfig) -> Self
Sourcepub fn solve(&mut self, state: &State) -> Result<MinimaxResult, String>
pub fn solve(&mut self, state: &State) -> Result<MinimaxResult, String>
Exact solve: Self::search with max_depth = 16 and no time limit.
Every Quantik game resolves (win or no-legal-moves) within 16 plies, so a depth-16 search from any reachable position always terminates on true terminal nodes rather than the heuristic eval cutoff.
Sourcepub fn search(&mut self, state: &State) -> Result<MinimaxResult, String>
pub fn search(&mut self, state: &State) -> Result<MinimaxResult, String>
Iterative-deepening alpha-beta negamax search from state.
Deepens from depth 1 to config.max_depth (or until
config.time_limit_s elapses), seeding each iteration’s root move
order with the previous iteration’s principal variation. Returns the
deepest iteration that completed before any time limit; the depth-1
iteration always runs to completion.
Auto Trait Implementations§
impl Freeze for MinimaxEngine
impl RefUnwindSafe for MinimaxEngine
impl Send for MinimaxEngine
impl Sync for MinimaxEngine
impl Unpin for MinimaxEngine
impl UnsafeUnpin for MinimaxEngine
impl UnwindSafe for MinimaxEngine
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more