Expand description
stockfish is a lightweight wrapper library for the Stockfish chess engine.
- Creation & Setup — Pass the path to the binary executable to
Stockfish::new, and then callStockfish::setup_for_new_gameto ensure that it is ready for further commands. - Position — Use methods like
Stockfish::set_fen_positionandStockfish::play_movesto configure the chess position that Stockfish is working with. - Compute — Using methods such as
Stockfish::goorStockfish::go_for, prompt Stockfish to start calculating given the current chess position. - Output — Accessory types have been included (
EngineEval,EvalType,EngineOutput) to structure the output from Stockfish after it has concluded its calculations.
Structs§
- Engine
Eval - Represents the evaluation returned from the engine. Includes
EvalTypeand a numerical score value. - Engine
Output - The sum of the output from the engine. Includes
EngineEvaland a string representation of the engine’s returned best move (given in long algebraic notation; e.g.,"e2e4"). - Stockfish
- An interface for interacting with a Stockfish process.
Enums§
- Eval
Type - The category of evaluation returned by stockfish. Either
CentipawnsorMate.