The Mechanics of the Mind