Papers
Topics
Authors
Recent
Search
2000 character limit reached

Tuning Agent-Based Predator-Prey Models Toward Lotka-Volterra Dynamics

Published 11 Jun 2026 in cs.MA | (2606.13639v1)

Abstract: Recent growth in compute power has made it increasingly feasible to use large-scale agent-based models to simulate complex adaptive systems. A central difficulty is that such models contain many local rules and parameters, where small changes can lead to runaway behaviour, population collapse, or saturation at artificial bounds. We study this problem in a continuous predator-prey system where sheep and wolves are active agents with local sensing, internal energy, and recurrent neural network-based controllers. We ask whether environmental and demographic parameters can be tuned so that the resulting population dynamics resemble classical Lotka-Volterra cycles. We optimise these parameters with a feature-based loss that rewards sustained oscillations, phase lag, bounded populations, and long-term persistence, first for random controllers and then for evolved controllers in a more naturalistic setting. The model is implemented in ABMax, a JAX-based agent-based modelling framework that enables efficient batched simulation on hardware accelerators.

Summary

  • The paper demonstrates that CMA-ES can tune 12 ecological parameters to produce sustained, bounded predator-prey oscillations in a spatial ABM with neural controllers.
  • Its composite objective combines lagged population correlations with extinction, ceiling, amplitude, turning, crossing, and drift penalties to discourage degenerate dynamics.
  • Evolved controllers generate noisier but better-bounded cycles and spatial predator aggregation, separating behavior-driven structure from population stabilization through ecological parameter tuning.

Overview

This paper addresses a persistent difficulty in agent-based modeling (ABM): local interaction rules and parameters that are individually plausible can produce aggregate dynamics that collapse, saturate at artificial capacity bounds, or otherwise fail to exhibit coherent macroscopic structure. The authors study this problem in a continuous-space predator-prey system in which sheep (prey) and wolves (predators) are self-propelled agents with occlusion-aware ray sensing, internal energy budgets, and continuous-time recurrent neural network (CTRNN) controllers. The central question is whether ABM-level ecological parameters—governing energy intake, predation, metabolism, birth, and death—can be tuned so that population trajectories resemble classical Lotka-Volterra (LV) cycles. The work is implemented in ABMax, a JAX-based ABM framework enabling batched simulation of many model instances on hardware accelerators (Chaturvedi et al., 22 Aug 2025).

The methodological stance is explicitly top-down: rather than deriving a coarse-grained LV model from microscopic rules, the desired macroscopic regime is used as an explicit optimisation target for searching the microscopic parameter space. LV dynamics serve not as a replacement for the ABM but as a constraint identifying parameter regimes in which the ABM remains dynamically well behaved.

Model architecture

Agents move in a two-dimensional Cartesian arena with unicycle-style kinematics; translational and angular velocity commands are tanh\tanh-bounded readouts of the controller, scaled by constants and perturbed by Gaussian noise. Population turnover uses threshold-based birth and death inspired by the canonical NetLogo Wolf Sheep Predation model (Wilensky, 1997): an agent dies when its internal energy stays below a death threshold ede_d for an uninterrupted duration tdt_d, and reproduces when energy remains above ebe_b for duration tbt_b, provided an inactive slot of the same species exists. Offspring inherit controller parameters and half the parent's energy, which introduces a natural refractory delay before subsequent births.

Energy dynamics follow the standard ecological loop: sheep gain energy from a circular grass patch, wolves gain energy by consuming the nearest sheep within capture distance (with a fraction k(P)k^{(P)} of prey energy transferred per capturing wolf), and both species pay constant metabolic costs. Energy is clipped between emine_{\min} and emaxe_{\max}. Fixed-size buffers per species preserve static array shapes under JAX compilation, with the rank-match update algorithm allowing different parallel instances to maintain different active population counts.

Sensing is via r=13r=13 equiangular rays with occlusion-aware closest-intersection tests, returning distance and species-type channels, concatenated with proprioceptive inputs (energy, pre-metabolic gain, overlap flag, position norm, velocity, angular velocity, heading). Controllers are modern Wilson-Cowan style CTRNNs with hidden dimension 60, learnable time-scale parameters, and two readouts mapping to speed and turn commands.

Feature-based Lotka-Volterra objective

A key contribution is the hand-engineered loss used to score population trajectories. Its core is a correlation-based term L(corr)\mathcal{L}^{(\text{corr})} rewarding lagged alignment between smoothed, normalised sheep and wolf populations: prey levels lead predator levels shifted by delay ede_d0 steps, slopes are similarly aligned, and two additional terms encode local LV pressure—above-average sheep abundance should coincide with wolf growth, above-average wolf abundance with sheep decline. Because correlation terms alone admit degenerate solutions, the loss adds six auxiliary components:

  • Extinction loss: penalises populations falling below a lower threshold.
  • Ceiling loss: penalises saturation at artificial capacity.
  • Amplitude loss: requires sufficiently large oscillations in both halves of the rollout.
  • Turning loss: requires both upward and downward movement in each half, rejecting monotonic drift.
  • Crossing loss: penalises fewer than three mean-crossings.
  • Drift loss: penalises long-term changes in mean level between rollout start and end.

With controllers fixed, covariance matrix adaptation evolution strategy (CMA-ES), implemented via Evosax [lange2023evosax], minimises this weighted sum over a twelve-dimensional ABM parameter vector comprising grass intake rate, predation transfer rate, metabolic costs, and birth/death thresholds and durations for each species. Candidates are sigmoid-transformed into viable ranges, evaluated on rollouts of ede_d1 steps, over 150 generations with population size 16.

Controller optimisation precedes ABM tuning and uses a same-rollout evaluation scheme: all wolves in a rollout carry distinct CMA-ES samples and are scored by net energy change against randomly initialised sheep opponents (and vice versa), averaged across 12 scenarios to reduce overfitting to a single adversarial strategy, for 4000 generations per species.

Results

Two findings stand out. First, the feature-based objective successfully drives ABM parameters toward LV-like regimes in both fixed-controller settings: random controllers (ede_d2) and evolved controllers. Under random ABM parameters, trajectories lack sustained coupled oscillations; after optimisation, oscillatory predator-prey structure emerges and populations persist for the full rollout. Notably, loss decreases faster and converges lower for evolved controllers than for random ones—an asymmetry indicating that learned sensorimotor behaviour makes the macroscopic target more reachable through ecological parameter tuning alone.

Second, the two settings yield qualitatively different oscillations. The random-agent setting produces smoother, more regular cycles that nonetheless approach the artificial population ceiling, whereas evolved agents produce noisier, less idealised oscillations that remain better bounded and avoid extreme saturation events. The authors interpret this as evidence that classical LV dynamics are themselves highly idealised—omitting finite resources, spatial structure, behavioural heterogeneity, and individual stochasticity—and that learned controllers ground the dynamics in behaviourally plausible mechanisms at some cost in trajectory regularity.

Spatially, evolved controllers induce clear organisation independent of the LV loss: wolves aggregate in and around the grass patch where sheep density is higher, while sheep disperse more broadly. This behaviour predates ABM-parameter optimisation; the tuning stage's role is to make such behavioural ecology viable over long horizons by balancing intake, predation, reproduction, and death. This cleanly separates behavioural structure (produced by controller evolution) from population-level stabilisation (produced by ABM tuning).

A practical caveat on the experimental design: for the random-controller setting, the grass patch was enlarged to span the entire arena so that randomly moving sheep receive a constant energy supply. The comparison between settings therefore differs in environmental configuration as well as controller provenance, which somewhat qualifies the directness of the contrast.

Limitations and open questions

The paper is candid about several constraints. The loss function is indirect and hand designed, with numerous weighting constants (ede_d3 values spanning 50 to 1200) whose sensitivity is not systematically analysed. The authors note that direct mean-squared-error matching to a single LV trajectory would be equally difficult to justify, since exact trajectory matching is unrealistic—but no alternative objective formulations are compared. The environment remains simplified: the grass patch is a fixed, non-depleting energy source rather than a regenerating resource, and agent physiology does not couple energy to mass, speed, or metabolic cost. Controllers are frozen during ABM tuning, so co-adaptation of behaviour and ecology is not explored. Whether the tuned parameter regimes are robust across longer horizons, larger arenas, or perturbed initial conditions is not established, nor is the identifiability question addressed—the authors correctly observe that a macroscopic trajectory does not determine a unique microscopic model, leaving open how many distinct ABM parameterisations satisfy the same LV-like constraints.

Conclusion

This paper demonstrates that a desired macroscopic ecological regime can function as a top-down optimisation constraint over ABM-level parameters, yielding sustained, bounded, LV-like predator-prey oscillations in a spatially explicit multi-agent system with neural controllers. The separation it draws between controller-induced behavioural structure and parameter-tuning-induced population stabilisation is a useful conceptual contribution, and the implementation showcases batched, variable-population ABM evaluation on accelerators. The approach's dependence on a carefully engineered composite loss, and the open question of how such objectives generalise beyond two-species systems or to adaptive controllers, remain the principal limitations.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Tweets

Sign up for free to view the 1 tweet with 0 likes about this paper.