The Kaspirov

The Kaspirov

The Kaspirov, named after chess grandmaster Kasparov and the single-board computer Raspberry Pi, is a Mechanical Turk-like device to play chess.

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.

The Kaspirov, a small chess table with a chess engine inside.

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.

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, 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 machine: speakers, a Raspberry Pi and a power supply.

Here's a short demo. Turn up the volume to hear the Kaspirov speaking.


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 I had stuffed in a drawer. The lampshade is from a recycle store. Only the speakers are new.

Now what?

The plans for this machine will be open sourced soon. In short, it is a bunch of Python scripts using OpenCV sending commands to the Stockfish engine, using short mp3s created with a free text-to-speech engine to announce the counter moves.

Currently it only plays standard chess with a bunch of limitations. For example, it simply assumes the human player is playing with the white pieces. It is also not capable of distinguishing moves. For example, if the move is "Rook to e8" and there are two rooks that can make that move, it is unclear which one to move.

Once those kinks are ironed out, the source will be released.