arXiv:2610.12321cs.MAOct 2026

Manuscript Offprint

arXiv:2610.12321

Spatial Pattern Formation from Multi-Agent Learning in Public Goods Dilemmas

Yefei Zhang, Yuxuan Zhao

Abstract

Spatial public goods models show that prescribed movement toward richer locations can generate spatial patterns. We ask how such patterns emerge when agents learn where to move and how learning rates shape their consequences for collective welfare. Fixed populations of cooperators and defectors independently learn movement policies using tabular Q-learning and local observations. Cooperator learning generates clusters around resource peaks, while co-adaptation changes their strength and motion. At a fixed training budget, the largest welfare losses occur when cooperators learn at high rates and defectors at low rates. In part of this regime, learned policies also generate traveling bands supported by a shared directional preference. The conditions supporting travel change with further training, so these patterns reflect training history rather than an established asymptotic outcome. Across the tested learning-rate conditions with cooperator learning, mean collective welfare falls below random movement because increased crowding outweighs gains in resource benefit. Charging agents for the crowding they impose on others during learning recovers much of the welfare loss in the tested conditions. These results connect learning rates to the emergence and welfare costs of spatial organization driven by individual rewards.

1 Introduction

Spatial public goods models couple the movement of producers and consumers to a shared resource. Cooperators produce the good, both types consume it, and individuals can move between locations with different resource availability. Prescribed movement rules based on local payoffs or environmental conditions can generate various spatial patterns [39, 11, 46, 45, 49]. Such models explain how a specified movement rule organizes a population. Here we ask what happens if movement rules are learned through interaction with a public good field that agents themselves produce and consume. Which parts of the learned policy generate aggregation and collective behavior? How do these policies depend on the partners encountered during training, and what are the consequences for collective welfare?

Learning adds another layer to this feedback. Agents learn where to move from the payoffs they receive, while their movements relocate resource production and consumption and change local crowding. These environmental changes, in turn, shape what other agents learn. If both populations adapt, the resulting spatial organization depends not only on the policies being executed but also on the partners with which those policies were learned.

We study this feedback on a ring of patches. Each agent has a fixed cooperator or defector type and independently learns whether to stay, move left, or move right using tabular Q-learning (Figure 1). It observes only its own patch and its two neighbors and receives its own payoff. There is no prescribed gradient response or preferred direction. Holding types and population sizes fixed isolates learned

Figure

Figure 1: The model and the learning loop of one agent. (a) Agent jj on patch ii of the ring observes its own and the two adjacent patches. (b) It bins the observation into one of 729 states, reads its private table QjQ_j, and chooses ak∈{S,L,R}a_k \in \{S, L, R\}. (c) The environment evolves over the decision interval while the agent accumulates payoff. (d) At its next decision it observes sk+1s_{k+1} and updates QjQ_j.

mobility from changes in the population composition. Private Q-tables also allow us to test the mechanisms through policy interventions. We distill policies into compact movement rules, remove resource-seeking preferences from these rules or directional preferences from the original policies, and recombine policies learned with different training partners.

Previous work on chemotaxis learning and spatial games with learned migration has shown that agents can learn resource-seeking movement and that learned movement can generate spatial clustering (Section 2). We build on these findings by examining the mechanisms, training dependence, and welfare consequences of learned spatial organization. First, learning by cooperators is sufficient to generate persistent spatial clusters, and policy interventions show that a preference for richer neighboring patches is necessary for aggregation in the tested distilled rules (Sections 4.1 and 4.2). Second, co-adaptation changes the learned movement policies: the same defector policies can weaken or intensify clustering depending on the cooperators' training history (Section 4.2). When cooperators learn faster than defectors, frozen policies can produce traveling bands supported by a spontaneously learned preference for a common direction. The learning-rate conditions under which these bands appear and whether travel persists with further training depend on the training budget (Sections 4.3 and 4.4). Third, the resulting spatial organization lowers welfare primarily by increasing crowding. Total production is independent of location, and total resource uptake remains nearly unchanged across the evaluated conditions, so aggregation increases crowding costs without a comparable gain in aggregate resource benefit. Charging agents for the crowding they impose on others during learning recovers much of the welfare loss (Section 4.5).

References (49)