Explaining Chess and Go in Natural Language
tl;dr: We compare two moves, then explain in natural language why the stronger move is better.
The Goal: explain chess engine moves in natural language
Chess engines look at millions of positions and evaluate each one with a neural network. We want to explain why an engine likes one move better than another in simple language.
When playing chess, both humans and engines do two things:
- Look a few moves ahead
- Compare the resulting positions and choose the best move
The starting position
Let’s go through an example: you’re playing Black. Compare two moves from this position
Two possible continuations
If you take with the pawn:Pawn takes:
If you take with the knight:Knight takes:
Possible replies:
Your opponent’s best reply in each case:
How do we decide which position is better?
Let’s compare the material.
Pawn takes:
Black (you)
White
Black has more material.
Knight takes:
Black (you)
White
Material is equal.
Explanation:
We use chess concepts (motifs) to explain positions.
Motifs are patterns, like material advantage, that appear more often in winning positions than in losing ones.
For example, in our dataset, a material advantage appears in 61.5% of winning positions, but only 5.5% of losing ones.
Our method, BinProp, automatically discovers motifs by asking language models to come up with them, over and over again. See BinProp in action:
We now have a list of motifs. How do we explain a move?
We found two motifs: bishop-pair advantage and passed pawn. Now we check which appears after the engine’s preferred move, but not after the alternative.
- Bishop-pair advantage
- Passed pawn
- Bishop-pair advantage
- Passed pawn
Explanation:
Let’s try a real example
- Knight outpost
- Rook activity
- Piece activity
- Knight outpost
- Rook activity
- Piece activity
Explanation:
- Knight outpost
- Black's knight has an outpost on d3, where White's pawns cannot chase it.
- Rook activity
- Black's rook has a semi-open file; White's rooks sit behind their pawns.
- Piece activity
- Black's pieces average 4.1 reachable squares vs White's 2.3, excluding enemy pawn attacks.