Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chess Engine

A Python chess engine with UCI support, classical search, static evaluation, and development tools.

Features

  • 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

Requirements

  • Python 3.10+
  • python-chess
  • pytest

Install dependencies:

python -m pip install -r requirements.txt

Usage

Run the UCI engine:

python -m engine.uci

Or use the launcher:

python engine.py

Run the UCI smoke test:

python tools/uci_smoke.py

Development

Run the test suite:

python -m pytest -q

Run a search benchmark:

python tools/search_benchmark.py --depth 4 --tt --tt-size 100000

Run the puzzle suite:

python tools/run_puzzles.py --depth 2 --show-failures

Generate self-play games:

python tools/selfplay.py --games 20 --white-depth 3 --black-depth 4 --white-movetime 80 --black-movetime 80 --pgnout selfplay_match.pgn

Create a PGN quality report:

python tools/match_report.py --pgn selfplay_match.pgn

Project Layout

  • engine/: engine implementation
  • tools/: command-line utilities
  • tests/: pytest suite
  • engine.py: launcher entry point
  • run_myengine.bat: Windows launcher for UCI GUIs

About

A chess engine because I am not good at chess...

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages