Endgame trainer

Take the opposition

Two kings, one idea that decides countless endings. Drag either king and watch who holds the opposition — direct, distant or diagonal — flip live as they face off.

Drag either king. The opposition updates as they move.

Black has the direct opposition.
The side to move must give way — the other king can then advance.
Side to move

The opposition: when the kings face off on the same file, rank or diagonal with an odd number of squares between them, whoever is not to move holds it. The one who must move has to step aside, letting the other king make progress. Winning most king-and-pawn endings comes down to taking the opposition at the right moment.

What "the opposition" actually means

Two kings stand in direct opposition when they face each other on the same file, rank, or diagonal with exactly one empty square between them. Neither king may step onto that middle square or capture the other, since kings can never be adjacent — so whichever side is forced to move must give way, stepping aside and surrendering the square directly ahead of it. The side that did not have to move keeps facing the same way and simply walks forward into the space that opened up. Holding the opposition, in other words, means it's your opponent's problem to move, not yours.

Distant opposition — the same idea, further apart

Kings further apart on the same file or rank, with an even number of squares separating them, are in "distant" opposition. As long as both kings approach head-on, one square at a time, that same parity carries all the way down to a direct, one-square standoff — so a king six squares from its rival, with the opponent to move, is already guaranteed to convert that into the opposition once the kings actually meet. Recognising distant opposition early lets you plan several moves ahead instead of only reacting once the kings are face to face.

Why it decides king-and-pawn endings

In a bare king-and-pawn ending, the defending king's entire job is often just this one thing: hold (or recapture) the opposition so the attacking king can never step in front of its own pawn to escort it home. Losing the opposition at the critical moment lets the attacking king muscle past and clear the pawn's path to promotion; holding it locks the position into a draw no matter how advanced the pawn is. One geometric idea — whose move it is — is the entire difference between a full point and a draw in a huge fraction of amateur endgames, which is exactly why it's worth drilling until it's automatic rather than something you re-derive from scratch each time it comes up.

The trainer above updates the verdict live as you drag either king — a faster way to build the pattern than working it out on paper every time.

Next: will the pawn queen? (rule of the square) or the endgame trainer.