UCI compliant chess engine
Challenge me on Lichess: https://lichess.org/@/FataliiBot
Binaries for Linux and Windows are available on the release page.
To build the engine from source, you need a Rust compiler. Clone the repo:
# Using SSH
git clone git@github.com:FitzOReilly/fatalii.git
# Alternatively, using HTTPS
git clone https://github.com/FitzOReilly/fatalii.git
and build the engine:
cd fatalii
cargo build --profile release-lto --package fatalii --bin fatalii
The binary will be in target/release-lto/fatalii.
Fatalii supports the UCI protocol (universal chess interface), so it can be used with a UCI compatible GUI. Some choices are Cute Chess, Arena or Lucas Chess.
Hash
The size of the hash table in MBMove Overhead
Subtract this value from the movetime to compensate for network delays or GUI overheadsUCI_Chess960
Enable Chess960 if this is set to true
Fatalii supports both standard chess and Chess960 (a.k.a. Fischer Random Chess).
- Bitboards using file rank mapping
- Move generator using kindergarten bitboards for sliding pieces
- Evaluation
- Piece square tables (symmetrical)
- Pawn structure: passed, isolated, backward and doubled pawns
- Mobility
- Bishop pair
- Tempo
- King tropism
- Tapered evaluation for all parameters
- Tuned with training positions from the Zurichess dataset quiet-labeled.v7
- Search
- Iterative deepening
- Principal variation search
- Aspiration windows
- Quiescence search
- Move ordering
- Root move ordering based on the previous iteration and on subtree size
- Principal variation move
- Hash move from the transposition table (if there are multiple TT entries for the position, all of them will be used)
- Queen promotions
- Winning and equal captures (estimated by static exchange evaluation (SEE))
- Killer heuristic
- Countermove heuristic
- History heuristic
- Losing captures (negative SEE)
- Underpromotions last
- Pruning
- Fail-soft alpha-beta pruning
- Null move pruning
- Futility pruning
- Reverse futility pruning
- Late move reductions
- Late move pruning
- SEE pruning
- Delta pruning in quiescence search
- Check extensions
- Transposition table
- Zobrist hashing
- 4 entries per bucket
- Replacement scheme based on entry age and depth
- Draw detection
- 3-fold repetition
- 50 move rule
- Insufficient material
- The Chess Programming Wiki. It has been extremely helpful during development. A lot of ideas have been taken from it and I've also learned a lot from it.
- Other open source chess engines.
- Lichess for being an awesome chess site and for letting bots play there. And https://github.com/lichess-bot-devs/lichess-bot for making it easy to create such a bot.
- The folks at CCRL for rating the engine.
- Cute Chess. The CLI was extensively used for self-play testing.
- The UCI specification: https://www.shredderchess.com/download/div/uci.zip
- http://talkchess.com/forum3/index.php
- https://andrewra.dev/2019/08/05/testing-in-rust-writing-to-stdout/
- Evaluation tuning
- Andrew Grant's paper: https://github.com/AndyGrant/Ethereal/blob/master/Tuning.pdf
- Good explanation of gradient descent optimization algorithms: https://www.ruder.io/optimizing-gradient-descent/
- The Zurichess datasets: https://bitbucket.org/zurichess/tuner/downloads/
- Tuning search parameters