Bartek Spitza
Truth or dare! I defy any of my readers to refute this simple fact: watching “The Queen’s Gambit” on Netflix during the pandemic made you to either dust out that old chessboard in the attic, or sign up for a chess.com account. I know I did both things, and not only because Anya Taylor-Joy grew up in literally the same neighborhood of Buenos Aires where I did.
Do you know what other Argentine did actually start playing chess during the pandemic, but with much more success than most of us? A kid named Faustino Oro, born in Buenos Aires in 2013. Yes, at the time of this publication he is barely 11 years old, and has been recently named the youngest ever international chess master in history, with an Elo rating of 2433. True to this wonder, less than 4 years after he moved a pawn for the first time, he beat up the one and only chess grandmaster Magnus Carlsen, with a rating of 2831.
Talk about a successful Netflix show! Congrats to them for this. Because, you know, making a TV show about chess is not easy, let alone one with wide critic acclaim. If you do not believe me, ask the poor producer at the BBC who ran a short-lived and interactive chess program on national British TV. Yes, interactive: people in the audience could call live 0898 99-11-99 and suggest the next move against a grandmaster in the studio. When I say it was short-lived, I mean it: it aired just once, on December 7th, 1990. You can watch the broadcast on YouTube nowadays, and it is… well, let us say it is a far cry from The Graham Norton Show, if you see what I mean.
(The BBC had already by 1990 a somewhat long tradition around the chess-on-TV concept: some of my British readers might remember “The Master Game”, a program dedicated to the game of chess which aired from 1975 to 1983, and also available on YouTube for nostalgia purposes.)
But I digress. The issue at stake is that chess, as interesting as it is, and as passionate its hardcore audience may be, does not have the liveliness of other sports like, say, football or Formula 1. Explaining chess on video, particularly for educational purposes, can quickly become a tedious experience for the watcher.
Let alone explaining how to program a computer that plays chess. The risk of alienation through sheer boredom is the highest ever.
This is why we have chosen Bartek Spitza’s “The Fascinating Programming of a Chess Engine” as this month’s Vidéothèque entry. Bartek is a software developer from Gothenburg, Sweden, who created Sophia, a UCI-compatible chess engine written in C and available on GitHub.
In this video, Bartek explains the two basic elements that make up a chess engine: first, the data structures required to store the positions of pieces on the board. (Spoiler alert: 64-bit integers have exactly the same number of bits as a chessboard has squares.) Second, the algorithm that takes a current chessboard and returns the best possible next move. For this second element, the video dives in a step-by-step explanation of its algorithm, unsurprisingly choosing Python as a quintessential tool for teaching the concepts behind.
His video is remarkable not only for the minimalistic yet powerful animations, or by the calm tone of his voice (giving an almost ASMR feeling to the video). The explanations of the data structures and the minimax algorithm in use are simple and to the point.
Along the same lines, Bartek has also published a short video explaining how the Stockfish chess engine works, and it is totally worth a watch, too.
I wish to Bartek to continue explaining technical subjects, and similarly, I urge all of my readers to subscribe to his channel and support his work with the usual shares, likes, and other positive signs of encouragement. His most recent video (at the time of this writing) explains how text encoding works, while the first one he published in 2023 dealt with the inner workings of the Java virtual machine. Always with the same sober visual style, and with excellent explanations to follow along.
This month’s Vidéothèque video is “The Fascinating Programming of a Chess Engine” by Bartek Spitza, and you can watch it on YouTube. Complement it with “Creating a Chess AI with TensorFlow”, because we live in the 21st century and machine learning is all the rage these days.
And while we wait for Anya to reprise the role of Beth Harmon in a new season of “The Queen’s Gambit”, we can watch “Rematch”, a series produced by the French-German TV channel Arte recreating the Kasparov versus Deep Blue match of 1997.
Cover snapshot chosen by the author.