The Anatomy of Problem-Solving