Toledo Nanochess is a chess engine developed by Mexican Oscar Toledo Gutiérrez, a four times winner of the IOCCC. According to IOCCC rules it is 1255 characters. The author claims that it is the world's
smallest chess program written in C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....
.
The source code for Toledo Nanochess and other engines is available.
Because Toledo Nanochess is based on Toledo's winning entry from the 18th IOCCC
(Best Game) it
is heavily obfuscated
Obfuscated code
Obfuscated code is source or machine code that has been made difficult to understand for humans. Programmers may deliberately obfuscate code to conceal its purpose or its logic to prevent tampering, deter reverse engineering, or as a puzzle or recreational challenge for someone reading the source...
.
At this date (February 7, 2010) appears to be only two chess engines written in less than 2 kilobytes of C that are able to play the full legal chess moves: Toledo Nanochess and the Micro-Max by Dutch H.G. Muller.