AbsoluteGamerzNetwork
Absolute Gamerz

Coder creates smallest chess game for computers

Thursday, 29th January 2015 14:33 GMT (Europe/London)
566 reads

A French coder has developed what is thought to be the smallest-sized chess computer program.

BootChess is only 487 bytes in size, and the code can be run on Windows, Mac OS X and Linux computers.

That makes it smaller than 1K ZX Chess - a Sinclair ZX81 computer game, which contained 672 bytes of code and had held the record for 33 years.

The new title's creator told the BBC that the challenge had seemed impossible at first.

Olivier Poudade added that he hoped his achievement would now inspire other programmers to get involved in the "sizecoding" scene.

"[It] demonstrates why assembly language is still the language of choice to excel [at] in programming," he said.

"[And it] reminds others that optimising in computer programming is not only about speed, but also about size."

He said that he had also wanted to pay tribute to the craft of David Horne - 1K ZX Chess' creator - as well as other unsung heroes of the 1980's English and Russian ZX81 and ZX Spectrum coding community.

The ZX81 only had 1K - or 1,024 bytes - of RAM memory, limiting what it could do.

Today's computers typically ship with chips that can store millions of times that amount.

For comparison's sake, even a couple of image-less tweets take up roughly the same amount of data as Mr Poudade's complete program.

Pawn promotion

To achieve his goal, Mr Poudade - a member of the Red Sector Inc coding group - had to make the look of his game even more basic than its 1982 predecessor.

The board and pieces of BootChess are represented by text alone, with P representing pawns, Q used for the queens and full stops put in the place of empty squares.

Some critics have carped that it cannot be called a "complete" chess program because it does not allow castling - a defensive move in which a king and castle/rook shift positions simultaneously.

However, Mr Poudade noted that 1K ZX Chess shared the same limitation, and highlighted that his program allowed pawns to be turned into queens when they reached the opponent's side of the board, something that was not possible in Mr Horne's game.

Even so, for those seeking a code-anaemic version of the centuries-old game that uses graphics rather than letters to represent the board and supports castling, then the 1,251 bytes-sized Tiny Chess, written in Javascript by Mexican developer Oscar Toledo G, may be the preferred option

Last updated: Monday, 2nd February 2015 @ 20:48 GMT (Europe/London)
Written by Leo Kelion @ BBC News

All copyrights and trademarks belong to their respective owners. This site is for the promotion of selected material, no infringements are intended. All reasonable efforts have been taken to credit the respective owners and/or authors.

AbsoluteGamerzNetwork

Cookie Policy | Privacy Policy

(AA || f1e91d3002890def3e900d91239ddcfc)