banner
「云华」CloudSino

网络一隅/Net`Corner

愿我的祝福与你同在!
bilibili
steam
github
zhihu
misskey
email

Micro-Max: Possibly the smallest chess software

Micro-Max is an international chess program developed by Dutch programmer Harm Geert Muller, which is open source under the MIT license and provides a .exe executable file for download.


On this website, you can find my latest project: Micro-Max. Just for fun, I tried to write a chess program in a high-level language that has a source code size similar to the executable file of my old engine. Like a matchbox, I wanted to see how small I could make something while still making it play decently. The source code (excluding comments and spaces) contains less than 2000 characters and less than 200 lines, and although you might describe it as obfuscated C code, it may be easier to understand than larger, better-styled engines due to its small size.

As far as I know, this still makes micro-Max the smallest existing C chess program. The strong competitor Toledo has 2168 characters. Despite its small size, micro-Max seems to easily beat Toledo.

Excerpt from the author's website, translated using Google Translate. The author is also developing other chess games.


The program supports the complete FIDE (International Chess Federation) rules, using

  • Algebraic notation for moves,
  • Upper and lower case for black and white sides,
  • Letters to represent chess pieces

Displayed in the command line:

Image

If a move does not comply with the rules, it will not be executed:

Image

Normal moves:

Image

You can manually control the moves of the other side (PVP):
Image

Or simply press Enter to let the program make the moves (PVE):

Image

You can also leave all the moves to the program (spectate):

Image

In addition, the operation is the same as regular chess, there will be no prompts after victory, defeat, or draw.


Recommended reading: A Few Hundred Bytes-Sized Chess Program - Linux China

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.