Abstract
This study explores whether complex flocking behaviors—traditionally modeled via heuristic rules like separation, alignment, and cohesion—can emerge naturally from a pure survival objective. Using the SELFish (Swarm Emergent Learning Fish) framework, the authors employ Multi-Agent Reinforcement Learning (MARL) in a predator-prey simulation. By introducing a predator "distraction" mechanic, where the risk to an individual prey decreases within a group, the research demonstrates that flocking emerges as a Nash equilibrium of self-interested agents. Quantitative analysis confirms that these emergent swarms exhibit high alignment and cohesion, mirroring biological observations and hard-coded models without explicit behavioral rewards.
Introduction
In 1987, Craig Reynolds famously simulated bird-like "Boids" using three simple steering rules: separation, alignment, and cohesion. While successful, these rules are "hard-coded" heuristics. A fundamental question in both biology and computer science is whether these rules must be innate or if they are simply the most efficient solution to environmental pressures.
Previous attempts to use Reinforcement Learning (RL) to generate flocking often "cheated" by baking these rules into the reward function (e.g., rewarding proximity to neighbors). This paper introduces the SELFish approach to investigate if flocking can emerge in a multi-agent system where the only goal is survival.
Methods
The researchers developed a 2D continuous simulation environment on a torus (wraparound square). The system consists of:
- Prey Agents: Multiple autonomous agents moving at constant speed with controllable turning angles.
- Predator: A single entity that moves at the same base speed but utilizes a "leap" mechanic. Crucially, the predator features a "distraction" mechanic: if multiple prey are within a specific radius, it targets one at random, reducing the individual risk for agents in groups.
- Algorithms: Two RL architectures were evaluated: Deep Q-Learning (DQN) for discrete actions and Deep Deterministic Policy Gradient (DDPG) for continuous control.
- Reward Structure: The reward function is sparse and survival-based. Agents receive +1 for every frame they remain alive and a penalty of -1000 if captured. No rewards are provided for proximity to neighbors or alignment.
Key Insights and Results
The core driver of emergence in this model is the predator's distraction mechanic. Agents learn that their individual probability of being targeted drops when surrounded by others, creating an evolutionary pressure toward aggregation.
The authors found that flocking represents a Nash Equilibrium. While a "TurnAway" strategy (running directly from the predator) might yield higher group survival in some cases, RL agents converge on flocking because an individual who breaks rank becomes an easy, non-distracting target.
Quantitative metrics using DBSCAN clustering proved that RL agents formed distinct clusters with high alignment and cohesion. Notably, the continuous-action model (DDPG) produced denser, more cohesive swarms than the discrete DQN model, suggesting that fine-grained control is essential for the subtle adjustments seen in biological schools. Furthermore, survival time scaled positively with the number of agents, confirming that the "safety in numbers" effect was successfully exploited by the learned policy.
Discussion and Future Work
The current model operates in a simplified environment without physical obstacles or collision constraints. In nature, the risk of collision serves as a major constraint on swarm density, which is not yet captured here.
Future work suggests that co-evolution—where the predator also learns hunting strategies via RL—could lead to even more complex tactical maneuvers, such as the "flash expansion" behaviors observed in real fish schools. This study provides a foundational proof that collective intelligence can emerge from purely selfish survival instincts.
Summary updated