A Python chess engine with UCI support, classical search, static evaluation, and development tools.
- UCI protocol support for chess GUIs and tournament managers
- Negamax search with alpha-beta pruning
- Quiescence search and iterative deepening
- Transposition table with bound flags and depth-preferred replacement
- Move ordering with capture scoring, killer moves, history scores, and null-move pruning
- Static evaluation with material, piece-square tables, tapered scoring, and mobility
- Utility scripts for UCI smoke tests, puzzle checks, self-play, benchmarking, and PGN reports
- Python 3.10+
python-chesspytest
Install dependencies:
python -m pip install -r requirements.txtRun the UCI engine:
python -m engine.uciOr use the launcher:
python engine.pyRun the UCI smoke test:
python tools/uci_smoke.pyRun the test suite:
python -m pytest -qRun a search benchmark:
python tools/search_benchmark.py --depth 4 --tt --tt-size 100000Run the puzzle suite:
python tools/run_puzzles.py --depth 2 --show-failuresGenerate self-play games:
python tools/selfplay.py --games 20 --white-depth 3 --black-depth 4 --white-movetime 80 --black-movetime 80 --pgnout selfplay_match.pgnCreate a PGN quality report:
python tools/match_report.py --pgn selfplay_match.pgnengine/: engine implementationtools/: command-line utilitiestests/: pytest suiteengine.py: launcher entry pointrun_myengine.bat: Windows launcher for UCI GUIs