ChessML notes
ChessML is a chess engine I am writing in OCaml for fun and to learn. These pages are my notes on the techniques it uses: what I understood about each one, how ChessML does it (including the parts it does crudely or not at all), and the mistakes worth warning others about.
They are not a reference. I am a novice at this, and where I explain something you should trust the Chess Programming Wiki and the engines it links to over me. Each page lists the sources it leans on.
The pages
Representing the board:
- Bitboards: the board as 64-bit integers
- Magic bitboards: attacks of sliding pieces by table lookup
- Zobrist hashing: a 64-bit key for every position
Searching:
- Alpha-beta pruning: the core search
- Transposition tables: remembering positions already searched
- Quiescence search: not stopping in the middle of a capture sequence
- Null move pruning: passing to prove a position is good enough
- Late move reductions: searching unlikely moves less deeply
- Move ordering: why the order of moves matters so much
Judging positions:
- Static exchange evaluation: is this capture safe?
- Evaluation function: turning a position into a number
- Opening books: playing the first moves from a book
- Basic endgames: queen, rook, bishop and knight mates, and an exact king and pawn table
The overview page has a few lines on each, and the developer guide describes how the code is organized.
How strong is it?
Not very, by engine standards: roughly 1850–2000 on Stockfish’s limited-strength scale, measured with a few hundred fast games, so take it as a ballpark. The README explains how I measured it.