BootChess Is Smallest Chess Program Ever. Want To Play?

Y

yigido

Thread author
Chess1.jpg


Computer chess has been around for nearly 60 years. In one sense, it goes all the way back to Alan Turing, who specified the first chess algorithm in 1947.
The ensuing decades saw vast improvements in programming and computer power, and chess applications have grown faster, smarter and more sophisticated. Supercomputers like IBM Deep Blue beat grand masters like Gary Kasparov.
But at the same time, there's been a parallel low-tech quest — to build a functional chess program in as few bytes as possible.
See also: What Does Apple's Swift Programming Language Mean for iOS Developers?
The previous record holder was the 672 byte 1K ZX Chess, built by David Horne in 1982 for a Sinclair computer that had a mere kilobyte (1,000 bytes) of memory. Today's computers have many gigabytes of memory — but that didn't stop French assembly coder Olivier Poudade from building a 487-byte program, BootChess.
Podade's program has thus broken the 33-year old record for the world's smallest, playable computer chess game.
With his tiny chess game, Poudade told the BBC, he hopes to inspire other so-called size coders. "[BootChess] reminds others that optimizing in computer programming is not only about speed, but also about size," he said.
BootChess_Bochs26_650x493.jpg

BootChess running in Bochs DOS Emulator.
Image: Olivier Poudade
Games of this size, though, do have some limitations. Horne's 1K ZX game couldn't handle castling or promotion (when a pawn becomes a queen, say, if it travels all the way to the opponent's side of the chess board).
BootChess, which runs on Windows, Linux, OS X, DOS and BSD, lacks even the graphical chessboard found in Horne's game. Instead, the board squares are a grid of periods, which disappear when a piece is on top of them. As in 1K ZX chess, the pieces are represented by letters: "P" for pawns, "R" for rook, "Q" for queen, and so on.
Having played computer chess for decades — my first chess computer was 1978's Boris — I was anxious to try Poudade's program. Unfortunately, BootChess is designed to run off a bootable floppy disc (remember those?). None of the computers in my office (or my general zip code) still use floppy disks, so I was out of luck.
If you know your way around DOS emulators and assembly code, you can download Poudade's tiny chess game here.
[UPDATE: Mashable Q+A with BootChess programmer Olivier Poudade]

How long did it take you to develop BootChess?
Poudade: BootChess took 3 months to write (1-to-3 hours per day at night). Since October 24th 2014, 239 intermediate different versions were saved.

Since the game has zero graphics, how do you play it? Is it all coordinate-based?
The game is in graphics mode but doesn't make use of graphics, true. You play it as shown in this video. Whites (the computer) start with a hardcoded Ruy Lopez opening e2e4 and then the player enters coordinates in the form of 4 characters from the keyboard: Once all 4 characters have been inputted, if it is not within board range or if it not legal chess, then the question marks will reappear as an invitation to input another move. Otherwise, if all is correct, the computer will play.

What level can it play up to? Could it handle a game with Gary Kasparov?
Poudade: Could it beat Kasparov? No. Could it beat Turing's original and unmodified 1-ply paper chess ? No, but it could "handle a game" with it surely. Lastly, Kasparov did play against Turing's paper chess augmented to 3-ply and it took him 27 moves to beat the later. He beat it the next game in 7 moves. But as it standing BootCHess doesn't even use a full MinMax play but something I call TaxiMax (please read BootChess.txt in downloaded archive) because of the size constraints. If you can arrange a match with Kasparov (My daughter and I have his chess game) I can have a modified version battle him through 7 moves at least, during the initial first game. But the final point is it is not the best chess game, it is the smallest.

How long have you been playing chess?
Poudade: I've never played chess really. I tried several times in my life but I am not a good enough player alas, just like piano. I admire real chess players and read their biographies, but I cannot even beat Nintendo 3DS chess at mere third level and can sometimes beat my 9-year old daughter who has taken chess lessons.
The point to make was asked to Kasparov during his speech for Alan Turing's death centenary conference. Computer game chess are on the decline whilst online human vs. human chess games are booming: for regular people like myself it is not always fun to be beaten all the time. While not being club players we would be encouraged to play computers if we could win half or a third of the times we play. Hence BootChess doesn't target good chess players as there are thousands ELO-ranking chess engines available on the Internet already. It is made to be fun for people who know the rules of chess but are as mediocre as myself at playing it, but still love the game. Also it its initial configuration as a boot sector, it is also for some like myself a gem in low-level system.

Did you ever play the original Boris computer chess game or any of Kasparov's early chess computers?
No, sorry not this particular one. I tried mainly to confront the previous smallest chess games which are named in the BootChess.txt file:
  • David Horne's 1982 1K ZX Chess
  • Microchess 1K from Peter R. Jennings on the 6502 microprocessor in 1976
  • Tiny Chess 86 for the 80/86 from Jan Kuipers in 1981
Have you made any other low bytes games?
Yes I have written a 128-byte helicopter graphical game with sound and textures and level and score and Bezel, called Helicave. I believe it is smaller than a tweet length which is 140 bytes.
Hellicave.jpg

Olivier Poudade's other super-tiny game, Helicave
Image: Olivier Poudade
Have something to add to this story?

Source : http://mashable.com/2015/01/30/play-it-better-tiny-chess-game/
 
  • Like
Reactions: BoraMurdar

About us

  • MalwareTips is a community-driven platform providing the latest information and resources on malware and cyber threats. Our team of experienced professionals and passionate volunteers work to keep the internet safe and secure. We provide accurate, up-to-date information and strive to build a strong and supportive community dedicated to cybersecurity.

User Menu

Follow us

Follow us on Facebook or Twitter to know first about the latest cybersecurity incidents and malware threats.

Top