Here's a puzzle that was posted in AiDreams. I actually managed to work it out. See if anyone can. Hint: It's not your usual logic problem.
The prison warden tells his three best behaved prisoners that in the
morning he will give them all one chance to get out of jail free.
When they wake up, they are to dress quickly and all go to a specific
room. At no time are they allowed to communicate with each other in any
way. They will each have a red dot or a white dot on their foreheads.
Anyone who can see a red dot on another's forehead is to tap on the
floor. Anyone who can guess the colour of the dot on his own forehead
correctly will go free, but if he gets it wrong, he will never be released.
In the morning they do as they have been told. All three prisoners tap
on the floor. After a couple of minutes, one of them tells the warden
the colour of the dot on his forehead and he is allowed to go free.
What colour was the dot on his forehead, and how did he know?