Skip to navigation

malevolent design weblog

This blog is now defunct, but you can find more stuff over at my personal site

1K Chess Showdown

The Tiny Chess submission to JS1k impressed me yesterday. I’m terrible at Chess, and made several rash moves out of complacency, but it’s still strangely humbling to get your arse kicked by 1014 bytes.

1K ZX ChessIt reminded me of 1K ZX Chess (actually 672 bytes) for the ZX81 (explanation and source code). And then I noticed that one always plays as black, the other as white.

So, which is better: Tiny Chess (black) or 1K ZX Chess (white)? There’s only one way to find out…

Opening

It’s all pawns early on, and I’m crossing my fingers that none of the little blighters will reach the other side, as 1K ZX Chess doesn’t support promotion.

Then white slices forward with a bishop to put black in check, with Tiny then using a pawn for defence. ZX clearly played chess at school during lunchtimes, where the first check was hugely important and had to be announced with maximum pride.

Mid-game

After much dithering about on both sides, black eventually swoops in, taking a rook then bishop without the queen even retaliating. Tiny is on the offensive.

White loses more pawns then a rook and knight, before sacrificing a bishop for a mere pawn. Things are starting to look bleak for tired old ZX.

End-game

Black moves in for a pawn and a check.

As the king moves away, black’s rook takes the beleaguered knight.

Soon the queen is gone too, I can hardly bear to look…

But hang on a second, what’s this? Stalemate!

Yes, after making full use of its extra 342 bytes to advance with savage brutality, Tiny Chess blew it right at the end, allowing plucky 1K ZX Chess to snatch a draw from the jaws of defeat. David Horne’s 27-year-old program can hold its head high.

Update: The creator of Tiny Chess, Óscar Toledo G., emailed to let me know that this blog post inspired him to create an improved version that tries to avoid stalemate!


Comments

Brilliant!

— morcs, 7th Sep, 7:06pm

Tiny Chess kicked my butt too. I'm very curious what its rating would be.

— JKT, 29th Sep, 6:26am

My guess for rating would be pretty low, around 1000. I beat Tiny Chess handily, and I'll admit that I'm not a great player.

— cin, 29th Sep, 9:08pm

My guess would be more like 1024.

— jc, 8th Oct, 3:31am


Comments are now closed for this entry.