Can you beat the Kaspirov?

Mathijs Lagerberg
Pixplicity
3 min readMay 3, 2023

--

The Mechanical Turk, nowadays also known as Amazon’s work-for-hire platform, was originally an illusion created by Hungarian inventor Wolfgang von Kempelen. Presented in 1770 as a chess-playing automaton built into a table, it actually featured a hidden chess master making all the moves.

At Pix we love building things, and we love a challenge. So we made an actual mechanical Turk, but one for the 21st century.

Behold: the Kaspirov. (We have a habit of naming our Raspberry Pi-based pet projects after famous people combined with either ‘pi’ or ‘berry’, so this one was an easy one).

A coffee table with an automated chess board. You don’t need friends if you have the Kaspirov!

Shaped like a small coffee table with a lamp shade on it, it houses a chess computer, a webcam, buttons, speakers, and a power supply. The webcam observes the board, the computer computes, and the speakers speak the resulting counter move. All together it enables a chess computer to play on a completely analog board.

Why the Kaspirov?

In the world of chess, players have long debated the merits of playing on a physical board versus playing on a computer. Computer chess engines have become incredibly strong, but playing on a display lacks the tactile experience of moving pieces on a physical board.

Enter the Kaspirov, bridging the gap between physical and digital chess. The Kaspirov uses a webcam to observe a physical chess board and translates the moves into a digital format that can be processed by the free Stockfish chess engine running on a small, efficient, single-board computer.

A short demo of the Kaspirov. Turn up the volume to hear it speak.

How does it work?

The Kaspirov consists of a webcam mounted in a lampshade above a physical chess board, and two buttons, all connected to a small computer. As players make moves on the board, then they press the buttons as they would on a traditional chess clock. This instructs the computer to take a ‘before’ and ‘after’ picture of the chessboard using the overhead webcam. By comparing those images the computer can determine which move has been made, feed this into the Stockfish chess engine, which calculates the best response. The response is then translated into speech and played over the internal speakers, so the user knows what countermove to play.

The guts of the ‘automaton’

Hardware

This version is almost completely an upcycled installation. The casing is built from an old IKEA table cut into a small box. The table legs, the power supply, the webcam, the Pi and even the arcade buttons are leftovers from earlier projects or things we had stuffed in a drawer. The lampshade is from a recycle store. Only the speakers are new.

This is not the first project that Pix has built in the off hours. We have more posts about apps and other projects that we created simply because we felt they needed to exist, and we had the expertise to do so. Feel free to reach out if you need some help creating one of those for your office, we’d be happy to help out!

And if you want to have a go at beating the Kaspirov, you should drop by our office. Bring your A-game.

I’m Mathijs “Mat” Lagerberg, founder of Pixplicity. If you want to know more about the cool stuff we build at Pix, have a look at our portfolio. Cheers!

--

--