You and nine other people have suddenly been captured by super intelligent alien overlords. The aliens think humans look quite tasty, but they are not allowed to eat highly logical and cooperative beings. Unfortunately, they’re not sure whether you qualify, so they decide to test if you can solve this prisoner hat riddle.

Through its universal translator, the alien guarding tells you the following:

“You will be placed in a single-file line facing forward in size order so that each of you can see everyone lined up ahead of you. You will not be able to look behind you or step out of line. Each of you will have either a black or a white hat on your head assigned randomly, and I won’t tell you how many of each color there are. When I say to begin, each of you must guess the color of your hat starting with the person in the back and moving up the line. And don’t even try saying words other than black or white or signaling some other way, like intonation or volume; you’ll all be eaten immediately. If at least nine of you guess correctly, you’ll all be spared.”

Can you come up with a strategy guaranteed to save everyone? But remember, this puzzle is based on inductive reasoning, not assumptions. You can only figure out the color of your hat from the action of others.

More Information: Colored Hats and Logic Puzzles (PDF)