I saw this puzzle a few months ago. I forced myself not to read the solution. I finally gave up on it today and read the winning strategy. Fucking brilliant. Just the puzzle is presented here. Solution can be found at the source.
Three people enter a room sequentially and a red or a blue hat is placed on each of their heads depending upon whether a coin lands heads or tails. Once in the room, they can see the hat color of each of the other two people but not their own hat color. They can’t communicate with each other in any way, but each has the option of guessing the color of his or her own hat. If at least one person guesses right and no one guesses wrong, they’ll each win a million dollars. If no one guesses correctly or at least one person guesses wrong, they win nothing.
The three people are allowed to confer about a possible strategy before entering the room, however. They may decide, for example, that only one designated person will guess his own hat color and the other two will remain silent, a strategy that will result in a 50 percent chance of winning the money. Can they come up with a strategy that works more frequently?