Abstract
The evolutionary origins of coordinated group movement, or swarming, remain a central question in both biology and robotics. While often modeled through explicit social rules or direct communication, this study investigates whether swarming can emerge as an adaptive response to resource scarcity and partial observability. By evolving Continuous-Time Recurrent Neural Network (CTRNN) controllers for agents in a competitive foraging environment, we demonstrate that agents learn to use the presence of neighbors as a proxy for resource location. This emergent social behavior is dynamically modulated by the agents' internal energy levels, providing a computational model for risk-sensitive foraging theories.
Introduction
In biology and robotics, swarming is often explained through explicit interaction rules (like the famous "Boids" model) or direct communication. However, the evolutionary origin of these behaviors in a competitive, non-cooperative world remains a mystery. This research addresses whether swarming can emerge purely from passive sensing—where the sight of a neighbor serves as a "proxy signal" for a hidden resource. The paper specifically explores how an agent's internal state—its stored energy or resource level—influences this social coordination.
Methods and Experimental Setup
The study utilized ABMax, a high-performance simulation framework built on JAX, to model a large-scale 2D environment containing 300 foragers and 400 resource patches.
Agent Architecture and Sensing
Foragers are modeled as self-propelled disks with differential-drive kinematics. Their sensory input consists of equiangular ray-casts that detect the distance to neighbors and resource patches. This setup creates a challenge of partial observability, as agents cannot see the entire field at once and must deal with occlusions.
Evolutionary Strategy
The "brains" of the agents are Continuous-Time Recurrent Neural Networks (CTRNNs), chosen for their ability to accumulate evidence over time, similar to biological neurons. The controllers were optimized using CMA-ES (Covariance Matrix Adaptation Evolutionary Strategy). To ensure the evolution accounted for competition, different policy samples were evaluated concurrently within the same simulation rollout, forcing the process to account for inter-agent interactions directly.
Key Insights: Swarming as an Informative Proxy
The primary finding is that agents naturally learn to aggregate when resources are scarce. In a partially observable world, a neighbor's position becomes a valuable piece of information: if a neighbor is moving toward a specific area, there is a high probability that a resource patch is located there. This suggests they've learned that "where there's a neighbor, there might be food."
Internal State Modulation
The behavior is not a fixed social instinct but is modulated by "hunger." Analysis of the CTRNN hidden states revealed specific "hunger-tracking" neurons. When these internal states were artificially clamped to represent low energy, the agents immediately initiated swarming behavior, proving a causal link between internal state and social coordination.
- Satiated Agents: When energy levels are high, agents become more solitary and risk-averse, maintaining larger distances from others.
- Starving Agents: As energy levels drop, agents become more "social," tolerating higher density and crowding to leverage social cues for finding food.
Key Results
The evolutionary process successfully transformed agents from performing random circular movements to executing goal-directed foraging.
Quantitative metrics support these observations:
- Adaptive Foraging: Evolved agents successfully transitioned to goal-directed exploitation, concentrating around resource patches.
- Aggregation Metrics: Evolved agents stabilized at a Mean Nearest Neighbor (MNN) distance of ~17 units. When inter-agent sensing was disabled, this distance jumped to ~36 units, confirming the behavior was a learned response to social cues.
- State-Dependent Distance: A clear inverse relationship was found between stored resources and aggregation. As resource levels increased from 0 to 200, the terminal MNN distance increased significantly, showing that "satiated" agents prefer more personal space.
Conclusion and Future Work
This work demonstrates that complex social coordination can emerge from simple metabolic pressures and sensory limitations. By treating neighbors as information sources, agents navigate the trade-off between competition and information gathering.
Future research will explore more complex physical constraints, such as hard-body collisions, which would introduce a physical cost to crowding. Additionally, introducing dynamic resources or predator-prey elements could lead to the emergence of even more sophisticated collective strategies like schooling or "selfish herd" dynamics.
Summary updated