[][src]Crate myopic_brain

Modules

constants
hash
interactive
negascout
pos

Structs

BitBoard

A bitboard is a value type wrapping a 64 bit integer which represents a set of squares on a chess board. Each bit is mapped to a particular square on the board, 0 -> H1, 1 -> G1,..., 8 -> H2,..., 63 -> A8. For example if we know a piece to reside on a particular square we can use a bitboard to to capture the available moves for that piece.

Board
CastleZoneSet
EvalBoard
MaterialParameters

Allows one to configure the parameters of the evaluation board.

PieceValues
PositionTables
SearchOutcome

Data class composing information/result about/of a best move search.

UciMove

String wrapper representing a chess move formatted using the uci standard. We can use this to reflect moves outside the context of a board.

Enums

CastleZone

Represents one of the four different areas on a chessboard where the special castling move can take place (two for each side).

Dir

Type representing a square on a chessboard.

FenComponent

Represents the individual components which make up a board position encoded as a FEN string.

Move
MoveComputeType
Piece

Value type wrapping a single integer representing one of the 12 different pieces in a game of chess.

Side

Represents the two different teams in a game of chess.

Square

Type representing a square on a chessboard.

Termination

Represents the possible ways a game can be terminated, we only consider a game to be terminated when a side has no legal moves to make or if a special draw condition is met like position repetition. If a side has no legal moves and is currently in check then the game is lost, if it is not in check then the game is drawn.

Constants

STARTPOS_FEN

The start position of a chess game encoded in FEN format

Traits

ChessBoard

Trait representing a mutable state of play of a chess game which can be evolved/devolved via (applicable) Move instances, compute the set of legal moves and queried for a variety of properties.

EvalChessBoard

Extension of the Board trait which adds a static evaluation function.

Reflectable

Chess is a symmetric game and this trait represents a component of the game which can be reflected to it's symmetric opposite component.

SearchTerminator

Represents some object which can determine whether a search should be terminated given certain context about the current state. Implementations are provided for Duration (caps the search based on time elapsed), for usize which represents a maximum search depth and for a pair (Duration, usize) which combines both checks.

Functions

search

API function for executing search on the calling thread, we pass a root state and a terminator and compute the best move we can make from this state within the duration constraints implied by the terminator.

start

Return the start position of a standard game