Pico-powered chess robot plays dirty using ChatGPT

We saw loads of excellent Raspberry Pi-powered builds at Open Sauce in San Francisco last week. This Raspberry Pi Pico-powered chess-playing robot by Noah Davis was one of our favourites, so we asked him to send us some info about how he built it.

Noah’s inferior chess game was getting him down, so he decided to build a robot to play for him. Of course, this has already been done before, so he decided to add a twist to the game to make it feel more like you’re playing a human opponent. ChatGPT was brought in to procedurally generate speech and, more importantly, insults. If you’re not berated for making dumb moves, did you even really play chess?

How does it work?

Magnets are fixed on the bottom of every chess piece, and an array of Hall effect sensors are placed on the underside of the board. Raspberry Pi Pico connects to each Hall sensor in rows and columns, similar to the way you would wire a mechanical keyboard.

Pico-powered chess robot plays dirty using ChatGPT

The Pico connects to Noah’s computer’s serial port to run the Stockfish open source chess engine. This software decides which move the robot should make next.

Chess board sensor data is requested from the Pico by the computer, which then compares that data to a previous snapshot. This is where things got tricky. The chess board sensors can detect if a square is in use or not, but it has no idea what piece is on it. Noah got round this with some clever code which tracks each piece from its known starting position on the board. That took a long time to pull together, and Noah squeezed in the coding in the early hours of the morning between school work.

Hall Effect Sensor matrix on underside of board.
Hall Effect Sensor matrix on underside of board

Servo motors powering the robotic chess player’s arm positions are sent over serial to Raspberry Pi Pico and translated into a signal to tell the servos how to move.

The LED light bar on the side of the chess board signals whose turn it is. If it’s blue, take your go, but if it’s red, you’ll have to wait for your robot opponent to scrape an idea from Stockfish for their next move. Cheating really. This robot lives a lie.

More content coming

Once high school work calms down, Noah plans to start making more engineering and programming video content for his YouTube channel. He made that quick show reel at the top of this post especially for Open Sauce, but a full project video is in the works. Make sure you subscribe to get a notification when it goes live.

Print Friendly, PDF & Email

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Server Status

Aradippou Chat 1 Chat 2 Larnaca Limassol Nicosia

Chat Links

Official Links.

1. Chat 1.
2. Chat 2.

Alternative Mirror Links.

1. KiwiIRC 1.
2. KiwiIRC 2.

Other Web Clients.

1. IrcCloud.

Recent Posts

Related Posts:

Advertisement

Archives

Super Club Radio

Mighty Deals

CyIRC

CyIRC Tweets

Scroll Up
Fatal error: Uncaught WMAC\JSMin_UnterminatedStringException: WMAC\JSMin: Unterminated String at byte 1180: "+o.accessToken}}).then(e=>{if(!e.ok)throw e;return e});return a.catch(e=>{console.error(`Failed to logout chatrix session. deviceId: ${o.deviceId}`)}),a}})(); in /home/bszucbfe/public_html/wp-content/plugins/clearfy/components/minify-and-combine/includes/classes/ext/php/jsmin.php:215 Stack trace: #0 /home/bszucbfe/public_html/wp-content/plugins/clearfy/components/minify-and-combine/includes/classes/ext/php/jsmin.php(157): WMAC\JSMin->action(2) #1 /home/bszucbfe/public_html/wp-content/plugins/clearfy/components/minify-and-combine/includes/classes/ext/php/jsmin.php(96): WMAC\JSMin->min() #2 /home/bszucbfe/public_html/wp-content/plugins/clearfy/components/minify-and-combine/includes/classes/class-main.php(375): WMAC\JSMin::minify('(function(){"us...') #3 /home/bszucbfe/public_html/wp-includes/class-wp-hook.php(310): WMAC_PluginMain->jsSnippetcacher('(function(){"us...', '/home/bszucbfe/...') #4 /home/bszucbfe/public_h in /home/bszucbfe/public_html/wp-content/plugins/clearfy/components/minify-and-combine/includes/classes/ext/php/jsmin.php on line 215