Similarly precocious capacities show up in infants' understanding of the social world. Newborns prefer to look at faces over anything else, and the sounds they most like to hear are human voices—preferably their mothers'. They quickly come to recognize different emotions, such as anger, fear, and happiness, and respond appropriately to them. Before they are a year old they can determine the target of an adult's gaze, and can learn by attending to the emotions of others; if a baby is crawling toward an area that might be dangerous and an adult makes a horrified or disgusted face, the baby usually knows enough to stay away.

A skeptic might argue that these social capacities can be explained as a set of primitive responses, but there is some evidence that they reflect a deeper understanding. For instance, when twelve-month-olds see one object chasing another, they seem to understand that it really is chasing, with the goal of catching; they expect the chaser to continue its pursuit along the most direct path, and are surprised when it does otherwise. In some work I've done with the psychologists Valerie Kuhlmeier, of Queen's University, and Karen Wynn, of Yale, we found that when babies see one character in a movie help an individual and a different character hurt that individual, they later expect the individual to approach the character that helped it and to avoid the one that hurt it.

Understanding of the physical world and understanding of the social world can be seen as akin to two distinct computers in a baby's brain, running separate programs and performing separate tasks. The understandings develop at different rates: the social one emerges somewhat later than the physical one. They evolved at different points in our prehistory; our physical understanding is shared by many species, whereas our social understanding is a relatively recent adaptation, and in some regards might be uniquely human.

That these two systems are distinct is especially apparent in autism, a developmental disorder whose dominant feature is a lack of social understanding. Children with autism typically show impairments in communication (about a third do not speak at all), in imagination (they tend not to engage in imaginative play), and most of all in socialization. They do not seem to enjoy the company of others; they don't hug; they are hard to reach out to. In the most extreme cases children with autism see people as nothing more than objects—objects that move in unpredictable ways and make unexpected noises and are therefore frightening. Their understanding of other minds is impaired, though their understanding of material objects is fully intact.

At this point the religion-as-accident theory says nothing about supernatural beliefs. Babies have two systems that work in a cold-bloodedly rational way to help them anticipate and understand—and, when they get older, to manipulate—physical and social entities. In other words, both these systems are biological adaptations that give human beings a badly needed head start in dealing with objects and people. But these systems go awry in two important ways that are the foundations of religion. First, we perceive the world of objects as essentially separate from the world of minds, making it possible for us to envision soulless bodies and bodiless souls. This helps explain why we believe in gods and an afterlife. Second, as we will see, our system of social understanding overshoots, inferring goals and desires where none exist. This makes us animists and creationists.

IV. Natural-born dualists

For those of us who are not autistic, the separateness of these two mechanisms, one for understanding the physical world and one for understanding the social world, gives rise to a duality of experience. We experience the world of material things as separate from the world of goals and desires. The biggest consequence has to do with the way we think of ourselves and others. We are dualists; it seems intuitively obvious that a physical body and a conscious entity—a mind or soul—are genuinely distinct. We don't feel that we are our bodies. Rather, we feel that we occupy them, we possess them, we own them.