Blobfish2 is a chess engine.
The spiritual sequel to Blobfish, written in pure (not very portable, but trying) C.
This engine is accompanied by a tutorial book (WIP).
WIP
Ease of building Blobfish2 and portability is a goal. Portability isn't always trivial when writing a chess engine due to the usage of architecture-specific bit-twiddling functions such as "index of LSB". Using SIMD only complicates the matter further.
We generate some lookup tables with a Python script, located in scripts/
.
Minimal example:
cmake -S . -B build
cmake --build build
Building in release mode: cmake -S . -B build-release -DCMAKE_BUILD_TYPE=Release
- Right now, the engine implements the minimum for compatibility with UCI GUIs.
UCI compliance tested with cutechess
In-engine tests need to be run with repository as working directory.
Engine command: test perft
This may take a few minutes.
Issues with 960 and castling correctness (i.e. handicap positions) are TODO.
Engine command: test puzzles
Lichess puzzle requirements: puzzle database downloaded and extracted from https://database.lichess.org/#puzzles into test/
- Any checkmate move wins the puzzle
Engine command: test performance
Move generator performance is tracked by running perft(5).
Scripts in test/
Requirements: blobfish
, stockfish
, cutechess-cli
commands available in $PATH
Engine design is documented in the book (WIP).