Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm glad they mentioned 1K chess for the ZX81 [1] which I remember typing in from a magazine listing, and then playing against quite a lot (it was better than a 10 year old me). Neither program is capable of castling.

[1] http://users.ox.ac.uk/~uzdm0006/scans/1kchess/



If they can't castle then they aren't complete.

Or do you mean the ai can't castle, but you can?


It was a ZX81. "It's not a complete implementation" was presumed for anything running on that tiny thing. The base model had 1K RAM, which included all video & OS memory space. Getting it to do anything meaningful was a challenge. That somebody, back then, could get a sane implementation closely approximating chess running on it was amazing.


1K Chess for the ZX81 was 672 bytes long; the ZX81 had 672 bytes free. (Although it was more complicated than that because the ZX81 'framebuffer' changed size depending on what was on the screen, so a screen that was mostly white gave you more spare RAM.)

Also, because the ZX81 more-or-less did its video in software (again, it's more complicated than that; if you really want to know, you'll need a strong stomach. Let's just say that it hinged on abusing the Z80's built in DRAM refresh and the framebuffer was executable), which meant that the only time you could do processing with the screen turned on when it wasn't doing video. And the video took 75% of the run time.

The ZX81 was less a computer and more of a pile of hacks flying in close formation. The fact it ran at all was a miracle.


How the ZX81 display file worked:

http://www.user.dccnet.com/wrigter/index_files/ZX%20Video%20...

Note the encoding of that page causes it to render incorrectly at least in Firefox. Using View → Character Encoding → Western fixes that for me.


"Hacks flying in close formation" made my day :) Thank you for that lovely phrase.


The ZX Chess AI could not castle. It wasn't possible to enter a castling move for the human player either. Also looking at the Wikipedia page I see it didn't understand "en passant" or queening either, so it plays a reduced version of chess.


I've got an even shorter program that plays a more reduced version of chess. It's 0 bytes.


Which subset?


The empty subset.

The title claims it can play chess, this is not chess.


How small can you make a program that makes pedantic, technically correct, but completely useless comments on the internet?


Depends on how you define "pedantic".


Nice answer (and username).


https://xkcd.com/810/

I think that problem requires at least as much space as the brain module that determines "usefulness", which means quite a lot of space.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: