Kelp
Kelp is a UCI compatible chess engine written in Rust Using standard chess algorithms.
Kelp is work in progress. Currently, it can be used as a UCI engine But evaluation needs a lot of work to be done especially the endgame evaluation.
Play Against It
Lichess:- https://lichess.org/@/KelpBot
Kelp is UCI compatible it should work with any UCI compatible gui, so far kelp has been tested on Pychess, BanskaiGUI, Arena and cutechess.
Example
Installation
Kelp Binary can be downloaded from Releases page for Windows and Linux.
Build
cargo build --release
About
Board
- A bitboard[12] array is used to represent the board. Each piece is mapped to a bitboard.
- standard make/unmake move functions are used, unmake move use move history to unmake instead of copy/take approach.
Search
- Iterative deepening with aspiration windows.
- Negamax with alpha-beta pruning.
- Principal Variation Search.
- Late Move Reduction.
- Null Move Pruning.
- Quiescence Search.
- Transposition Table.
- Move Ordering
- MVV-LVA
- Killer Moves
- History Heuristic
- PV Table
Evaluation
- Piece Square Tables
- Tapered Eval
- Basic King Safety
- Mobility & Basic Mop Up Evaluation
- Passed Pawns, Isolated Pawns, Doubled Pawns
TODO
- Pawn Structure
- Endgame Evaluation
- Better King Safety and Pawn Shield
- Better Mobility
- Better Mop Up Evaluation
- fix threefold repetition completely (sometimes it doesn't work)
- fix bad evaluation and moves (sometimes it makes bad moves)
- Opening Book
- Better Move Ordering using hash ordering
- Refactor code and make modules private
- Complete Library support
- Better Time Management
- Integrate Syzygy Endgame Tablebases
- Integrate Stockfish's NNUE
Tests
Kelp Implements some basic tests suchs as perft test, fen parsing and incremental update of zobrist hash. Perft results are compared with Perft Results and incremental update of zobrist hash is compared with scratch generation of zobrist hash.
cargo test
References & Resources
Resources that helped me a lot in making this engine.
- Chess Programming Wiki
- Vice by Bluefever Software and corresponfing playlist
- BBC by Code Monkey King and the correspponding playlist
- Pleco Chess Engine
- Chess-rs Chess Engine
- Fruit Chess Engine
- codefish Chess Engine
- TSCP Chess Engine
License
Kelp is licensed under the GNU General Public License v3.0. See LICENSE for details.