Skip to content

1-kilobyte chess game

1kchess.an3.es
25 pointsidiotclock5 comments
On HN

Comments

Of course 30 years ago there was "1K Chess" for the Sinclair ZX81 (Timex/Sinclair 1000 for US readers) - which, despite the name, was actually just 672 bytes of code. (The program had to run in a machine with 1K of memory _total_, which obviously included space for the machine's workspace and display file - itself ingeniously optimised to only occupy memory space for parts of the screen that had been printed on.)

https://chessprogramming.wikispaces.com/1K+ZX+Chess

Here is chess in 1 kb, written in 6502 assembler for the KIM-1 -- in 1976!

http://www.benlo.com/microchess/

The instructions say, "If you are an above average player, you may find that the MICROCHESS program is below your level ..."

Just tried the 2 KB (fast) version as White. Trapped Black's queen on my 7th move.

Mate took 20 moves or so total.

Got stalemated with a bare king against four queens and stuff.

Wow -- that's impressive -- 1kb -- really?

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.