Imagine an evil dictator. He imprisons his enemies in a labor camp, but they never do any work! He doesn't want to torture them, or force them to do that since he is using all of his soldiers to build him a beautiful castle. Instead, he decides to create an incentive: every time you do a certain task (such as carrying 500 stones a total of one mile), you get a coin from an automated machine. If you get some huge number of coins, you earn freedom!
The only problem is that he needs a door to release exactly one. He can't afford to send a soldier to guard the door, so he needs a door that will allow exactly one person to go through when a token is deposited into a coin slot. This is going to be based off of medieval-style technology, so no complex scanners or anything electronic.
I have thought of:
A revolving door (But two people could both fit in)
A weight based door (Two thin or young people could get out)
A scanner which would check for people (Too high tech)
I've wondered about this for a while, just out of interest,