Panda is a chess engine written in Rust (still a work in progress). It is called Panda because:
- pandas are black and white like a chess board
- pandas are pretty cool
- red pandas are also pretty cool, and they are orange (like Rust)
I used the repo https://github.com/lichess-bot-devs/lichess-bot to create a lichess bot for Panda. Unfortunately it probably won't be online that much because I'm hosting it locally.
- Move Generation
- Magic Bitboards
- Make/Unmake Approach
- Search
- Negamax Search
- Quiescence Search
- Principal Variation Search
- Iterative Deepening
- Transposition Table
- Aspiration Windows
- Internal Iterative Deepening
- Pruning
- Alpha/Beta Pruning
- Null Move Pruning
- Beta Pruning/Reverse Futility Pruning
- Alpha Pruning/Futility Pruning
- Razoring into Quiescence Search
- SEE Pruning
- Mate Distance Pruning
- Late Move Reductions
- Move Ordering
- Moves are ordered as follows:
- Move from transposition table (if available)
- PV Move
- Winning captures by SEE (ordered by MVV/LVA)
- Killer Moves
- Moves Sorted by History Heuristic
- Losing captures by SEE (ordered by MVV/LVA)
- Underpromotions
- Evaluation
- Piece-Square Tables with middlegame and endgame weights
- Mobility Calculations
- Pawn Structure Evaluation + Passed Pawns
- Tapered Evaluation
- Mobility Score
- King Safety
- Some other stuff
The best way to improve the engine's playing strength would probably be to optimise move generation by calculating check and pin masks instead of using make/unmake to verify legality. Instead, I'm probably gonna work on finding a way to tune the evaluation function using Genetic Algorithm/Simulated Annealing because that's more fun.
- Download Rust
- Build and run the project (NOTE: you must use
--release
mode or the magic bitboards will not work) - connect to a UCI gui such as CuteChess or Arena
Here are some of the many resources without which this engine would be much less strong:
- Chess Programming Wiki
- BBC Chess Engine + videos
- Most of all, open source chess engines such as Stockfish, Ethereal and Weiss which have extremely clear and helpful documentation