M2M Day 364: Playing my first game of algorithmic chess (i.e. Max Chess)
This post is part of Month to Master, a 12-month accelerated learning project. For October, my goal is to defeat world champion Magnus Carlsen at a game of chess.
Yesterday, after eight hours of processing, I was able to test the first version of my chess algorithm.
Sadly, it was only able to correctly evaluate chess positions as good or bad 70% of the time, which isn’t very good for my purposes.
Of course, this algorithm was created only based on 300 chess games, while I have access to over 200 million games. So, hopefully the algorithm will become more accurate as I feed it significantly more data.
Even if I can create an algorithm that is 99% accurate though, it’s still unclear how well this algorithm can be used to play chess at a high level.
In other words, even if I can identify and play “good” chess moves with 99% accuracy, is this enough to defeat the world’s best chess player?
In order to find out, I built a program today that let’s me test out my algorithm within actual gameplay. Here’s how it works:
- Since I’m playing with the White pieces, I make the first move. To do so, I suggest a move to the program.
- The program then runs this move through my algorithm and decides whether the move is good or bad.
- If it’s good, the program automatically plays the move. If not, it asks me to suggest another move until I find a good move.
- Then, my opponent responds with the Black pieces. I enter Black’s move into the program.
- After Black’s move is recorded, I suggest my next move, which is again played if the move is evaluated to be good.
- And so, until the game is over.
Here’s what the program looks like running in my Terminal:
In this way, I can test out different chess algorithms to see how they perform against chess computers of different strengths.
If I can find an algorithm that, when used in this way, allows me to defeat Magnus Age 26, within the Play Magnus app, then I can proceed to learn the algorithm, so I can execute it fully in my brain.
Right now, since the algorithm only has an accuracy of 70%, it’s still very bad at chess. I played a game, blindly using the algorithm, against Magnus Age 7 within the Play Magnus app, and I was very quickly defeated.
Still, it’s an exciting milestone: I finally have all the pieces I need to actually play algorithmic chess (i.e. Max Chess). Now, I just need to improve the algorithm itself…
Read the next post. Read the previous post.