#4 · Primary category: Optimization & Heuristic Algorithms

sunfish

ai chess chess-ai chess-engine python sunfish

Sunfish: a Python Chess Engine in 111 lines of code

Project last updated:08/27/26

GitHub Stars

3.3K

Forks

583

Contributors

24

License

Other

Why we included this project

Sunfish is a Python chess engine that fits in a single small file and still plays at ratings above 2000 on Lichess. That combination is the whole point: because the code is short and deliberately simple, it is one of the few engines you can actually read line by line, and the project has been used to test parallel search ideas, tune evaluation functions, and build deep-learning chess programs. It speaks the standard UCI protocol, so it plugs into existing chess frontends, and the included terminal client lets you play against it directly. For anyone curious about how a chess engine works under the hood, or looking for a compact base to experiment with, this is an easy place to start.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category