It’s been nearly 30 years since chess champion Garry Kasparov lost to IBM’s Deep Blue, marking the first time a reigning world champion was defeated by a computer in a match. Chess engines have since improved so dramatically that even a simple smartphone app can now make top grandmasters sweat. Yet for all this advancement, those silicon prodigies still need a human meat vessel to actually move the physical piece into check mate. That’s starting to change.
Earlier this month, an online maker and YouTuber going by the handle Joshua Stanley Robotics showed off his own DIY approach to making a physical chessboard that can understand human moves and then move its own pieces. Stanley’s approach, like several other self playing chess boards before his, taps into the magic of magnets. Stanley custom 3D printed each chess piece and hollowed them out so that he could place a magnet in the bottom. He then made a chess board out of printed circuit board (PCB) with magnetic sensors embedded underneath capable of telling when certain pieces had moved to specific spaces.
To move its own pieces, a motorized mechanism beneath the board guides an electromagnet along the underside. When activated, the electromagnet attracts the magnet inside a piece and drags it across the board to its destination square, switching off once the move is complete.
All of this decision-making, or the brains of the operations, is powered by the popular open-source chess engine Stockfish. That accessible platform allows Stanley to adjust the difficulty of his AI opponent on the fly. That’s important, he notes, because he’s ironically not much of a chess player himself and seems intent on keeping it that way.
“To rectify this, instead of spending any time practicing or studying chess, I’m going to make a chess robot capable of beating me so thoroughly that I don’t want to play anymore,”Stanley says in a video breaking down the build.
Building a self playing chessboard
Stanley breaks down his process as an attempt to solve three problems: how to detect a human’s move, how to determine what move the computer should make, and how the computer should physically move its pieces. The first two situations are relatively straightforward in the digital realm, but become much more complicated on a physical board. 3D-printing each piece with an embedded magnet helped solve that challenge. He also says he used one magnetic polarity for all the black pieces and the opposite polarity for the white pieces to help the computer distinguish between the two sides.
To design the actual chess-playing computer model, Stanley says he initially explored writing the code himself but quickly realized he was “well outside [his] comfort zone.” Instead, he turned to the open-source engine Stockfish to handle the decision-making. However, he still needed a way to translate the physical information from the board into a digital format that Stockfish could read, and vice versa. To do that, he coded a Python script to act as a “middleman” between the two.

Magnets weren’t Stanley’s first choice for movement. He says he experimented with several prototypes of a retractable robotic arm that would pop out from beneath the board and grab pieces, but found it couldn’t handle them with consistent enough accuracy. The magnet-based approach proved more straightforward and had the added benefit of keeping the board light and portable.
It does come with limitations, though. Because the pieces are dragged from square to square, moves like knight jumps, where a piece has to pass other pieces in its path, can be tricky. In some cases, the knight may knock over pieces in its way, which the human player then has to reset. It seems like the human also has to remove captured pieces from the board manually.
Still, drawbacks aside, Stanley rates his own work as playable, which is a success in itself.
“Overall, I’m really pleased with how this project turned out,” Stanley says. “The hidden motion of the electromagnet and the slight hum of the motors adds some suspense to every move it makes.”
Stanley’s DIY effort notably isn’t the first attempt at building a self-playing chessboard. There are already several models available on the commercial market, most of which use variations of a similar magnet-based approach. The Miko-Chess Grand is one of the more popular options, and advertises itself as a tournament-sized board made of real wood and powered by a comparable magnetic system. It retails for $497.
Another self-playing chessboard, the Phantom, also uses magnets to move its pieces but can integrate with an online app. That allows players to compete against human opponents on platforms like Chess.com and have their virtual opponent’s moves replicated on the physical board in near real time.
Stanley’s board, by contrast, is more stripped down and less refined. For him though, the endeavor was less about turning computerized chessboards into a living room mainstay and more about taking on a new technical challenge.
“I think this project turned out amazing,” he said. “It gave me a good excuse to start learning to code in Python, which was a bonus goal for me.”