Chess has 10^120 moves! Although it starts with only 20 moves, by the time both white and black have played, there are around 400 different positions that could result! Given the size of this problem, how is it possible for a chess engine to find the perfect move?
With this question in mind, I created a series of posts to walk through the basics of building a chess engine, called PyMinMaximus, from scratch. PyMinMaximus may not be good enough to beat a chess master, but by the end of this series, we will have a chess engine that is fully capable of playing a complete game. Although not a high bar, it is good enough to beat me.
Here are the core steps:
- Basic Board and Move Representation
- Game Trees and the MinMax Algorithm
- Additional posts coming soon
- Advanced Evaluation Strategies
- Opening Books
- Endgame Tablebases
- Universal Chess Interface
Interested? Get started now. You will need basic Python knowledge (and understanding chess is probably also helpful). If you are not interested in learning and just want the engine, check out our GitHub repository.
Want to know when new posts are published? Subscribe to get tutorial updates delivered to your inbox, plus occasional posts on Python, electronics, and creative coding projects.
