On the role of collective sensing and evolution in group formation

Collective sensing is an emergent phenomenon which enables individuals to estimate a hidden property of the environment through the observation of social interactions. Previous work on collective sensing shows that gregarious individuals obtain an evolutionary advantage by exploiting collective sensing when competing against solitary individuals. This work addresses the question of whether collective sensing allows for the emergence of groups from a population of individuals without predetermined behaviors. It is assumed that group membership does not lessen competition on the limited resources in the environment, e.g., groups do not improve foraging efficiency. Experiments are run in an agent-based evolutionary model of a foraging task, where the fitness of the agents depends on their foraging strategy. The foraging strategy of agents is determined by a neural network, which does not require explicit modeling of the environment and of the interactions between agents. Experiments demonstrate that gregarious behavior is not the evolutionary-fittest strategy if resources are abundant, thus invalidating previous findings in a specific region of the parameter space. In other words, resource scarcity makes gregarious behavior so valuable as to make up for the increased competition over the few available resources. Furthermore, it is shown that a population of solitary agents can evolve gregarious behavior in response to a sudden scarcity of resources, thus individuating a possible mechanism that leads to gregarious behavior in nature. The evolutionary process operates on the whole parameter space of the neural networks; hence, these behaviors are selected among an unconstrained set of behavioral models.


Introduction
The fields of sociology and biology have produced a huge body of literature, which gives an all-round perspective and understanding of groups, e.g.Krause and Ruxton (2002).
Literature about group formation does not make a clear statement about why groups exist in the first place.A common argument is that groups could form because of between-group competition (Puurtinen and Mappes, 2009).Another factor that is often referred to is the environment, which could incentivize individuals to join forces by favoring group effort, e.g.pack hunting, division of labor, avoiding predation, etc Still, it is not clear how two individuals would decide to cooperate for the first time, particularly if the environment favors individual behavior.
The question this study asks is: under which conditions can groups form spontaneously in an environment that incentivizes individualistic behavior?
As a concrete example, a study of a set of ancient and recent human skulls found a gradual feminization of facial features, which reflect a reduction in levels of testosterone (Cieri et al., 2014).This change is concurrent to the rise of "behavioral modernity", that is the "establishment of behaviors involving innovation, planning depth, and abstract and symbolic thought".The evolution of behavioral modernity is generally explained by an increase in population density, for which higher levels of social tolerance are a prerequisite.The study argues that increased social tolerance would have produced a reduction in testosterone, thus causing the morphological changes that can be found in fossils of that period.
Both behavioral modernity and morphological change appear to be generated by increased social tolerance, there must have been a change in the environment which made tolerance a more favorable characteristic than aggression.Quoting Szathmary and Smith, "transitions must be explained in term of immediate selective advantage to individual replicators".One possibility is an increased interaction between unrelated individuals.In this situation more tolerant individuals would have been rewarded, allowing for the aforementioned changes to happen.But how could this happen in a world populated by high-testosterone Homo Homini Lupus à la Hobbes?
We argue that collective sensing can be the driver of group formation, even when the environment does not favor groups and in presence of within-group competition.The information we are concerned with is the location of food, but this might also be interpreted as suitable nest locations (Berdahl et al., 2013), sexual partners, etc.
Information plays a key role in nature: information exchange is shaping individual behavior (Vergassola et al., 2007), group behavior (Skyrms, 2010), collective intelligence (Garnier et al., 2007), and was crucial for the creation of the complexity of nature (Szathmary and Smith, 2000).Collective sensing is an emergent phenomenon (Berdahl et al., 2013) that can increase group fitness (Torney et al., 2009), therefore we suspect it could play a role in the formation of groups.
In order to answer our question, we compare the performance of two navigation strategies: random walk, an individualistic strategy that neglects other agents, and herding behavior which tends toward crowded areas.Our first result is that herding agents are able to exploit collective sensing, therefore having a higher fitness level than individualistic agents.We find this advantage to strongly depend on the model parameters: • We find that perceptual noise, caused by imperfect perceptions, increases with high population density and is able to undermine collective sensing.
• Food scarcity is fundamental for collective sensing and if resources become too abundant, random walk becomes the most profitable strategy.
Our main result is to show that collective sensing is not sufficient to generate herding behavior: if food is too abundant, evolution will select individualistic agents.Herding behavior can emerge from a population of individualistic agents as an evolutionary response to a reduction in resource availability.This result provides a clue about the cause of the increased social tolerance observed in populations of the Middle Pleistocene: a sudden reduction in resources could have forced humans to contact unrelated individuals more frequently in order to exploit collective sensing.
A recent experiment showed that human subjects, playing in an environment with invisible resources (Krafft et al., 2015), learn to exploit collective sensing and develop a strategy that looks very similar to herding behavior: • If local score is high, stay and exploit.
• If local score is low and another visible player is possibly getting a high score, move to that location.
This experiment lends plausibility to our claim by proving that humans are capable of learning to exploit collective sensing.We are not claiming to have found conclusive proof that collective sensing is responsible for social tolerance, we are merely advancing an hypothesis that requires support of anthropological evidence.Nevertheless we believe that the fields of anthropology and archaeology can benefit from this study as it can stimulate further research.
The article is structured as follows: In section 3 we describe the model.In section 4 we situate our work within the Agent-Based Modeling literature.In section 5 we comment on our results and their implications.In section 6 we summarize our work and its contribution to the literature.

Methods
We tackle the problem of group formation by means of an agent-based evolutionary model of a foraging task.Simulation is a suitable tool, and preferable over mathematical models, for studing processes generated by individual interactions (Boudon, 1967) as it allows us to capture their dynamics.We design an environment that does not give an advantage to groups and cooperation, on the contrary it puts every individual in competition with each other.
We take the model developed by Bennati et al. (2016) and extend it to support evolution.We will now briefly describe the model, but we refer to the original article for a more detailed description.
The simulation environment is a square grid with periodic-boundary conditions.Each cell may contain food, and the number of cells containing food is defined by a parameter.
Agents are initially randomly placed in the environment and can either eat or move in search of food.Agents' perceptions do not allow them to see food unless it is in the same cell, but allow them to see other agents in the neighboring cells.This perception mechanism is inspired by the retina of fish (Strandburg-Peshkin et al., 2013): The visual system is able to count how many agents are in each of the cardinal directions, but it is unable to distinguish between specific cells.
Fitness is defined as the number of food units consumed.At every timestep agents play their turn one after the other.The population competes for the same resources, so the first agent who discovers a new source will exploit it more than any latecomer.We randomize the order of play at every timestep to give a fair treatment to all agents.
An agent can consume a maximum of one unit of food per timestep.Each food source starts with a random food quantity, whose mean value is high enough to avoid that, on average, a single agent could exhaust a source before any other agent can reach it.Our results are robust against the variation of this number.Whenever a food source is exhausted, a new one is spawned at a random location, this way the total number of food sources remains constant during the entire simulation.Food sources are redistributed according to a uniform probability distribution, so that a high fitness reflects an effective foraging strategy.
An important assumption is that food cannot be perceived at a distance and is only revealed to the agent that steps into the cell it is located in.If food were visible, the optimal strategy would be to go directly towards the food.With this limitation in place, the only way to do better than a random walk is to find a proxy signal for food location and exploit it.
This proxy is the location of other agents: assuming that agents who find food stop and consume it until exhaustion, a higher concentration of agents in one location would correlate to the presence of a food source.Conversely, the more agents there are the more likely this source is to be almost depleted.
Agents can reproduce after having reached a certain energy level.Reproduction spawns a new agent of the same type in the same cell, and energy is equally split between parent and offspring.Reproduction triggers mutations in the weights that connect each perception to each possible action, changing the function that drives the agent's behavior.The more fit an individual is the more offspring it will produce.Agents can live only for a limited time, after that they are removed from the game.Parameters are set so that an agent cannot reproduce more than ten times in a lifetime.

Literature
A large body of literature applies Agent Based Modeling to group and societal issues.Most Agent Based Models of society concentrate on the problem of cooperation (Helbing and Yu, 2009) or coordination (Mäs et al., 2010).Our model is designed in a way that neither cooperation nor coordination are required to be successful: we created a foraging task where agents are in competition for the same resources.Groups are at disadvantage as the more individuals they contain, the faster resources are depleted (Bennati et al., 2016).Some assumptions are quite common in the literature, and most models rely on at least one of them.As opposed to previous work, we relax the following common assumptions: • The environment favors cooperation, e.g.Bowles and Gintis (2004), Montanier and Bredeche (2013).In our model individual pay-off does not depend on group affiliation.We could say that the environment actually favors individuals because the more individuals exploit a resource, the faster it depletes.
• Kin selection is possible, e.g.Smith (1964), Hales (2000), Hammond and Axelrod (2006), Helbing and Yu (2008).Agents do not have any visible characteristic that make them recognizable as members of a group, e.g. Green Beard (Hamilton, 1964) so they cannot develop mechanisms that favor kin.
• Spatial dispersion is imposed, e.g.Nowak and May (1992), Santos et al. (2006), Grund et al. (2013).Agents are randomly placed and there is no mechanism that explicitly keeps offspring near their parents.Of course this could still happen as a result of specific environmental settings, e.g. an offspring is born in a cell with food.Similarly food is created randomly in the grid, so a new food source will unlikely be created near a depleted one.
• Agents have perfect knowledge.No organism in nature has unlimited computational power or perfect perception, therefore models of Bounded Rationality (Simon, 1982) are much more realistic.Our agents are bounded rational as they have to cope with an imperfect perceptual system.
Our approach is similar to models of Natural Selection, e.g.(Grund et al., 2013), where different groups obtain different fitness due to their characteristics.
Our agents, in particular their perception, are inspired by biological systems.A study about schooling fish was able to reproduce complex group movements by having fish react to changes in visual perception, in proportion to the distance from the retina (Strandburg-Peshkin et al., 2013).
A recent related study (Hein et al., 2015) shows that collective sensing can emerge through evolution from a population of fish.In contrast, we study under which conditions collective sensing can support sociality.

Results
We use the model of Bennati et al. (2016) as a base for our work and implement it in an evolutionary setting.
Agents in this model stop in cells with food and eat, and in doing so their location becomes correlated with the location of food sources.The main insight of this work is that the population is able to collectively sense the location of food, and this signal can be exploited by agents that implement a herding strategy, i.e. move to crowded areas.
This study also finds performance of herding agents to be dependent on population size.Herding agents' success depends on finding crowded areas, and this becomes more difficult when population size increases.In an environment with many agents small groups become more common, for example a few agents could by chance meet in the same location while navigating; herding agents might be misled by this and interpret that location as a source of food.
We replicate the setting described in (Bennati et al., 2016) and enable evolution.The average across all configurations sees herding agents barely surviving until the end of the simulation (Figure 1).Interestingly we can see a peak in the number of herding agents at the start of the simulation.This outcome can be explained by the negative effect of population size on herding performance; at the beginning population size is low enough to have herding agents surpass the random walkers, but as soon as the population (and therefore the noise) increases too much they cannot compete any longer.
To validate the assumption that noise is responsible for the decline of herding strategy, we develop a perception filter that should help to reduce the noise generated by overcrowding.The purpose of this is to verify that agent behavior is indeed proxy for food location by showing that a decrease in noise will boost performance.This system differs from the full perception in that it is able to recognize and filter out non-static agents, which are moving around looking for food.We implement this by first obtaining the list of visible agents from the full-perception algorithm, and then removing all agents that are performing a movement action.
In this specific configuration, herding agents with the full perception system are able to survive but cannot reproduce enough to overtake random agents (Figure 2).
Again we see the initial bump in herding performance: At the start the signal is stronger as the population is small.When the population gets bigger, the signal gets noisier and the fitness of herding agents decreases.
Using the refined perception system, the same conditions see herding agents strive and bring random agents to extinction (Figure 2 (+)).
Interestingly, the fitness of herding agents decreases as soon as random walk-ers reduce their number and starts oscillating as soon as random walkers become extinct.This is due to the exploration random agents perform, reducing exploration reduces the fitness of exploiters.We now compare performance of herding agents with the full and filtered perception system.We see that performance of herding agents with filtered perception is much higher and they are consistently able to outperform random agents for any population size.(Figure 3)  For a given population size, increasing the field of view of agents brings about the same effect.(Figure 4) Increasing the field of view increases performance as it allows agents to spot groups which are further away.A further increase of the visibility leads to a decrease in performance as the number of agents in the field of view becomes too high and noise starts obscuring the signal.
With filtered perception, performance increases with the visibility radius, becoming slightly reduced only for a fully visible environment.This is due to the better signal quality when filtering moving targets, as noise is reduced.
Results so far give evidence that the success of herding agents comes indeed from their ability to exploit information about the location of other agents as proxy for food location.We now investigate the influence of food availability on performance: If food is rare, herding agents are able to exploit the information coming from other agents' behavior to find sources of food.Whenever random agents find a food source and exploit it, herding agents will start converging and eventually exploit the same resource.The higher the number of agents in a location, the stronger the signal.This implies that, for a given population size, the fewer the food resources the more crowded they are, therefore herding agents will perform better.
The opposite is also true: if food is diffused enough, random agents are able to outperform herding agents.In this situation the probability of randomly finding a food resource is high, besides an agent which first discovers a food resource can exploit it exclusively.Herding agents instead have to compete with each other for the same resources, thus reducing their fitness.
Simulations confirm our hypotheses: (Figure 5) This last result suggests that an abundance of food can impede herding behavior.It would be interesting to know if the opposite is also true: can food scarcity trigger the evolution of herding behavior?
The question this study aims to answer is what conditions can cause the emergence of groups, specifically whether food scarcity can cause the emergence of herding behavior.
We first need to define a way to measure how far an agent implements a strategy.to do so we define a test for each oft the available actions.We then test the agents by presenting them with a situation and evaluating their behavior: we place them in a location with food and record how often they eat, Similarly we place them in a location without food and with an agent to their north and record how often they move north, and so on.A high score in all tests would mean that the population has adopted the herding strategy.
Figure 6 shows the population score during an average simulation run.The simulation starts with abundant resources, agents are quickly selected on the basis of their ability to forage but react randomly to stimuli coming from other agents.At some stage the amount of food becomes scarce (signaled by the red vertical line) and we see the population rapidly adopting the herding behavior.In conclusion we have shown that herding agents can outperform individualistic agents, and this is due to their ability to collectively sense food location.We also showed that herding performance decreases with perceptual noise and food availability.Finally we showed that a shortage of food could trigger the evolution of herding behavior among a population of individualistic agents.

Conclusion
Our goal was to study the influence of collective sensing on group formation.We created an agent-based model of a foraging task, and designed an environment where individualistic interests are favored over group interest and within-group competition exists.Our simulation features extremely simple, reactive agents in a pared-down environment.We compare performance of two different navigation strategies: random walk and herding behavior, i.e. move towards other agents.Despite the simplicity of the model, we show that herding behavior can lead to better evolutionary fitness than a individualistic strategy whenever the environment poses constraints on the quantity and visibility of food.Our work is very general as we relax many common assumptions in the literature, and the remaining model assumptions are well justifiable from the point of natural selection.
We show that herding behavior, if food is scarce, provides an evolutionary advantage at an individual level through collective sensing at a group level.We also show that collective sensing is not enough to allow for the spontaneous creation of groups, but together with scarcity of resources is able to trigger the evolution of herding behavior among a population of individualistic agents.
Our results support the hypothesis that information is the driver of group formation, and offer an explanation for the increase in social tolerance observed in prehistoric humans: a sudden reduction in resources.
Our work could contribute to the literature of archaeology and anthropology by showing new directions of investigation.Going back to our initial example, it could be interesting to examine whether a period of food scarcity, e.g. a glaciation, could have raised the frequency in contact between unrelated Homo Sapiens and therefore have generated an evolutionary benefit for less aggressive behavior that led to a reduction in testosterone.

Figure 1 :
Figure 1: Evolution enabled.Average across all parameter values.Herding agents can barely survive until the end of the simulation.

Figure 2 :
Figure 2: Full perception: Performance of herding agents peaks at a very low population size.Filtered perception (+): Herding agents can outperform random agents and bring them to extinction.Average population size for 24 runs.Parameters: Number of food sources: 5. Starting herding fraction: 10%.Field of view: 3.

Figure 3 :
Figure 3: Herding agents outperform random agents in populations of small size.Performance of herding agents increases with perception considering only static agents, reducing noise from crowding.Average fitness for 24 runs of length 20000.Parameters: Number of food sources: 5. Field of view: 1.

Figure 4 :
Figure 4: Herding agents increase their fitness for moderate visibility distance, while for bigger values noise becomes too intense and fitness drops.With filtered perception, herding agents benefit from higher visibility.Average fitness for 24 runs of length 20000.Parameters: Number of food sources: 5. Population size: 20.

Figure 5 :
Figure 5: Herding agents have a higher fitness advantage for scarce food resources.When much food becomes available, random agents can outperform herding agents.Average fitness for 24 runs of length 20000.Parameters: Number of food sources: 5. Population size: 20.

Figure 6 :
Figure 6: Evolution of herding behavior.Each graph represents how often the population acts according to the herding strategy.The Y-axis range is between zero and one.Agents are rapidly selected for their ability to forage, but a reduction in resources (red line) is necessary for them to adopt the herding strategy.Average of 24 runs.Parameters: Number of food sources: 40 before timestep 20k, 5 after timestep 20k.Field of view: 3.