- Instituto de Física, Universidade Federal do Rio Grande do Sul, Porto Alegre, Brazil
We propose a mean-field (MF) approximation as a recurrence relation governing the dynamics of
1 Introduction
Pedestrian dynamics is one example of complex systems of self-driven agents in the realm of macro-scale physics, which give rise to a variety of emerging phenomena. Several theoretical and experimental studies have been conducted on crowd dynamics, focusing on topics ranging from city planning [1] and disaster prevention to the understanding of complex human behavior [2, 3].
Some places with crowd formation as subway corridors [4, 5], nightclub dynamics [6, 7], and scramble crossings [8] in large cities, are examples of these complex systems that exhibit collective behavior. Simply put, it features different groups of individuals aiming to reach various common destinations, for instance, the entrance/exit of a train station, reaching/leaving the bar to buy beverages, or crossing to get to another corner. Thus, the spatial and temporal context in question may involve a single group of agents moving towards a common goal, or multiple groups moving along confronting trajectories, which rapidly increases the complexity of the dynamics.
The problem of two groups of particles in counterflow has been extensively studied across various contexts, ranging from microscopic scales—such as the dynamics of charged colloids [9]—to macroscopic phenomena, such as pedestrian flows in corridors [10, 11], and even more complex situations like evacuation [12] scenarios. Notably, even in single-species models [13], intriguing phenomena such as condensate formation emerge, illustrating the richness of these systems.
An interesting approach to describe the hard-body dynamics of macroscopic systems is the lattice-gas modelling [14]. In our recent work, we used the dynamics of a lattice gas-type interaction to describe the motion of pedestrians inside nightclubs [6, 7] and in a four-way crossing walk [8], the so-called scramble crossing. In such works, we have shown that the intrinsic high correlation of this approach reflects the model’s sensitivity to jamming and condensate formation.
In that sense, Monte Carlo (MC) simulations are a natural method for studying such models, as they allow for the definition and implementation of transition rules to simulate different evolutions from specified initial conditions. These systems can also be interpreted in a broader context as multi-agent systems. Additionally, there are approaches that model these dynamics through differential equations based on Newton’s laws, within the so-called social force framework [12, 15, 16].
In that direction, the mean-field (MF) approach in particle dynamics has been extensively studied, particularly in the context of lattice gas models. These models were originally proposed to describe the behavior of specific types of fluids, such as solvents [17], electrochemical cells [18], and other systems that can be characterized by Hamiltonians derived from free energy potentials [19]. In 2015, we introduced a related model [20] based on a two-species particle framework to describe pedestrian counterflow. Unlike classical exclusion principles, our model employed density-dependent exclusion rules, where the probability of occupation varied with the local density of particles. The system’s evolution was governed by a set of coupled partial differential equations (PDEs). Other variations have been explored to model deterministic dynamics [21, 22], and further extensions of our framework have incorporated concepts from Fermi-Dirac statistics [23].
In this work, we propose a general framework for a MF approximation of the lattice gas dynamics of m-species of particles on a square lattice. We derive a generalized non-linear coupled PDE obtained by the MF approximation and compare it to MC simulations, by using a set of initial conditions for the cases
Our results show excellent agreement between the PDE predictions and MC simulations for low-density regimes. However, at higher densities, jamming effects reduce the accuracy of this agreement. We present a detailed numerical study to delineate the conditions under which our method remains valid compared to the computationally more expensive MC simulations.
In the next section, we describe the method for deriving the PDEs based on a model where particles exhibit preferential directed motion combined with random movements dependent on the occupation of neighboring sites. Through a mean-field approximation, we successfully derive a generalized PDE that describes scenarios involving an arbitrary number m of species.
Subsequently, in the third section, we present our results comparing the spatial distribution of particles on a bidimensional lattice for different model parameters and initial particle concentrations. We study three different cases —
2 Methods
Our model consists of a system of
where
It is important to note that, in our model, each particle perceives only the static floor field specific to its species, evaluated at its current position. Consequently, the inner product defined in Equation 1 quantifies the contribution of each possible transition probability to the particle’s movement toward its target.
As one might anticipate, Equation 1 is the general form of the four possible transition probabilities each of which have a different corresponding displacement vector that can assume the values
where the angle brackets

Figure 1. Cartesian lattice depiction of a likely transition to happen of a particle at position
It is important to note that these transition probabilities define the intended particle movement, conditional on the target cell being empty, as each cell can accommodate at most one particle. Thus, the probability represents what should occur, not what will necessarily occur.
2.1 Lattice gas dynamics
We focus our study on an approximate regime of a lattice gas model. The key feature, as previously noted, is the exclusion principle, which prevents particles from overlapping or occupying the same cell, regardless of the specific rules governing the transition probabilities. This characteristic makes it particularly challenging to derive an approximate recurrence relation or equation of motion, as the occupation states of neighboring lattice cells are highly correlated. Nevertheless, we develop a recurrence relation for the cell occupation that remains consistent with the asynchronous updating scheme characteristic of lattice gas dynamics with nearest-neighbor interactions. Accordingly, we propose the following recurrence relation for a given species q:
where
where
The first term on the right-hand side of Equation 3, the factor
With this framework, we explicitly separate the exclusion interaction, reflected in the terms
We can rewrite Equation 3 as follows
where
where
is the net flow rate of particles of species
is the frustrated net flow rate of particles of species
2.2 Mean-field regime
When applying Equation 1 into the lattice gas recurrence relation given by Equation 3, we end up with the specific recurrence relation
After some algebra (see Supplementary Material A) we obtain the following partial differential equation
where
In Equation 9, we notice that the constants
To study how good a fit is the mean-field approximation is to the particle dynamics, we investigate how the spatial distributions of both methods differ from each other for different sets of the model parameters such as the total number of particles
3 Discussion
As mean-field approaches approximate the microscopic behavior to an average behavior, their fidelity to the model tends to be limited to a certain range of parameters. This restriction is potentiated when considering cases of highly correlated systems of particles, such as the lattice gas dynamics we study in this work. In particular, we addressed how a system of an arbitrary number of species
Thus, to simplify things a little bit, we use a relatively simple rule to define social fields
By defining the static floor fields in Equation 10 as such, we took the first species to have its preferential direction of movement parallel to the x-axis, whilst all other species’ directions are defined in regularly divided angles according to the total number of particles
As initial conditions, we considered each species concentrated in separate regions of the lattice as initial “wave packages” to describe what would be a real physical confrontation scenario, such as found in pedestrian crossings [8, 21]. More specifically, we considered each species’ initial distribution as a bivariate uncorrelated normal distribution with mean values defined in a circular fashion analogous to the static floor fields previously defined with a light difference. To observe confrontation between species, we defined the initial distributions of each as

Figure 2. Schematic lattice (not to scale) illustrating a system with
For all species, we define the standard deviation of the initial distributions to be
Specifically, we have examined the cases of
In all cases, we studied a system of
We simulated the particle dynamics of our model via MC algorithm with a shuffled asynchronous update scheme. This means that at any given MC step, we form a list of
3.1 case
The simplest scenario we examined involves only a single species. As we defined previously by Equation 10, a single species tends to move according to the static floor field
In Figure 3, we present plots of the marginal distribution of particles along

Figure 3. Evolution of normalized marginal distributions of
As a general remark, we notice a qualitatively good agreement between the two methods and that the distributions in more densely populated systems shows more positive skewness of the probability density function (PDF) in comparison to systems with fewer particles, revealing the exclusion effects. These exclusion effects are a result of agents leading the pack acting as obstacles for the particles in the bulk. As time passes, we notice that the distributions present increasing dispersion with the “front tail” maintaining synchronicity for different values of
Another key parameter we investigated is the bias movement level,
In the lower panels of Figure 3 (plots e to h), we present the marginal distributions at time steps (e)
Given the phenomena observed in Figure 3, we notice that systems with a greater total number of particles

Figure 4. (a) Influence of
Figure 4a illustrates the influence of
To better measure the agreement between the two methods and the range of parameters where the mean-field shows numerical stability, we compared both methods using the time average of the squared difference of the spatial entropies of each method, i.e.,
where
In Figure 4b, we show
Figure 4c completes the analysis for
3.2 case
The case
In Figure 5, we show the marginal distributions of

Figure 5. Evolution of normalized marginal distributions of
While both methods show reasonably good agreement in Figure 5, we find that the agreement can be further improved by optimizing
3.3 case
The last case we discuss in this work is the case with four species moving along the
With this in mind, Figure 6 displays the particle distribution

Figure 6. Evolution of normalized marginal distributions of
(1) First, the discrepancy between methods becomes more pronounced for larger
(2) Second, the mean-field solution exhibits anomalous behavior at
Building on our analysis of the
It is important to note that, despite some differences in the evolution of particle profiles, a qualitatively similar behavior is observed in both cases when the systems are initialized with a normal distribution of particles in the environment. The interactions among particles—especially the interaction with counterflowing particles—tend to deform the initial distribution shape. Over time, however, after several rounds of confrontation and interaction, the particles begin to reorganize themselves, ultimately restoring a Gaussian-like behavior.
This transition from one Gaussian state to another is illustrated in Figure 7. In Figures 7a–e, we show the results from MC simulations, while Figure 7f corresponds to the mean field approximation. All plots refer to the case of

Figure 7. Plots (a–e) show the particle distribution at different times obtained via Monte Carlo simulations. At
In Figure 7a, we observe the particle distribution at
At
Finally, in Figure 7f, we analyze the mean-field approximation. Unlike the MC simulations, which display the full evolution of the particle profile, we summarize the results using the coefficient of determination
4 Conclusion
In this work, we proposed a mean-field approximation to describe the dynamics of an agent-based model of
We showed that the MF method shows a good agreement with the particle dynamics implemented through MC simulation using initial conditions and static floor fields carrying polar symmetry in relation to the center of the lattice. We studied the cases of one, two, and four species, which, with the initial conditions, made for a sort of “controlled” environment so that we could access more easily the agreement between methods.
The MF approach carried a normalization constant exponent
We highlighted that our proposed mean-field approach is not bulletproof by showing what specific set of parameters made it show numerical instability due to competing terms inside the recurrence relation.
Despite studying only three cases, our approach is general enough to allow an arbitrary number of particles, even for initial conditions and/or species preferential directions of motion different from those studied in this work. Not only that, our framework proposed by Equation 3 presents a general feature of application to asynchronous lattice gas models, even reproducing the recurrence relation of other models such as the deterministic two-species dynamics studied in [21].
We are currently exploring higher systems with more than four species, which means that some species are going to present static floor field at angles lower than
Finally, our model reveals a distinctive pattern we term the “Gaussian-to-Gaussian” transition. In this phenomenon, particles initially distributed in a Gaussian configuration undergo significant deformation of this pattern, only to eventually recover a Gaussian distribution after multiple interaction cycles. Both Monte Carlo simulations and mean-field theory reproduce this effect, though they follow different temporal evolution pathways.
Data availability statement
The original contributions presented in the study are included in the article/Supplementary Material, further inquiries can be directed to the corresponding author.
Author contributions
ES: Data curation, Writing – original draft, Supervision, Methodology, Investigation, Conceptualization, Software, Funding acquisition, Visualization, Writing – review and editing, Resources, Project administration, Validation, Formal Analysis. RD: Methodology, Formal Analysis, Conceptualization, Project administration, Validation, Visualization, Supervision, Writing – original draft, Funding acquisition, Software, Investigation, Resources, Data curation, Writing – review and editing. SG: Project administration, Formal Analysis, Data curation, Validation, Writing – review and editing, Writing – original draft, Resources, Conceptualization, Supervision, Visualization, Funding acquisition, Software, Investigation, Methodology.
Funding
The author(s) declare that financial support was received for the research and/or publication of this article. We gratefully acknowledge the partial support provided by CNPq: E. V. ES under grant 153315/2024-5, RS under grant 304575/2022-4, and SG under grant 314738/2021-5.
Acknowledgments
We appreciate the availability of computational resources from the Lovelace cluster at IF-UFRGS.
Conflict of interest
The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Generative AI statement
The author(s) declare that no Generative AI was used in the creation of this manuscript.
Publisher’s note
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
Supplementary material
The Supplementary Material for this article can be found online at: https://www.frontiersin.org/articles/10.3389/fphy.2025.1648895/full#supplementary-material
References
1. Guo X, Angulo A, Tavakoli A, Robartes E, Chen TD, Heydarian A. Rethinking infrastructure design: evaluating pedestrians and vrus’ psychophysiological and behavioral responses to different roadway designs. Scientific Rep (2023) 13:4278. doi:10.1038/s41598-023-31041-9
2. Geoerg P, Schumann J, Boltes M, Kinateder M. How people with disabilities influence crowd dynamics of pedestrian movement through bottlenecks. Scientific Rep (2022) 12:14273. doi:10.1038/s41598-022-18142-7
3. Nicholls VI, Wiener J, Meso AI, Miellet S. The impact of perceptual complexity on road crossing decisions in younger and older adults. Scientific Rep (2024) 14:479. doi:10.1038/s41598-023-49456-9
4. Zhang H, Xu J, Jia L, Shi Y. Modelling the walking behavior of pedestrians in the junction with chamfer zone of subway station. Physica A: Stat Mech its Appl (2022) 602:127656. doi:10.1016/j.physa.2022.127656
5. Huang D, Yang Y, Peng X, Huang J, Mo P, Liu Z, et al. Modelling the pedestrian’s willingness to walk on the subway platform: a novel approach to analyze in-vehicle crowd congestion. Transportation Res E: Logistics Transportation Rev (2024) 181:103359. doi:10.1016/j.tre.2023.103359
6. Stock EV, da Silva R. Lattice gas model to describe a nightclub dynamics. Chaos, Solitons and Fractals (2023) 168:113117. doi:10.1016/j.chaos.2023.113117
7. Stock EV, da Silva R, Gonçalves S. Nightclub bar dynamics: statistics of serving times. The Eur Phys J B (2024) 97:179. doi:10.1140/epjb/s10051-024-00803-3
8. Stock EV, da Silva R. Exploring crossing times and congestion patterns at scramble intersections in pedestrian dynamics models: a statistical analysis. Physica A: Stat Mech its Appl (2024) 649:129942. doi:10.1016/j.physa.2024.129942
9. Vissers T, van Blaaderen A, Imhof A. Band formation in mixtures of oppositely charged colloids driven by an ac electric field. Phys Rev Lett (2011) 106:228303. doi:10.1103/PhysRevLett.106.228303
10. Stock EV, da Silva R, Fernandes HA. Statistics, distillation, and ordering emergence in a two-dimensional stochastic model of particles in counterflowing streams. Phys Rev E (2017) 96:012155. doi:10.1103/PhysRevE.96.012155
11. Zhang J, Seyfried A. Comparison of intersecting pedestrian flows based on experiments. Physica A: Stat Mech its Appl (2014) 405:316–25. doi:10.1016/j.physa.2014.03.004
12. Helbing D, Farkas I, Vicsek T. Simulating dynamical features of escape panic. Nature (2000) 407:487–90. doi:10.1038/35035023
13. Majumdar SN, Evans MR, Zia RKP. Nature of the condensate in mass transport models. Phys Rev Lett (2005) 94:180601. doi:10.1103/physrevlett.94.180601
14. Katz S, Lebowitz JL, Spohn H. Phase transitions in stationary nonequilibrium states of model lattice systems. Phys Rev B (1983) 28:1655–8. doi:10.1103/PhysRevB.28.1655
15. Helbing D, Molnár P. Social force model for pedestrian dynamics. Phys Rev E (1995) 51:4282–6. doi:10.1103/PhysRevE.51.4282
16. Oliveira CLN, Vieira AP, Helbing D, Andrade JS, Herrmann HJ. Keep-left behavior induced by asymmetrically profiled walls. Phys Rev X (2016) 6:011003. doi:10.1103/PhysRevX.6.011003
17. Kleintjens L, Van der Haegen R, van Opstal L, Koningsveld R. Mean-field lattice-gas modelling of supercritical phase behavior. The J Supercrit Fluids (1988) 1:23–30. doi:10.1016/0896-8446(88)90006-X
18. Bernard MO, Plapp M, Jfmc G. Mean-field kinetic lattice gas model of electrochemical cells. Phys Rev E (2003) 68:011604. doi:10.1103/PhysRevE.68.011604
19. Dickman R. Mean-field theory of the driven diffusive lattice gas. Phys Rev A (1988) 38:2588–93. doi:10.1103/physreva.38.2588
20. da Silva R, Hentz A, Alves A. Stochastic model of self-driven two-species objects inspired by particular aspects of a pedestrian dynamics. Physica A: Stat Mech its Appl (2015) 437:139–48. doi:10.1016/j.physa.2015.05.104
21. Cividini J, Hilhorst HJ, Appert-Rolland C. Crossing pedestrian traffic flows, the diagonal stripe pattern, and the chevron effect. J Phys A: Math Theor (2013) 46:345002. doi:10.1088/1751-8113/46/34/345002
22. Appert-Rolland C, Cividini J, Hilhorst H, Degond P. Pedestrian flows: from individuals to crowds. Transportation Res Proced (2014) 2:468–76. doi:10.1016/j.trpro.2014.09.062
23. Stock EV, da Silva R. Coexistence and crossover phenomena in a fermi-like model of particles in counterflowing streams. Phys Rev E (2020) 102:022139. doi:10.1103/PhysRevE.102.022139
24. Schadschneider A, Chraibi M, Seyfried A, Tordeux A, Zhang J. Pedestrian dynamics: from empirical results to modeling. Cham: Springer International Publishing (2018). p. 63–102. doi:10.1007/978-3-030-05129-7_4
25. Press WH, Sa T, Vetterling WT, Flannery BP. Numerical recipes in fortran 77: the art of scientific computing. vol. 1 (1996).
26. Giddings JC, Byring H. A molecular dynamic theory of chromatography. The J Phys Chem (1955) 59:416–21. doi:10.1021/j150527a009
27. da Silva R, Lamb LC, Lima EC, Dupont J. A simple combinatorial method to describe particle retention time in random media with applications in chromatography. Physica A: Stat Mech its Appl (2012) 391:1–7. doi:10.1016/j.physa.2011.08.006
28. Stock EV, da Silva R, da Cunha CR. Numerical study of condensation in a fermi-like model of counterflowing particles via gini coefficient. J Stat Mech Theor Exp (2019) 2019:083208. doi:10.1088/1742-5468/ab333d
Keywords: pedestrian dynamics, mean-field, transport equation, lattice gas, stochastic process, multi-species
Citation: Stock EV, Da Silva R and Gonçalves S (2025) Mean-field and Monte Carlo analysis of multi-species agent dynamics. Front. Phys. 13:1648895. doi: 10.3389/fphy.2025.1648895
Received: 17 June 2025; Accepted: 29 July 2025;
Published: 26 August 2025.
Edited by:
Ryosuke Yano, Tokio Marine dR Co., Ltd., JapanReviewed by:
Giovanni Modanese, Free University of Bozen-Bolzano, ItalyJan Haskovec, BESE Division, Saudi Arabia., Saudi Arabia
Copyright © 2025 Stock, Da Silva and Gonçalves. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
*Correspondence: Roberto da Silva, cmRhc2lsdmFAaWYudWZyZ3MuYnI=