The goal was to build a complete classical engine while keeping the code as small and readable as possible. The entire engine is 776 lines of C90 in a single file, with no dependencies.
Despite the size it implements the full set of FIDE rules and passes the standard perft tests, including:
- en passant and all underpromotions
- correct castling-rights handling when a rook is captured
- repetition detection
- correct stalemate and checkmate reporting
- negamax
- iterative deepening
- aspiration windows
- null-move pruning
- late-move reductions
- quiescence search
- transposition table
- triangular PV table
The main purpose of the project is readability. The whole engine can be read top-to-bottom as a single file, with comments explaining each subsystem.
I don't have a formal Elo measurement yet. In informal testing against engines like TSCP 1.81, MicroMax 4.8, and BBC 1.2, it appears to play roughly around the ~1800 level, particularly at shorter time controls.
It would be interesting to see how it performs in CCRL.
Source:
https://github.com/namanthanki/chal
Windows and Linux builds are available in the releases section.
I'm also curious which parts of the code people find most confusing or unclear.
The goal is for the whole engine to remain readable in a single sitting.