Saturday, 6 July 2013

Size isn't everything

While hunting around for some good open source javascript programs I came across the following bit of genius/insanity. It is a chess program called Toledo and it consists of 1024 bytes of Javascript code. In fact there are 2 versions, one of which does not allow en-pas,castling or promotion (Picochess), and a slightly larger version that implements all the rules (Nanochess).
Of course for a program of this size it does not play particularly well, and I was able to find some very quick checkmates. It seems to meet 1.d4 with 1. ... f5 and I have then won a couple of games with the general idea of 2.c4 h5 3.e3 g5? 4.Be2 g4 5.h3 gxh 6.Bxh5+ Rxh5 7.Qxh5#
Nonetheless it it is still an impressive feat to get it to play at all. If you want to try it online then you can also play it here.

No comments: