Micro-Max (chess engine)
Encyclopedia
Micro-Max is a chess engine developed by Dutch H.G. Muller, born in 1956.
The program is 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....

 and according to IOCCC rules it is 1088 characters, not counting ; { } nor leading spaces and line feeds. The author claims that it is the smallest non-trivial chess engine in existence.

The source code for Micro-Max and other chess variant engines is available.

Versions

  • Micro-Max Micro (1180 characters)
  • Micro-Max 1.6 (1433 characters)
  • Micro-Max 3.2 (2000 characters)
  • Micro-Max 4.0 (1752 characters)
  • Micro-Max 4.4 (1865 characters)
  • Micro-Max 4.8 (1953 characters)

Source code sample


main
{
int k=8,*p,c[9],d;

F(X,0,8)
{b[X+V]=(b[X]+=16)-8;b[X+16]=18;b[X+96]=9;
F(Y,0,8)b[16*Y+X+8]=(X-4)*(X-4)+(Y-3.5)*(Y-3.5);
}

W(1)
{F(N,0,121)printf(" %c",N&8&&(N+=7)?10:n[b[N]&15]);
p=c;W((*p++=getchar)>10);
if(*c-10){X=*c-16*c[1]+C;Y=c[2]-16*c[3]+C;}else
{d=6;N=0;W(N<1e6)D(k,-I,I,Q,8,d++);}
if(D(k,-I,I,Q,9,2)

I)k^=24;
}
}

External links
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK