This Autonomous Chess Robot Will Almost Always Win Against Its Opponent
from hackster.io
After working through several years of college in his mechanical engineering program, Josh Eckels wanted to put what he had learned to the test by constructing a system that can play chess against a human opponent.
It not only shows what moves it makes on a screen like most other AI systems, but it physically picks up the pieces and moves them to its desired position. In doing so, the player gets a more "true to life" experience versus a purely virtual one.
The frame of the robot was fashioned out of several lengths of aluminum extrusions, forming a cube. The base has a large chess board that is covered with a piece of plexiglass to protect it. At the top sits a gantry system which is responsible for moving the grabber.
It is driven by a pair of stepper motors- one for each axis, along with a third motor in the Z axis that spins a threaded rod to raise and lower the grabbing mechanism. The fourth and final motor sits in the arm and it rotates to open or close the gripper assembly.
To control all of these stepper motors, Eckels used an Arduino board with a CNC driver shield on top to provide current. It takes commands from the Raspberry Pi 4 and transforms them into movements for both the gantry and grabber.
Currently, the game engine (Stockfish running on a Raspberry Pi) keeps track of when a piece has been moved by having the player touch the screen to virtually move the piece.
The gripper will then lower, grab the piece, and place it out of the board's boundary. Eventually, Eckels would like to incorporate a camera in the top of the robot facing down that can automatically detect when a piece has been moved and update the chess engine accordingly.
Stockfish is the go-to choice for makers who want to incorporate some intelligence into their chess-playing experiences. It has a version that runs on a Raspberry Pi and can receive commands from the terminal's standard input API.
From here, the GUI is updated with what moves have been made and which one is planned. After the engine makes a play, it tells the Raspberry Pi which in turn notifies the Arduino to start positioning the motors to grab the correct piece.
You can read more about Eckels chess-playing robot here in his school's article, and you can view this demonstration video to see it playing against an opponent.
Leave a comment