pub trait AlphaBetaMiniMaxStrategy: GameStrategy {
fn get_best_move(
&mut self,
max_depth: i64,
is_maximizing: bool
) -> <Self as GameStrategy>::Move;
fn minimax_score(
&mut self,
depth: i64,
is_maximizing: bool,
alpha: f64,
beta: f64,
max_depth: i64
) -> f64;
}
Expand description
The behaviour required of any minimax game engine.
Required Methods
fn get_best_move(
&mut self,
max_depth: i64,
is_maximizing: bool
) -> <Self as GameStrategy>::Move
fn get_best_move(
&mut self,
max_depth: i64,
is_maximizing: bool
) -> <Self as GameStrategy>::Move
The ability to get the best move in the current state and for the current player.
Implementors
impl<T: GameStrategy> AlphaBetaMiniMaxStrategy for T
Endow upon anything the ability to use the AlphaBetaMiniMaxStrategy implementation of the game engine as long as it understands how to behave as Strategy.