Micro-Max (chess engine)
Micro-Max (uMax) is a chess engine developed by Dutch H.G. Muller, born in 1956. According to IOCCC rules it is 1088 characters, not counting ; { } not counting leading spaces and line feeds. This makes it the smallest non-trivial chess engine in existence.
The source code for Micro-Max and chess variant engines are 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;
}
}