Introduction
Chess has fascinated minds for centuries, offering a battlefield where at any time players are looking at both the problem and the solution. If you're like me, you love to play this game. Since I love computer science I always wanted to write a program that could defeat me at the game. This has been one of the most rewarding journeys of my life. There is so much beauty and elegancy in chess programming.
When a friend asks for new project ideas, I always say: if you haven't done it yet, build a chess engine.
Now, fair warning—making a bot that can actually hold its ground (or beat a decent player) is no joke. You’ll go through some serious trial and error before getting it right, which is probably why a lot of people either never try or give up halfway. But here's the thing: with the right setup, you don’t have to struggle for weeks to get good results. That’s why I made this guide—to help you build a chess engine that might actually take you down… in a weekend. Sounds exciting, right? Just two days from now, you’ll have created a program that might beat you at your own game!
Since we’re on a weekend time crunch, though, we’ll get a bit of help from a library called shakmaty for move generation. No need to stress about setup either—I’ve put together a GitHub repo with all the starting files you’ll need. And, at any point, you can test your bot by playing against it!
Alright, enough introduction. Next up, I'll cover a few things I'll assume you know before getting our hands dirty. See you there!