1. Home
  2. Computing & Technology
  3. C / C++ / C#
David Bolton
David's C / C++ / C# Blog

By David Bolton, About.com Guide to C / C++ / C#

The Smallest Chess Program in C

Thursday September 10, 2009
Toledo ChessMexican Óscar Toledo Gutiérrez writes very short chess programs in C and he has had four wins at the International Obfuscated C Code Contest with them. They play pretty well considering the source code is barely above 1Kb in its entirety. Obviously with such a small quantity of source code the display is just text unless you build it for winboard (see his site for details).

I compiled Toledo 1 with Visual Studio 2008 and the release exe is only 22KB in size. Compressing with upx, using the --force option, shrank it down to 8KB. To get source code so small, the developer used every technique to obfuscate it so if you can read and understand it, well done! A permanent link has been added to the C Games code page.

Comments
September 20, 2009 at 4:46 pm
(1) gerry lowry says:

http://nanochess.110mb.com/index.html
appears to be a broken link.

September 20, 2009 at 4:47 pm
(2) gerry lowry says:

http://nanochess.110mb.com/index.html
appears to be broken;

leave a comment also appears to be broken.

September 20, 2009 at 4:49 pm
(3) gerry lowry says:

oops, I was wrong about “leave a comment” being broken; it only appears to be broken because there is no feedback and because there is a delay preceding the posting of one’s comment(s).

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

Explore C / C++ / C#
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. C / C++ / C#

©2009 About.com, a part of The New York Times Company.

All rights reserved.