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 promotionTo 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.
Anda sedang membaca artikel tentang
Coder creates smallest chess game
Dengan url
http://wartiningaji.blogspot.com/2015/01/coder-creates-smallest-chess-game.html
Anda boleh menyebar luaskannya atau mengcopy paste-nya
Coder creates smallest chess game
namun jangan lupa untuk meletakkan link
Coder creates smallest chess game
sebagai sumbernya
0 komentar:
Posting Komentar