Suppose we built a robot to explore the planet Mars. We provide the robot with seeing detectors  to keep it away from danger. It is powered entirely by the sun. Should we program the robot to be equally active at all times? No, the robot would be using up energy at a time when it was not receiving any. So we would probably program it to stop its activity at night and to wake up at dawn the next morning. According to evolutionary  theory of sleep, evolution equipped us with a regular pattern of sleeping and waking for the same reason. The theory does not deny that sleep provides some important restorative functions. It merely says that evolution has programmed us to perform those functions at a time when activity would be inefficient and possibly dangerous. However, sleep protects us only from the sort of trouble we might walk into; it does not protect us from trouble that comes looking for us. So we sleep well when we are in a familiar, safe place, but we sleep lightly, if at all, when we fear that bears will nose into the tent. The evolutionary theory explain the differences in sleep among creatures. Why do cats, for instance, sleep so much, while horses sleep so little? Surely cats do not need five times as much repair and restoration as horses do. But cats can afford to have long periods of inactivity because they spend little time eating and are unlikely to be attacked while they sleep. Horses must spend almost all their waking hours eating, because what they eat is very low in energy value. Moreover, they cannot afford to sleep too long or too deeply, because their survival depends on their ability to run away from attackers. Which of the following is the main idea of the passage?
Evolution has equipped all creatures with a regular pattern of sleeping and waking. The study of sleep is an important art of the evolutionary theory. Sleeping patterns must be taken into consideration in the designing of robots. The sleeping pattern of a living creature is determined by the food it eats.