Emergence of agriculture in an artificial society of reinforcement learning agents

Gautier Hamon, Martí Sánchez-Fibla, Clément Moulin-Frier, Ricard SoléarXiv 2026

TL;DR

Multi-agent reinforcement learning agents spontaneously evolve complex agricultural practices—such as watering, sowing, and weeding—when wild foraging becomes inefficient and agents possess a sufficiently long planning horizon. Crucially, while large populations are highly vulnerable to "cheaters" who exploit crops without maintaining them, social learning (policy inheritance) acts as a critical firewall that stabilizes agriculture, triggering an irreversible evolutionary shift toward sedentary societies.

What Problem Does This Paper Address?

The transition from foraging to agriculture is one of the most profound milestones in evolutionary history, occurring independently across humans, insects, and microbes. It represents a classic example of "ecosystem engineering," where a species actively reshapes its environment to secure a reliable food supply.

However, understanding the exact cognitive, social, and ecological tipping points that drive this transition is incredibly difficult using historical or archaeological data alone. The authors of this paper tackle this challenge by asking: Can agriculture emerge spontaneously in a society of learning agents without explicit instruction? Furthermore, how do these societies overcome the "tragedy of the commons" (exploitative cheaters), and why is the transition historically so difficult to reverse once established?

Methods

The authors developed a Multi-Agent Reinforcement Learning (MARL) framework embedded in a custom 2D spatial grid environment (30×30 cells) with complex ecological dynamics.

Figure 1: Modelling agent-environment interactions. (a) Each agent agk (k = 1, 2, ..., N) starts with a random be- havior interacting within a spatial landscape with three different kinds of plants (Pi) and water (W). One of them (P1) is the most reward plant (e.g. because it provides more nutrients to the agent), but is not common and is ecologically overcompeted (b-c) by another plant (P2), which provides no reward. They produce seeds (seed1, seed2) that need to germinate (g) and can benefit from external resources, such as water (W). Another plant (P3) grows spontaneously, making it an easy resource to forage but providing low reward. Agents can navigate the map, observe their local neighbourhood and act in multiple ways on different plants, their seeds and water (picking and dropping those items over the map, as well as harvesting or consuming plants, (d)). When consuming a plant of a given species, an agent receives a scalar reward (R) associated with that species. The agent’s objective is to discover a policy—a strategy for choosing actions based on observed states—that maximizes its individual cumulative reward over time, using Re- inforcement Leaning (RL). The cumulative reward (G, closed box) depends on the sequences of both environmental states and actions, and is weighted by the parameter γ (the discount factor) which reflects the agent’s temporal horizon or foresight. This Multi-Agent Reinforcement Learning (MARL) system and its environmental context are summarised in (d), where agents navigate and act on the environment grid. The internal cognitive architecture of each agent is sketched on the top-right diagram (Transformer-based action policy).

The Environment

The world features three types of plants and a localized water source:

  • $P_1$ (Domesticable Crop): Highly rewarding but uncommon and easily outcompeted by weeds. Its nutritional value increases if it receives water.
  • $P_2$ (Weed): Provides no reward and aggressively outcompetes $P_1$ for space.
  • $P_3$ (Wild Foraging Plant): Spawns randomly and provides a low, reliable baseline reward without requiring any maintenance.

The Agents

Agents operate with a multi-discrete action space: moving, harvesting, picking up/dropping items (seeds or water), and a "protect" action (which removes weeds in a 3×3 neighborhood).

To give agents the capacity for long-term planning, their internal cognitive architecture utilizes a Transformer-based action policy that integrates the history of observations, actions, and rewards over long episodes (1024 steps, representing 40 full seasonal cycles). Training is decentralized, with each agent independently optimizing its policy using Proximal Policy Optimization (PPO).

Social Learning & Mathematical Modeling

To simulate cultural transmission, the authors introduced a Malthusian reproduction mechanism: agents that accumulate rewards above a certain threshold clone their behavioral policy to a new offspring agent, while underperforming agents die. Finally, they validated their simulation results using a deterministic mean-field mathematical model analyzed via bifurcation theory.

Datasets

Not discussed in the paper. The study relies entirely on a custom-built, procedurally generated simulation environment rather than external datasets.

Key Insights and Ideas

  • The Foraging Trap: Agriculture only emerges when wild resources ($P_3$) are scarce. If foraging is too easy, it acts as a strong local optimum, trapping agents in a hunter-gatherer state because the immediate payoff outweighs the risky investment of cultivation.
  • The Cognitive Threshold: Spontaneous agriculture requires a very high discount factor ($\gamma = 0.999$). If agents lack a long-term temporal horizon, they cannot justify the immediate, non-rewarding costs of weeding and watering to secure future yields.
  • The Cheater Collapse: In individual-learning populations larger than ~5 agents, agriculture completely collapses. "Cheaters" emerge who eat the high-reward $P_1$ crops without investing in the costly upkeep (watering/weeding), destroying the cooperative ecosystem engineering loop.
  • Social Learning as a Firewall: Policy cloning allows successful agricultural strategies to propagate across generations faster than cheaters can disrupt them. This cultural transmission stabilizes cooperation and unlocks sustained population growth.
  • Hysteresis (The Lock-In Effect): Once agriculture takes root, it alters the environment so drastically that even if wild foraging resources return to abundance, the society remains agricultural. It is a mathematically demonstrable evolutionary one-way street.

Key Results

  • Emergent Division of Labor: Trained agents spontaneously developed a clear seasonal strategy: preferentially weeding ($P_2$ removal) during the summer and dispersing water and seeds during the winter.
  • Overcoming Population Caps: Without social learning, agriculture fails when the population size exceeds $N \approx 5$. With social learning enabled, populations successfully scaled up to the simulation cap ($N_{max} = 32$).
  • Nonlinear Resource Amplification: The introduction of social learning led to a highly non-linear, exponential amplification of the domesticated plant ($P_1$) population, mirroring the explosive resource growth seen during the historical Neolithic transition.

Limitations and Future Work

  • No Resource Storage: The model lacks food storage mechanisms (like granaries), which historically played a massive role in buffering seasonal shortfalls and stabilizing early agricultural societies.
  • Lack of Genetic Evolution: Plants do not possess genetic variability, meaning the model misses out on co-evolutionary feedbacks like artificial selection for higher crop yields or reduced seed dispersal.
  • Simplified Social Learning: Cultural transmission is modeled purely as policy cloning (inheritance), ignoring richer social processes such as active teaching, imitation, or the horizontal recombination of distinct innovations between unrelated agents.

Summary updated

BibTeX
@misc{hamon2026emergence,
  author = {Gautier Hamon and Martí Sánchez-Fibla and Clément Moulin-Frier and Ricard Solé},
  title = {{Emergence of agriculture in an artificial society of reinforcement learning agents}},
  year = {2026},
  eprint = {2605.22256},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.22256},
}
Figure