Click "Next Step" or "Play All" to begin the walkthrough.
The key insight is parity -- whether a count is odd or even. Before the game begins, all 10 people agree on this strategy:
Let P = parity announced by the back person (0 = even, 1 = odd).
For person i, let H(i) = number of "Black" guesses heard so far (from people behind, not including the back person's actual hat), and S(i) = number of black hats they see ahead.
Their hat is Black if: (P + H(i) + S(i)) mod 2 = 1
Their hat is White if: (P + H(i) + S(i)) mod 2 = 0
The back person's guess encodes information (the parity) rather than a true guess about their own hat. Their actual hat color is independent of what they see, so they have no information about it. By sacrificing their certainty, they give everyone else the one piece of missing information needed.