1,953 characters, unchanged
micro-Max is a chess program by H.G. Muller, written to see how much real chess fits in the smallest possible C source code. Version 4.8 plays complete games, including castling, en passant, and repetition draws, with a genuine search and evaluation:
- Negamax search with iterative deepening
- Quiescence search over all captures, best captures first
- A hash table that keeps scores and best moves
- Null-move pruning, futility pruning, and late-move reductions
- King safety, plus pawns valued more as they advance
Muller released version 4.8 two ways: as a stand-alone program you play by typing moves at a text prompt, and as a version for the WinBoard chess program on Windows, with the engine’s code changed to fit WinBoard.
micro-Max 4.8 UCI adds the Universal Chess Interface to the original engine without changing it. Muller’s umax4_8.c is compiled exactly as published, byte for byte, with a separate 64Logic integration layer, and every build checks the SHA-256 of umax4_8.c before compiling.
The engine on the board above is built from the same umax4_8.c, compiled to WebAssembly so it runs entirely in your browser. Your moves are never sent to a server. Move for move, it matches micro-Max 4.8 UCI (Core) on Linux, down to the node count.
Here micro-Max plays the way Core does: every game starts from the opening position, it thinks until its own search finishes, usually a few seconds, and pawns always promote to a queen.
Don’t underestimate this small engine: most chess players will find it hard to beat.