The MagPi - July 2018

(Steven Felgate) #1

(^32) July 2018 raspberrypi.org/magpi
n 10 February 1996, a
chess-playing computer
called Deep Blue sent
shock waves around the globe by
beating world champion Garry
Kasparov in the first of their six
games. But the IBM machine did
so without moving any physical
pieces itself – a human noted the
computer’s move and performed it
manually on the board. Had Ghost
Chess been around back then,
however, such intervention would
have been redundant.
Designed by final-year MEng
students Tim Ness, Alex Angelov,
and Alex Smith from the University
Projects SHOWCASE
With this game of chess by Tim Ness, Alex Angelov, and Alex Smith,
the pieces appear to move by themselves. David Crookes checks it out



Each chess
piece is 3D
printed
Forty 3 mm
button
magnets
are used
The arm’s
electromagnet
has a 4.5G
pull force
It’s controlled
using GPIO on
the Pi
Chess engine
Stockfish is
open-source
Quick
Facts
O
A mechanical arm below the board
moves the pieces. By shifting them to
the corner of a square and then only
moving along the square edges, it
avoids collisions with other pieces
TIM NESS, ALEX ANGELOV,
AND ALEX SMITH
Having just completed their final
exams, the three students have
the world at their feet as they seek
graduate opportunities in industry.
magpi.cc/LxbagV
of Glasgow, Ghost Chess makes
use of a robotic arm connected
to a Raspberry Pi running the
world champion chess program,
Stockfish (stockfishchess.org).
It focuses attention on a physical
board, using motors and an
electromagnet to pick up, move,
and place 3D-printed chess pieces
within the squares depending on
the moves dictated by both human
and computer.
As such, it’s a mini-marvel –
a prime example of a real-time
embedded system. “We wanted
to create something that was fun,
memorable, and slightly more
challenging – an ‘automatic’ 3D
chess game from scratch,” says
Tim. What’s more, they wanted
to make it as unobtrusive as
possible. “We kept the robotics
underneath the board because it
was an easier way of designing the
system,” Tim adds. “It keeps all
of the electronics and the moving
mechanism out of the way.”
Multilayered project
Indeed, the project is broken down
into five layers: the chess pieces,
the board, a matrix of sensors,
the mechanical arm, and, at the
bottom, the Raspberry Pi 3. Of
GHOST CHESS
Each chess piece has a button
magnet on the bottom. The
magnetic field needed to be strong
enough to hold the piece while not
attracting surrounding ones
A Raspberry Pi 3 runs the Stockfish
chess engine. This allows the
computer to decide on its moves,
with software also controlling the
robotic arm under the board


Free download pdf