Chess Playing Robot

I set out on a quest to create a chess playing robot like the mechanical Turk. When I began the project I had a pretty quick deadline: the North Carolina Maker Faire 2013. I knew I couldn’t possibly build a robot and program it to play chess all before the NC Maker Faire, but I was confident that if I already had a robot I could program it to play chess.

The Chess Playing Robot

Being a member of a Hackerspace comes with all sorts of benefits, of which the greatest is the network of hobbyists you’ll invariably build connections to. One of the people in this network, who calls himself Inventor42, had built several 3D printer designs. He was interested in having his 2nd most recent design do something new. The 3D printer he gave me to use was a modification of the Rostock Delta Bot, a RepRap design which we both decided would look really cool playing chess.
Chess Playing Robot
I hacked the delta-bot into an electro-magnet based pick-and-place machine. The electro-magnet would be used to pick up chess pieces and move them about the board. I had to get an idea on how big I could make the chess board and still have the robot reach all the corners. This delta-bot was designed to be able to print onto an 8-inch square. The board would have to be smaller than that for me to have a place to place the pieces down after they were captured. I settled on a 7-inch square.

The Chess Pieces

I received more great help from another hackerspace member who goes by the name of Schism. Schism had been playing chess regularly at the Queen City Chess Club, and already had experience printing out pieces for the set he took with him there. I passed along the dimensions of my board and he had two complete sets made in short order.

Each piece had a nail pushed through the center so that they could be picked up with the electromagnet. More shout-outs go to [Hyre] and Hsoj48 for producing an electromagnet and for preparing the pieces with the nails

The Software

Most 3D printers are controlled using a programming language for numerical control called G-code. This same programming language can be used to control CNC routers, plotters, and it is what I decided I would use to control my chess playing robot. I knew from playing chess that most chess programs and chess players record moves using Algebraic Notation. The program would need to convert from the standard algebraic notation to G-Code so I set out to create a library that could do just that.

The Algebraic Notation to G-code converter currently requires moves to be entered as Reversible Algebraic Notation since it doesn’t keep track of where the pieces are in the game. One simply enters the starting location of a piece and the ending location of the piece in order to get the robot to move the piece. The advantage of doing it this away is that it allows flexibility in whether or not the game is played by both people by entering their moves or just one person entering moves and the other moving pieces on the board directly.

Head over to the original article on the Patrick Graham blog to see video of the chess playing robot in action, and to read about my future plans.


Leave a Reply