Rahul Sharma (Editor)

Toledo Nanochess

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Developer(s)
  
Oscar Toledo Gutiérrez

Type
  
Chess engine

Toledo Nanochess wwwnanochessorgimgtoledonanochess1jpg

Website
  
www.nanochess.org/chess3.html

Toledo Nanochess is a chess engine developed by Mexican Oscar Toledo Gutiérrez, a five-time winner of the International Obfuscated C Code Contest (IOCCC). In accordance with IOCCC rules, it is 1255 characters long. The author claims that it is the world's smallest chess program written in C.

Contents

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. On February 2, 2014, the author published the book Toledo Nanochess: The commented source code, which contains the fully commented source code.

As of February 7, 2010, it appears to be one of only two chess engines written in less than 2 kilobytes of C that are able to play full legal chess moves, along with Micro-Max by Dutch physicist H.G. Muller. In 2014 the 1 kilobyte barrier has been broken by Super Micro Chess[1] - a derivative of Micro-Max - totaling 760 characters (spaces and newlines included).

Versions

  • Toledo Picochess (944 non-blank characters)
  • Toledo Nanochess (1257 non-blank characters)
  • Book

  • Toledo Gutiérrez, Oscar (2014). Toledo Nanochess: The commented source code. Lulu. ISBN 978-1-304-86437-6. 
  • References

    Toledo Nanochess Wikipedia