How AlphaZero learned chess through self-play

AlphaZero learned chess by playing games against itself, starting with the rules and using reinforcement learning. It also learned Go and shogi. In DeepMind’s description, the system improved its judgments about promising moves through trial and error and used search to explore possible continuations.
How can a result teach anything about an earlier move?
Consider a fictional chess game in which White gives up a pawn to gain space. The rules can tell a program that the move is legal, but they don’t say whether the extra space is worth the pawn. The outcome arrives much later. One win proves little about that particular decision. Across self-play games, however, results can inform how the system evaluates positions and prioritizes moves in later searches.
You can try the same distinction on a chessboard. Compare two legal replies to a pawn sacrifice. The rules allow both moves, but one may give the opposing queen an open file.
FAQ
Did AlphaZero need a library of human openings to begin? DeepMind describes AlphaZero as starting from the rules and learning through self-play.
Is AlphaZero the same project as MuZero? They are related. DeepMind describes MuZero as learning a model for planning without initially being given the game rules.