UCI-compliant chess engine written in pure Python
- Bitboard representation
- Pseudo-legal move generation (magic bitboards)
- Incremental apply_move/undo_move
- Perft validated against canonical values
- Evaluation
- Search (negamax + alpha-beta)
- UCI protocol
This project has no external dependencies beyond the standard library. However, the use of PyPy3 is strongly recommended, as it provides a significant performance boost over CPython.
git clone https://github.com/thercstk/filefish.git
cd filefish
pypy3 -m tests.perftKeep in mind that the project is still in development, these are only raw move generation benchmarks.
| File | Role |
|---|---|
constants.py |
General-purpose constants |
board.py |
Board state, apply/undo |
attack_tables.py |
Precomputed attack tables |
movegen.py |
Pseudo-legal move generation |
This engine was inspired by:
- The Chess Programming Wiki — where all the techniques used in this project can be found
- Stockfish — as a design guide, even though this project follows a different implementation path
- Sunfish and D-house — mostly used as a reference point for performance comparisons