# Agent detection

Agent detection is the inclination for animals, including humans, to presume the purposeful intervention of a sentient or intelligent agent in situations that may or may not involve one.

## Evolutionary origins

It is believed that humans evolved agent detection as a survival strategy. In situations where one is unsure of the presence of an intelligent agent (such as an enemy or a predator), there is survival value in assuming its presence so that precautions can be taken. For example, if a human came across an indentation in the ground that might be a lion's footprint, it is advantageous to err on the side of caution and assume that the lion is present.
Psychologists Kurt Gray and Daniel Wegner wrote:
   The high cost of failing to detect agents and the low cost of wrongly detecting them has led researchers to suggest that people possess a Hyperactive Agent Detection Device, a cognitive module that readily ascribes events in the environment to the behavior of agents.
Detecting false positives enabled animals to survive and have higher fitness as missing a false positive can result in injury or death. This decision process can be mapped as below using Signal Detection Theory:
Signal Detection :
| | Response Present | Response Absent |
| Stimuli Present | Miss | Hit |
| Stimuli Absent | Correct Rejection | False Positive |
Many animals exhibit agency detention when avoiding or hunting other animals. To avoid or approach, an animal must be able to observe and interpret another animal’s action tendency and decide whether to flee or resist an attack. Often, this response is facilitated through instinctual reactions. However, humans and other primates are capable of projecting a theory of mind to other agents to better understand them. Humans in particular attribute intentions to agents to project beliefs or to infer emotions, and involves two steps:
* An action tendency is recognized by the hypersensitive agency detection.
* After recognition of the action, attribution of the agent is considered to understand the agent’s beliefs, desires, and intentions.
** Second step represents mentalization (theory of mind) for humans in particular.

## Role in religion

Scientists believe that the belief in acting gods is an evolutionary by-product of agent detection, and can be considered a spandrel, which is a non-adaptive trait formed as a side effect of an adaptive trait. The psychological trait in question is "if you hear a twig snap in the forest, some sentient force is probably behind it", leading to primates avoiding potential predators seeking to eat or murder them. Hypothetically, this trait could remain in modern humans in the form of hypersensitive agency detection. Instead of just inferring intent of another agent, humans project sentience of the agent to better understand it. Thus, some evolutionary psychologists theorize that "even if the snapping was caused by the wind, modern humans are still inclined to attribute the sound to a sentient agent; they call this person a god".
According to Ulrich Kühnen et al., religion also may have played a role in the formation of group cohesion. As the human brain evolved, the increased cognitive capacity enabled humans to better organize and survive due to increased cognitive computation. The neocortex ratio (volume of gray matter) of the human brain is much larger as compared to other animals as it is only 2% of body weight while consuming 20% of the energy ingested. The social brain hypothesis explains that with larger brains, humans developed language and other forms of expression as tools of communication. This led to the sharing of knowledge and resources, increasing fitness for group members. Over time, as groups grew larger and complex, it took more mental capacity to maintain social order.
Humans associated with each other based on shared ideas of agency. Communal exchange of information allowed groups to establish rules, roles, and rites, leading to the phenomena of religious and paranormal practices. Sacred rules and roles ensured that all members had a role and followed a hierarchical structure. Those that contributed to the survival of the group were rewarded. This structure also mostly resolved the free-rider problem (those that take advantage of the survival effort of others and contribute little in return), as argued by Jonathan Haidt in The Righteous Mind.
However, agent detection alone may not have been the primary catalyst for the belief in supernatural agents. Gray and Wegner assert that agent detection is likely to be a "foundation for human belief in God" but "simple over attribution of agency cannot entirely account for the belief in God..." because the human ability to form a theory of mind and what they refer to as "existential theory of mind" are also required to "give us the basic cognitive capacity to conceive of God." According to Justin L. Barrett, having a scientific explanation for mental phenomena does not mean we should stop believing in them. "Suppose science produces a convincing account for why I think my wife loves me — should I then stop believing that she does?"

## Time-consuming steps, fast escapes and criticism

Since it takes time to think of why a stimulus is present while simply reacting to it goes much faster, some evolutionary biologists criticize the assumption that agent detection would enhance the ability to escape predators as making a fast escape is of high importance to survive. These biologists state that simple reactions to stimuli that do not take a by-route over speculation about causes, such as running from the shape of certain footprints or a pair of eyes by simple reflex without even making a time-consuming association to a predator, would be selected instead by saving one step and therefore time. As a result, these biologists conclude that there are no specialized brain mechanisms for agent detection.