pub struct AIPlayer { /* private fields */ }
Expand description
AI player for 2048 game
Implementations§
Source§impl AIPlayer
impl AIPlayer
Sourcepub fn new(algorithm: AIAlgorithm) -> Self
pub fn new(algorithm: AIAlgorithm) -> Self
Create a new AI player
Sourcepub fn with_max_depth(self, depth: usize) -> Self
pub fn with_max_depth(self, depth: usize) -> Self
Set the maximum search depth
Sourcepub fn with_simulation_count(self, count: usize) -> Self
pub fn with_simulation_count(self, count: usize) -> Self
Set the number of simulations for MCTS
Sourcepub fn get_best_move(&self, game: &Game) -> GameResult<Direction>
pub fn get_best_move(&self, game: &Game) -> GameResult<Direction>
Get the best move for the current game state
Auto Trait Implementations§
impl Freeze for AIPlayer
impl RefUnwindSafe for AIPlayer
impl Send for AIPlayer
impl Sync for AIPlayer
impl Unpin for AIPlayer
impl UnwindSafe for AIPlayer
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