

Full ZX-81 Chess in 1K (1983) - bootload
http://archive.org/stream/your-computer-magazine-1983-02/YourComputer_1983_02#page/n99/mode/2up

======
scarygliders
Ah, the ZX81, my first computer.

Those Halcyon days of typing in lines and lines of code...

Only to be met with a sudden crash due to the 16K (16K!) RAM pack ever so
slightly shifting, interrupting the flow of electrons on the edge connector on
one or more signal lines ;)

Good times!

~~~
skynetv2
mine was zx82! Loved it!! mine used to overheat for some reason, the heatsink
on the top right side ...loved those games too.

~~~
welly
Was there actually a ZX82? It's my understanding the ZX82 was the code name
for the ZX Spectrum but it was never released under the moniker of the ZX82.
There was certainly a ZX80 as well as the ZX81.

------
linuxhansl
Yeah... That was my first computer.

1k of RAM, up to 768 bytes of used for character display memory (less of you
only use the top, left corner of the screen). About 130 bytes for system
variables.

The CPU was responsible for generating the TV signal, so you got it only in
the vertical blanks when no signal needed to be generated. Hence you had a
"fast" move where you only see noise on the screen.

I loved that thing.

~~~
bootload
_"... Yeah... That was my first computer. ..."_

Same here, though upgraded mine from an '80 [0] Occasionally I get the urge to
fire it up and type in some code, but it gets hot and starts to smell.

Syntax checking as you type :)

[0]
[https://www.flickr.com/photos/bootload/tags/zx81](https://www.flickr.com/photos/bootload/tags/zx81)

------
sillysaurus3
Here's an interesting question for you:

Your goal is to implement full Chess in the smallest number of bytes. However,
you're allowed to design your own instruction set to accomplish this. The
instruction set must be Turing complete.

Given this, what's the smallest Chess program possible? Is there an ultimate
limit, information-theory style?

I know there's no easy answer or perhaps no answer at all. Maybe it's an NP-
complete problem whose best answer can only be approximated or brute forced.
But it's still really interesting to think like, if you toss aside all of the
normal constraints, what's the smallest chess program that anyone can make?

Bonus points if you dive into experimental instruction sets like imprecise
computing or quantum computing, though I doubt those things could help
implement a precise rigid ruleset like Chess.

~~~
tbirdz
I'll define an instruction set with a single instruction CHESS that when
executed will play a game of chess with the user.

I'm sorry, I know this is a bit of a "snarky" type reply, but I don't really
understand what you are driving at with your question. Without more
constraints on the question, there's not really any point in searching for the
minimum solution.

~~~
Shoop
> The instruction set must be Turing complete.

~~~
tbirdz
I don't quite see how this requirement changes anything. You could have a full
Turing complete instruction set, and still have a CHESS instruction that plays
a game of chess with the user. The "Chess program" would still be 1
instruction.

~~~
sillysaurus3
Well, an instruction set is said to be Turing complete if it can be used to
simulate any Turing machine. A single instruction can't, so if you design an
instruction set to implement Chess and then don't use it, that's not really
the point of the question.

Any ideas about how to better specify the rules of the competition to exclude
degenerate answers like the one you provided? The goal is to answer the
interesting question. You'd never find such a high-level instruction in a real
instruction set, because it wouldn't be useful except to play Chess.

I'd add a rule like "The goal of your instruction set is to be useful while
still implementing Chess," but then that would exclude answers which give
interesting instruction sets that aren't necessarily useful except in
implementing Chess in the fewest possible bytes.

Thanks for pointing out the flaws in my ruleset. I've been toying around with
creating a blogpost about this, so having a bulletproof ruleset or at least
one that isn't so easily sidestepped would be great.

~~~
dragonwriter
> Well, an instruction set is said to be Turing complete if it can be used to
> simulate any Turing machine. A single instruction can't

Incorrect. A single instruction can be Turing complete.

[http://en.wikipedia.org/wiki/One_instruction_set_computer](http://en.wikipedia.org/wiki/One_instruction_set_computer)

Though the relevant question is whether universal computation can be built on
the back of an instruction which plays chess rather than one of the more
typical bases for a OISC.

~~~
taejo
> Though the relevant question is whether universal computation can be built
> on the back of an instruction which plays chess rather than one of the more
> typical bases for a OISC.

Well you can have two instructions: SUBLEQ and CHESS. Then it's Turing-
complete, and there's a one-bit program that plays chess.

------
welly
Wow, that takes me back. The ZX81 was my first computer followed by a ZX
Spectrum. I was browsing through the adverts and saw a couple of familiar
ones, including the "50 Games £9.95".

I recall buying that and £9.95 was a lot of money. It was one of the most
disappointing purchases of my life. The games were TERRIBLE. Absolutely awful,
even by 1983 standards. They were basically of the standard of the games that
you could type in for free from magazines such as Your Computer and Sinclair
User.

You owe me a tenner, Cascade Software!

------
muyuu
It's not full chess without castling, promotion, and en passant capture.

~~~
ptaipale
True, castling is essential, but for a decent chess playing experience,
promotion to anything except a queen is not really necessary, and en passant
is too obscure to be relevant.

~~~
muyuu
Underpromotion happens in tournament chess, and en passant is fundamental.
Without it it's a different game as pawn blockades work differently.

------
Arbinv
Totally takes me back. I remember programming a 1K space invaders game. I
always wished I could get the 16K Ram Pack but did not have the money so made
do with the 1K !!

