PyMinMaximus: Build a Chess Engine in Python from Scratch

A 3D render of a wooden chess board with metallic pieces. In the background, a laptop displays Python code for a chess engine named 'PyMinMaximus'. Blue arrows illustrate possible legal moves from a pawn and a rook.

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:

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.