Few months ago thanks to the GameKnot website (ref: http://gameknot.com/#stevexyz), that allow to make one single move in few days making it possible to play it reasoning and when you have time, I got passionate about chess. And then I got curious about chess engines (since I had an idea for an evaluation routine I thought was good). And trying to document myself about this "world" I found the amazing Micro-Max chess engine by H.G.Muller (ref: http://home.hccnet.nl/h.g.muller/max-src2.html), that in less than 1200 characters was including the engine and even the user interface!
When I looked at the source code anyway seemed to me that was possible to shrink it a bit more. And then another bit. And then another bit. And continued to challenge myself for something like 15 iterations of around 2 hour each composed of sub-iterations in which sometime I was able to remove even a single bracket!... (here the point I started from: http://home.hccnet.nl/h.g.muller/max1.html)
To cut the story short, let me introduce the result of this attempt to shrink it, the smallest brother of the Micro-Max family: the Super Micro one!!
It is as of my knowledge the smallest source for a program able to play chess (seems to me that 1000 characters barrier has never been broken!)... Super Micro very obfuscated C source code file is composed of just... 815 (!) all printable ascii character, and try to beat it if you can!! (I still didn't manage! ;))
To play just enter the coordinate for the move like "a2a4" (small letters without spaces) or press enter (and wait) to let the computer search and make the best move!
rnbqkbnr ++++++++ ........ ........ ........ ........ ******** RNBQKBNR a2a4 <enter>
Note that as the original the program it just do not have the "en-passant", castling and under-promotion rules inside. Probably with this size it will be possible to implement them still keeping the program below 1K!
Not sure I killed all the bugs but I'm sure that some (few) bytes can still be removed: the quest is open! :)
PS: GCC compiles the source just fine, but for coherence the tiny C compiler of Fabrice Bellard is just perfect! ;) (ref: http://bellard.org/tcc/)
Cheers! _Stefano