What Hat Are You Wearing?

by Janice Kim on December 27, 2011

Perhaps you are familiar with logic puzzles involving hats. No? For example, imagine there are 10 prisoners and 10 hats. Each prisoner is assigned a random hat, either red or blue, but the number of each color hat is not known to the prisoners. The prisoners will be lined up single file where each can see the hats in front of him but not behind. Starting with the prisoner in the back of the line and moving forward, they must each, in turn, say only one word which must be “red” or “blue”. If the word matches their hat color they are released, if not, they are killed on the spot. A friendly guard warns them of this test one hour beforehand and tells them that they can formulate a plan together to help them survive within the given parameters. How many prisoners could you guarantee to save?

While I was thinking about hats, I thought about how it might relate to go, and outlined in broad strokes my new Hat Theory in the comments of the go game below.

[sgfPrepared id=”0″]