French coder shows how to fit an entire game of chess into 487 bytes

29 Jan 2015

Unbeknownst to many, a French coder has been attempting to make the smallest playable chess computer game and has succeeded with his 487-byte game, BootChess.

Capable of being played on pretty much any format, the very, very basic game certainly doesn’t have the graphical power of, say, a 1970s calculator, but it still plays a pretty mean game of chess, according to the BBC.

Olivier Poudade’s game managed to beat the holding wold record which had been going for 33 years thanks to the Sinclair ZX81 computer game, 1K ZX Chess, whose chess game contained a ‘whopping’ 672-byte file.

To achieve the record, Poudade said, he had to strip down absolutely everything that could be considered aesthetic, leaving only basic code to trump the chess gaming classic from 1982.

To make the different components of the game, he replaced the pieces with letters so that P would represent a pawn, K for a king, Q for the queen etc, and the empty squares are represented by full-stops.

A screenshot of the BootChess game. Image via Red Sector

However, the game has been criticised by some chess experts as not being a complete chess game because of BootChess’ inability to run a particular defensive move where the king and castle can switch places.

Regardless, Poudade says that the whole intention of the game was to inspire others to code, particularly with making programs as small as possible, otherwise known as ‘sizecoding’.

“[It] demonstrates why assembly language is still the language of choice to excel [at] in programming,” said Poudade to the BBC. “[And it] reminds others that optimising in computer programming is not only about speed, but also about size.”

Chess image via Shutterstock

Colm Gorey was a senior journalist with Silicon Republic

editorial@siliconrepublic.com