arXiv:2608.28046cond-mat.stat-mechAug 2026

Manuscript Offprint

arXiv:2608.28046

Emergent aggregation from collective foraging

Gorka Muñoz-Gil, Andrea López-Incera, Vide Ramsten, Giovanni Volpe, Thomas Müller, Hans J. Briegel

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.

Gorka Muñoz-Gil D◯,1,∗\textcircled{D},^{1,*} Andrea Lopez-Incera D◯,2\textcircled{D},^{2} Vide Ramsten D◯,3\textcircled{D},^{3}

Giovanni Volpe D◯,3\textcircled{D},^{3} Thomas Müller D◯,4\textcircled{D},^{4} and Hans J. Briegel D◯1\textcircled{D}^{1}

1^{1}University of Innsbruck, Department for Theoretical Physics, Technikerstr. 21a, A-6020 Innsbruck, Austria

2^{2}Universitat Autònoma de Barcelona, Departamento de Didáctica de la Matemática

y las Ciencias Experimentales, 08193 Bellaterra (Cerdanyola del Vallès), Spain

3^{3}Department of Physics, University of Gothenburg, Origovägen 6B, 41296, Göteborg, Sweden

4^{4}Department of Philosophy, Box 17, University of Konstanz, 78457 Konstanz, Germany

Collective behaviour in living systems is usually modelled as the outcome of a direct social drive: agents are rewarded, or hard-wired, to align with or approach their neighbours. Here we show that aggregation can instead emerge from an indirect objective. We let reinforcement learning foragers, initially performing a random walk, optimize their dynamics from a purely individual reward for finding replenishable targets, while perceiving only their conspecifics and never the targets themselves. As the visual range grows, the agents undergo a sharp crossover from an environment-tuned individual search to a scale-agnostic collective one, and this crossover coincides with the onset of spatial aggregation. Thus a collective phase arises as a by-product of optimal foraging, without any direct reward for grouping. A minimal analytical first-passage model reproduces the transition as a crossover between the two search strategies. Our results identify indirect, resource-driven reward as a generic route to emergent collective phenomena.

INTRODUCTION

Collective motion is one of the most conspicuous forms of self-organization in nature, from bird flocks and fish schools to bacterial swarms and active colloids [1–3]. The dominant theoretical picture, from the Vicsek model onward, explains such order through a direct social interaction: each agent is driven to align its heading with, or move towards, its neighbours [1, 4]. When learning is introduced into these models, the same logic is inherited, and agents are typically rewarded explicitly for matching the velocity of their neighbours, so that flocking is built into the objective [5], or learning is used to steer and control the collective state directly [6]. In all of these approaches, the collective state is what the agents are nudged to produce.

Here we propose a different route: can collective order emerge when nothing in the objective refers to it? Animals rarely receive a reward for grouping as such, but rather for finding food, mates or shelter, and social structure arises as a by-product of pursuing those individual goals [4, 7]. Foraging is the paradigmatic example: a forager gains from locating resources, and the presence of successful conspecifics is at best an indirect cue to where those resources are [8]. Whether optimizing such an indirect objective is enough to generate collective phenomena, and of what kind, is the question we address.

Finding the optimal strategy in a given environment is already a hard problem, amounting to a search over an infinite family of possible step-length distributions; introducing a population of interacting agents makes it harder still, since the optimum for each agent now depends on the strategies adopted by all others, and analytical approaches break down. We therefore turn to a reinforcement learning (RL) formulation of foraging, in which strategies are optimized through interaction with the environment rather than by assuming direct access to the objective function. This approach has recently emerged as a versatile alternative to costly direct optimization [9–11], and has been applied across a broad range of problems, including collective settings [12, 13]. We build up from a single-agent framework, in which agents learn to adapt their dynamics from random walks to optimal search strategies [14], and extend it to a population of independent learners that share no information and interact only through vision. Each agent is rewarded solely for finding one of the replenishable targets present in the environment; crucially, it cannot see the targets, only whether nearby conspecifics have recently captured one or not.

Figure

FIG. 1. Model. An agent (blue) moves by continue and turn actions and perceives conspecifics within a vision cone of half-width π/8\pi/8 and range rvr_v. Targets (green, radius rr) are not visible to the agents. A tagged agent (red) has just collected a target and is visible as rewarded for a time τR\tau_R; grey agents are non-rewarded.

  • gorka.munoz-gil at uibk.ac.at

We find that, as the visual range increases, the agents spontaneously switch from an individual, environment-tuned search to a collective one, and that this switch is accompanied by a transition from a disordered to an aggregated spatial state. The collective phase is therefore not designed in, but discovered by the agents as the optimal response to an indirect reward. More broadly, our results position reinforcement learning as a promising tool for uncovering emergent physics in regimes where direct optimization and analytical theory cannot reach.