The puzzle box was created by Eward L. Thorndike, in order to study trial-and-error learning in animals. A hungry animal was placed inside the box, and would find a way out of it through trial-and-error. When the procedure was repeated, the animal would demonstrate having learned how to get out of the box. This illustrated what Thorndike called the law of effect.