[RoboAvatar]’s Chess Robot consists of a gantry-mounted arm that picks up chess pieces and places them in their new location, as directed by the software. The game begins when the human, playing white, makes a move. When a play has been made, the human player presses a button to let the robot to take its turn. You can see it in action in the videos we’ve posted below the break.
Running the robot is an Arduino UNO with a MUX shield as well as a pair of MCP23017 I/O expander chips — a total of 93 pins available! Thanks to all those pins, the Arduino is able to listen to 64 reed switches, one for every square.
The robot detects the human’s move by listening to its reed switches and identifying when there is a change. The gantry consists of X and Y tracks made out of PVC slabs, with half-inch lead screws turned by NEMA-23s and powered by ST-6600 stepper drivers.
Unlike some chess robots that rely on pre-existing software, this one features a custom minimax chess algorithm that [RoboAvatar] coded himself. It consists of Python scripts run on a computer, which interacts with the Arduino via a serial connection. In the second video, he explains how his algorithm works. You can also download the Arduino and Python files from [RoboAvatar]’s GitHub repository.
You’d be surprised how many chess-playing robots we’ve published, like the ChessM8 robot and this voice-controlled chess robot.
Great job
Nice, not seen this since the 1982 NOVAG ROBOT ADVERSARY , but it was very expensive and used a Z80 processor http://www.chesscomputeruk.com/html/novag_robot_adversary.html
I believe http://patrickmccabemakes.com/hardware/Chess_Robot_V2/ or its previous iteration were covered by HaD years ago.
The only thing missing is the mechanism to flip over the board when it realizes it’s going to lose. ;)
This chess robot is quite nice. It has been a while since I failed to make my own. And it brings back some good memories.
There are a few things to note about this chess computer. The current implementation is quite hacky, using a breadboard with buttons won’t last. The use of 64 reed switches and io expanders is a good solution. Using multiplexing will reduce the number of pins needed.
He wrote his own chess code. This is not a simple task. For information on chess programming and algorithms look on https://chessprogramming.wikispaces.com/. You can use someone else his/her chess computer. I like the Micro-Max computer. https://chessprogramming.wikispaces.com/Micro-Max This chess computer has been ported to a 8-bit 8kB AVR by Elektor in 2009.
I based my failed project on this implementation. First by porting it to PIC and secondly being stuck in ‘theoretical world’. The first thing just should have been getting it running not implementing all chess variations…
Why go all nutty on having an individual line for each reed switch? Why not turn the board into a matrix and need only 16 lines to detect changes?
That was my first thought as well. It would work great, so long as there’s only one piece on the board. But you’re reading 32 pieces to start with
When you want to detect 2 pieces on a matrix and detect 4 they call it ghosting. By adding one diode to each reed switch you can eliminate ghosting. It’s pretty common to do so. For multiplexing there are better options like buying dedicated chips.
For bonus points, charlieplex your diode-reed-switches and use just 8 or 9 pins… 7 if you’re feeling truly sick :-)
My mistake, DOES need 9 pins to charlieplex – gives 9×8 sensors, EG 8×8 reed switches and 8 other buttons (or LEDs) if you want – want a chess clock? “Resign” buttons? Big red panic button “robot is attempting to kill humans”?
Put diodes in series with the switches and it would work even with 64 pieces. And by using an 3to8 line decoder it would only require 11 pins.
idea: why not take an image with a small camera from above (or below), look for the changed piece, so you know what the piece was. Or train a neural net to identify the pieces.
Great job Though
Well this is a new one! Might try this out for my local chess club! We started this club on a tight budget so hacks like this are needed along with free material for our lessons on sites like chess.com, chesstempo, and chessbounty.com. Thanks a lot!!
I like how you mentioned that there are ways in order to have a small program be able to ‘compete’ against a human that plays chess against an AI interface. Majority of these programs are coded on computer programs that can be plugged in and be used on a machine so that it can play against a human player. If I had the chance to get my hands on a program like this along with a corresponding machine, I would want to try out my hand at chess even if I know I’m not that good at the game if but to test how good the software program is.