Learning to flock in open space by avoiding collisions and staying together
M. Brambati, A. Celani, M. Gherardi, F. Ginelli · 2025
Read Learning to flock in open space by avoiding collisions and staying together by M. Brambati, A. Celani, M. Gherardi, F. Ginelli (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2506-15587.txt.
Introduction
Martino Brambati and three colleagues present a 2025 study on teaching artificial agents to flock like starlings, in open space with no cage to hold the group together. Each agent watches its nearest neighbors and learns by reinforcement, balancing two urges: align with the group and stay close, but never crowd. A local cost function punishes both drifting apart and near-collisions.
The learned behavior looks like the classic Vicsek flocking model, with strong alignment at close range and a flexible mix of alignment and attraction farther out. The resulting flocks show high internal order, and their neighbor-swapping statistics resemble real starling flocks. The authors suggest flocking may simply be what moving agents learn when survival demands company without crashes.
Catalog record
| CREATOR | M. Brambati, A. Celani, M. Gherardi, F. Ginelli |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 37 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2506-15587
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Learning to flock in open space by avoiding collisions and staying together M. Brambati, A. Celani, M. Gherardi, F. Ginelli Abstract We investigate the emergence of cohesive flocking in open, boundless space using a multi-agent reinforcement learning framework. Agents integrate positional and orientational information from their closest topological neighbours and learn to balance alignment and attractive interactions by optimizing a local cost function that penalizes both excessive separation and close-range crowding. The resulting Vicsek-like dynamics is robust to algorithmic implementation details and yields cohesive collective motion with high polar order. The optimal policy is dominated by strong aligning interactions when agents are sufficiently close to their neighbours, and a flexible combination of alignment and attraction at larger separations. We further characterize the internal structure and dynamics of the resulting groups using liquid-state metrics and neighbour exchange rates, finding qualitative agreement with empirical observations in starling flocks. These results suggest that flocking may emerge in groups of moving agents as an adaptive response to the biological imperatives of staying together while avoiding collisions. 1 Introduction The synchronized flight of bird flocks, exemplified by starling murmurations, is perhaps the most striking example of collective behavior in natural systems, which fascinated scholars for quite a long time [ 1 ] . Evolutionary biologists, for instance, have long debated the advantages of living in groups [ 2 ] , which should offer increased protection from predation by diluting the individual risk and possibly confusing the attackers by the sheer size of the assembly. Flocking behavior involves a high degree of order in the individual directions of motion [ 3 ] , and has been reproduced by minimal models of self-propelling particles (SPPs), such as Craig Reynolds Boids [ 4 ] or the celebrated Vicsek model [ 5 ] that has long captivated the attention of statistical physicists and played a pivotal role in the birth of the active matter research field. The essential ingredient of these models is the tendency of individual particles to align their direction of motion with those of their local neighbours, which is enough to promote long range order in systems with finite density (even in two spatial dimensions, due to the non-equilibrium nature of self-propelled particles) such as in toy models with periodic boundary conditions. In open systems, constituted by a finite number of individuals in an open, infinite space, purely alignment interactions are however not enough to maintain group cohesion. Models with metric interaction rules, such as the original Vicsek model, will quickly disintegrate under the action of fluctuations [ 6 ] , while more realistic topological interactions will see an endless diffusive spreading of the group size [ 7 ] . Therefore, it has long been recognized [ 8 , 9 ] , that some attractive interactions – by which SPPs tend to orient their direction of motion towards their local neighbours position rather than their orientation – are also needed to maintain group cohesion in open space. Typically, the relative weight of alignment and attractive interactions varies with the distance to neighbours, either sharply, as in behavioral zonal models [ 10 ] , or continuously as in [ 11 ] . Alternative mechanisms capable of generating an effective attraction have also been proposed in the literature [ 12 , 13 ] . Flocking, however, is not the only way for moving individuals to stay in a cohesive group, and also milling and swarming behaviors are observed in nature. If milling – which involves SPPs collectively rotating in a single vortex [ 10 ] – still involves local aligning interactions and a form of global order (captured by a global normalised angular momentum), group cohesion can be also – perhaps more easily – achieved through local attractive interactions only, resulting in a globally disordered but compact swarming behavior. It is therefore natural to wonder why certain gregarious species achieve group cohesion via flocking rather than swarming behavior, especially considering that flocking behavior is often displayed by animal groups that are not migrating or otherwise moving between different locations, such as starling murmurations. It has been argued that the flocking state – the result of the spontaneous symmetry breaking of a continuous symmetry – is characterized by long-ranged correlations [ 3 ] and is thus highly susceptible and capable of a collective reaction to environmental perturbations such as predatory threats. However, quantitative studies of swarming midges show that they can display strong collective behaviour despite the absence of global order, with a large capability to collectively respond to perturbations which is comparable to that of highly ordered flock of birds. The biological function of and the biological imperatives leading to flocking as opposed to swarming collective behavior thus remains largely unknown. In this work, we tackle this problem through the lens of Multi Agent Reinforcement Learning (MARL) [ 14 ] considering both a centralized learning scenario, in which all particles share their training, and a concurrent one where each agent learns separately. This approach was explored in [ 15 ] where it was demonstrated that velocity alignment emerges as an effective strategy to favor cohesion. These findings were corroborated by a theoretical study of mean-field optimal stochastic control in [ 16 ] . Here we extend the scope of these work by considering a richer model for the agents’ behavior and their interactions. Our SPPs move in a two dimensional open space and only perceive the positions and orientations of a local set of topological neighbours [ 17 , 7 ] . They judge their current state in terms of the mean distance to these neighbours, and take actions to modify their instantaneous direction of motion, combining alignment with the neighbours orientation and attraction towards their position. For every state, they are trained to find the optimal combination of alignment and attraction according to a cost function based on the distance to local neighbours. Regardless of the training being centralized or concurrent, we discover that cost functions that simply penalize large distances lead to a swarming behavior dominated by attraction, while the addition of a further penalty at small distances favor strong alignment at small to moderate distances, leading to a clear flocking and cohesive collective behavior similar to the one observed in starling flocks. Our result, robust to the presence of a sufficiently small noise term in the orientation dynamics, demonstrates that the need to maintain a minimum distance from neighbours is essential for the onset of flocking behavior, suggesting that such collective behavior may emerge from two different imperatives: the urge to stay together but also the need to avoid potentially dangerous collisions between group members. 2 Methods 2.1 Dynamics We consider N agents moving off-lattice in a 2 -dimensional unbounded (that is, infinite) space. The dynamics is parallel and discrete and the agents update their position with the standard streaming rule \textbf{r}_{i}^{t+\Delta t}=\textbf{r}_{i}^{t}+v_{0}\textbf{s}_{i}^{t+\Delta t}\Delta t, (1) where \textbf{r}_{i}^{t} is the position of the i-th agent at time t, \textbf{s}_{i}^{t} its unit heading direction and the speed of the agents is kept constant and equal to v_{0} . In the following, without loss of generality, we put \Delta t=1 . Agents only perceive their local environment represented by their topological (i.e. Voronoi) neighbours, the set {V}_{i}