Have you ever wanted to play chess but didn’t have anyone to play with? Now you can play against a virtual opponent using a real chess board thanks to this Raspberry Pi project put together by maker and developer Noah Davis. Not only does this Pico-powered chess-playing robot simulate having a real opponent, it brings your challenger to life by adding ChatGPT to throw insults at you while you play and uses Stockfish to cheat by optimizing its moves against you.
The project mainly uses ChatGPT to add dialogue using text-to-speech functionality. After all, who wants to play against a silent opponent when you could program them to be super sassy and toss out insults in the middle of your match?
The Raspberry Pi team reached out to Davis to get some more information about how it works and published the details in a recent blog post. The board is fitted with an array of Hall effect sensors that determine where pieces are placed. The chess pieces have magnets on the bottom to trigger the sensors underneath. But this doesn't identify what the pieces are, so Davis wrote some code to track the position of every piece, from its starting to end position.
In addition to the magnets and sensor array, Davis created a robotic arm that can pick up pieces and move them. The arm position is transmitted to the Raspberry Pi Pico using a serial connection which is interpreted to process the next move position. LEDs installed on the side of the board signify whose turn it is.
The lights will illuminate blue on the side of whoever’s turn it is to make a move. When it’s time for the virtual opponent to make a play, the Pi connects to an open-source chess-playing application called Stockfish. This is where the cheating comes into play. It uses Stockfish to plan the perfect move making it a more than difficult adversary.
If you want to see this Raspberry Pi project in action, you can check it out over at YouTube. There are plans to upload a new video with more details in the near future. In the meantime, you can find a behind-the-scenes look at its construction over at the official Raspberry Pi blog.
Stay On the Cutting Edge: Get the Tom's Hardware Newsletter
Get Tom's Hardware's best news and in-depth reviews, straight to your inbox.
Ash Hill is a contributing writer for Tom's Hardware with a wealth of experience in the hobby electronics, 3D printing and PCs. She manages the Pi projects of the month and much of our daily Raspberry Pi reporting while also finding the best coupons and deals on all tech.
-
kano1337 So he have recreated the average competitive gamer.Reply
Well, as an admin of a CS server of national/regional significance, I have never thrown out anyone for being beginner or lame. But for behavior, I have thrown out loads of players. Imo one can not have a good server if the toxic guys can do what they want. In reality, no one needs them.
And it not got any better in the recent years, with gaming becoming one of the biggest hypetrains ever.
On the other hand this chess stuff can/could be funny with configurable levels of sweariness for those who could truly enjoy this :)