A partial UCI chess engine that's a whole lot worse than Drunk Magnus but magnitudes better than me.
You can play against the engine on https://lichess.org/@/patzer-gambit. Make sure to press the challenge button (swords). You can also use a chess gui, like Arena or Encrossaint.
You will need to install rust, rustc, and cargo. You can install it here: https://www.rust-lang.org/.
To build the engine, clone the repo:
git clone https://github.com/shadmanrakib/patzer-gambit.git
Change your directory to /engine:
cd engine
Build and run the engine via cargo:
cargo run --release
To setup, the lichess bot after building, cd out of engine and copy the executable (engine/target/release/engine) to lichess-bot/engines/engine
cp engine/target/release/engine lichess-bot/engines/engine
Then, in the config.yml add your lichess OAuth token. Follow, the README in the lichess-bot directory for more instructions.
Implemented:
- Search
- Negamax
- Iterative Deepening
- Quiescence Search
- Magic Bitboard Move Generation
- Transposition Table Indexed By Zobrist Hashes
- Pruning
- Alpha Beta Pruning
- Null Move Pruning
- Principal Variation Search
- Late Move Reduction
- Move Ordering
- Transposition Table Refutation/Best Move
- Most Valuable Victim Least Valuable Attacker
- Killer Move Heuristic
- Static Exchange Evaluation
- Evaluation
- Tapered Piece Square Tables
- 50 Half-Moves, 3 Fold Repeition, Insufficient Material Draws (evaluated in negamax, not scoring function)
Planned:
- Factor Pawn Structure, Mobility, and King Safety in Evaluation
- Better Time Controls
- Aspiration Windows
These resources have been invaluable references & inspiration: