Struct myopic_brain::EvalBoard [−][src]
pub struct EvalBoard<B: ChessBoard> { /* fields omitted */ }
Implementations
impl<B> EvalBoard<B> where
B: ChessBoard,
[src]
impl<B> EvalBoard<B> where
B: ChessBoard,
[src]Trait Implementations
impl<B: ChessBoard> ChessBoard for EvalBoard<B>
[src]
impl<B: ChessBoard> ChessBoard for EvalBoard<B>
[src]fn make(&mut self, action: Move) -> Result<()>
[src]
fn make(&mut self, action: Move) -> Result<()>
[src]Evolves the position by making the given move. If the source hash of the move does not match the hash of this position (prior to making the move) then an error will be returned. If the hash matches but the move is illegal in this position (e.g if you manually start creating moves) then the results are undefined. Read more
fn unmake(&mut self) -> Result<Move>
[src]
fn unmake(&mut self) -> Result<Move>
[src]Reverses and returns the move which was made last. If no move has been made yet then an error is returned. Read more
fn compute_moves(&mut self, computation_type: MoveComputeType) -> Vec<Move>
[src]
fn compute_moves(&mut self, computation_type: MoveComputeType) -> Vec<Move>
[src]Compute a vector of all the legal moves in this position for the given computation type. Note there is no particular ordering to the move vector. Read more
fn termination_status(&mut self) -> Option<Termination>
[src]
fn termination_status(&mut self) -> Option<Termination>
[src]Compute the termination state of this node. If it is not terminal nothing is returned, if it is then the manner of termination is returned wrapped inside an Option. The termination can be only a draw or a loss since a side only loses when it runs out of moves, i.e. you don’t play a winning move, you just fail to have a legal move. Read more
fn active(&self) -> Side
[src]
fn active(&self) -> Side
[src]Return the active side in this position, i.e. the one whose turn it is.
fn piece(&self, location: Square) -> Option<Piece>
[src]
fn piece(&self, location: Square) -> Option<Piece>
[src]Return the piece occupying the given location.
fn half_move_clock(&self) -> usize
[src]
fn half_move_clock(&self) -> usize
[src]Return the half move clock value at this position.
fn position_count(&self) -> usize
[src]
fn position_count(&self) -> usize
[src]Return the number of previous positions for this board.
fn remaining_rights(&self) -> EnumSet<CastleZone>
[src]
fn remaining_rights(&self) -> EnumSet<CastleZone>
[src]Return the remaining castling rights from this position.
fn play_pgn(&mut self, moves: &str) -> Result<Vec<Move>>
[src]
fn play_pgn(&mut self, moves: &str) -> Result<Vec<Move>>
[src]Parse the given string as a sequence of pgn encoded moves starting from the current position. The moves are then made one by one. The sequence of moves which were made are returned in a Vec. Read more
fn play_uci(&mut self, moves: &str) -> Result<Vec<Move>>
[src]
fn play_uci(&mut self, moves: &str) -> Result<Vec<Move>>
[src]Parse the given string as a sequence of uci encoded moves starting from the current position. The moves are then made one by one.The sequence of moves which were made are returned in a Vec. Read more
fn parse_uci(&mut self, uci_move: &str) -> Result<Move>
[src]
fn parse_uci(&mut self, uci_move: &str) -> Result<Move>
[src]Given a uci encoded move this method will attempt to match it to the unique matching legal move in this position if it exist. An error is returned if no matching move exists in this position. Read more
fn to_partial_fen(&self, cmps: &[FenComponent]) -> String
[src]
fn to_partial_fen(&self, cmps: &[FenComponent]) -> String
[src]Return the specified components of the FEN encoding of this position in the given order with components separated by a space. Read more
fn all_pieces(&self) -> BitBoard
[src]
fn all_pieces(&self) -> BitBoard
[src]Returns the locations of all pieces on the board.
impl<B: Clone + ChessBoard> Clone for EvalBoard<B>
[src]
impl<B: Clone + ChessBoard> Clone for EvalBoard<B>
[src]impl<B: ChessBoard> EvalChessBoard for EvalBoard<B>
[src]
impl<B: ChessBoard> EvalChessBoard for EvalBoard<B>
[src]fn static_eval(&mut self) -> i32
[src]
fn static_eval(&mut self) -> i32
[src]The static evaluation function assigns a score to this exact position at the point of time it is called. It does not take into account potential captures/recaptures etc. It must follow the rule that ‘a higher score is best for the active side’. That is if it is white to move next then a high positive score indicates a favorable position for white and if it is black to move a high positive score indicates a favorable position for black. If the state it terminal it must return the LOSS_VALUE or DRAW_VALUE depending on the type of termination. Read more
Auto Trait Implementations
impl<B> RefUnwindSafe for EvalBoard<B> where
B: RefUnwindSafe,
B: RefUnwindSafe,
impl<B> Send for EvalBoard<B>
impl<B> Sync for EvalBoard<B> where
B: Sync,
B: Sync,
impl<B> Unpin for EvalBoard<B> where
B: Unpin,
B: Unpin,
impl<B> UnwindSafe for EvalBoard<B> where
B: UnwindSafe,
B: UnwindSafe,
Blanket Implementations
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut Tⓘ
[src]
pub fn borrow_mut(&mut self) -> &mut Tⓘ
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more