Thibault Bonnemain
email: thibault.bonnemain@northumbria.ac.uk

Matteo Butano

Théophile Bonnet

Iñaki Echeverría-Huarte

Antoine Seguin

Alexandre Nicolas

Cécile Appert-Rolland

Denis Ullmo

Pedestrians in static crowds are not grains, but game players

The local navigation of pedestrians amid a crowd is generally believed to involve no anticipation beyond (at best) the avoidance of the most imminent collisions. We show that current models rooted in this belief fail to reproduce some key features experimentally evidenced when a dense static crowd is crossed by an intruder. We identify the missing ingredient as the pedestrians' ability to plan their motion well beyond the next interaction, whence they may accept to move towards denser regions for a short time. To account for this effect, we introduce a minimal model based on mean-field game theory, which proves remarkably successful in replicating the aforementioned observations as well as other daily-life situations involving collective 1 behaviour in dense crowds, such as partial metro boarding. This demonstrates the ability of game approaches to capture the anticipatory effects at play in operational crowd dynamics.

I. INTRODUCTION

Although crowd disasters (such as the huge stampedes that grieved the Hajj in 1990, 2006 and 2015 [START_REF] Helbing | Dynamics of crowd disasters : An empirical study[END_REF]) are more eye-catching to the public, the dynamics of pedestrian crowds are also of great relevance in less dire circumstances. They are central when it comes to designing and dimensioning busy public facilities, from large transport hubs to entertainment venues, and optimising the flows of people.

Modelling pedestrian motion in these settings is a multi-scale endeavour, which requires determining where people are heading for (strategic level), what route they will take (tactical level), and finally how they will move along that route in response to interactions with other people (operational level) [START_REF] Hoogendoorn | Pedestrian route-choice and activity scheduling theory and models[END_REF]. The strategic and tactical levels typically involve some planning in order to make a choice among a discrete or continuous set of options, such as targeted activities, destinations [START_REF] Hoogendoorn | Pedestrian route-choice and activity scheduling theory and models[END_REF], paths (possibly knowing their expected level of congestion) [START_REF] Jiang | Comparison study of the reactive and predictive dynamic models for pedestrian flow[END_REF], or, in the context of evacuations, egress alternatives [START_REF] Jiang | Comparison study of the reactive and predictive dynamic models for pedestrian flow[END_REF][START_REF] Mesmer | Incorporation of decision, game, and bayesian game theory in an emergency evacuation exit decision model[END_REF]. These choices are often handled as processes of maximisation (minimisation) of a utility (cost), which may depend on lower-level information such as pedestrian density or streaming velocity [START_REF] Best | Densesense : Interactive crowd simulation using density-dependent filters[END_REF][START_REF] Van Goethem | On streams and incentives -a synthesis of individual and collective crowd motion[END_REF].

The operational level deals with much shorter time scales and is generally believed to involve no planning ahead. Anticipatory effects are thus merely neglected in socalled reactive models, especially at high densities, possibly with the lingering idea that mechanical forces then prevail. For example, the popular social force model of Helbing and Molnar [START_REF] Helbing | Social force model for pedestrian dynamics[END_REF], still at the heart of several commercial software products, combines contact forces and pseudo-forces ("social" forces) which, in the original implementation, are only functions of the agents' current positions (and possibly orientations). Some degree of anticipation has since been introduced into these models to better describe collision avoidance, e.g., by making the pseudo-forces depend on future positions rather than current ones [START_REF] Zanlungo | Social force model with explicit collision prediction[END_REF][START_REF] Karamouzas | Universal power law governing pedestrian interactions[END_REF]. In a dual approach, the most imminent collisions can be avoided by scanning the whole velocity space [START_REF] Van Den Berg | Reciprocal velocity obstacles for realtime multi-agent navigation[END_REF][START_REF] Paris | Pedestrian reactive navigation for crowd simulation : a predictive approach[END_REF][START_REF] Karamouzas | Implicit crowds : Optimization integrator for robust crowd simulation[END_REF] or a subset of it [START_REF] Moussaïd | How simple rules determine pedestrian behavior and crowd disasters[END_REF] in search of the optimal velocity. In order to handle navigation through dense crowds, anticipated collisions beyond the most imminent one [START_REF] Bruneau | EACS : Effective Avoidance Combination Strategy[END_REF] or, at a more coarse-grained scale, local density inhomogeneities [START_REF] Best | Densesense : Interactive crowd simulation using density-dependent filters[END_REF] can be taken into account in the optimisation. All these dynamic models, at best premised on a constant-velocity hypothesis, owe their high computational tractability to their relative shortsightedness : The simulated agents do not plan ahead in interaction with their counterparts.

In this paper, we argue that, even at the operational level, crowds in some dailylife circumstances display signs of anticipation that may elude the foregoing shortsighted models ; this will be exemplified by the recently studied response of a dense static crowd when crossed by an 'intruder' [START_REF] Nicolas | Mechanical response of dense pedestrian crowds to the crossing of intruders[END_REF][START_REF] Kleinmeier | Agent-based simulation of collective cooperation : from experiment to model[END_REF]. We purport to show that a minimal game theoretical approach, made tractable thanks to an elegant analogy between its mean-field formulation [START_REF] Lasry | Jeux à champ moyen. I -le cas stationnaire[END_REF][START_REF] Lasry | Jeux à champ moyen. II -horizon fini et contrôle optimal[END_REF][START_REF] Huang | Large population stochastic dynamic games : closed-loop McKean-vlasov systems and the nash certainty equivalence principle[END_REF] and Schrödinger's equation [START_REF] Guéant | Mean field games equations with quadratic hamiltonian : a specific approach[END_REF][START_REF] Ullmo | Quadratic mean field games[END_REF], can replicate the empirical observations for this example case, provided that it accounts for the anticipation of future costs. Beyond that particular example, the approach efficiently captures certain behaviours of crowds at the interface between the operational and tactical levels that are crucial to consider in attempts to improve the security of dense crowds.

II. CROSSING A STATIC CROWD

Crossing a static crowd is a common experience in busy premises, from standing concerts and festivals to railway stations. Recently, small-scale controlled experiments [START_REF] Nicolas | Mechanical response of dense pedestrian crowds to the crossing of intruders[END_REF][START_REF] Appert-Rolland | Experimental study of collective pedestrian dynamics[END_REF] shed light on trends that robustly emerged in the response of a crowd crossed by a cylindrical intruder, as displayed in Fig. 1 (right column). The induced response consists of a fairly symmetric density field around the intruder, displaying depleted zones both upstream and downstream from the intruder, as well as higherdensity regions on the sides. Indeed the crowd's displacements are mostly transverse : pedestrians tend to simply step aside. Incidentally, a qualitatively similar response was filmed at much larger scale in a dense crowd of protesters in Hong-Kong, which split open to let an ambulance through [START_REF]Etweetembed%7Ctwterm% 5E1140374111258140673%7Ctwgr%5E%7Ctwcon%5Es1_&ref_url= https%3A%2F%2Fwww.indiatimes.com%2Ftrending%2Fhuman-interest% 2Fcrowd-of-protesters-in-hong-kong-parts-like-the-red-sea-to-make-way-for-ambulance-wins-heartshtml[END_REF].

Such features strongly depart from the mechanical response observed e.g. in experiments [START_REF] Seguin | Dense granular flow around a penetrating object : Experiment and hydrodynamic model[END_REF][START_REF] Seguin | Experimental velocity fields and forces for a cylinder penetrating into a granular medium[END_REF] or simulations [START_REF] Seguin | Clustering and flow around a sphere moving into a grain cloud[END_REF] of penetration into a granular mono-layer below jamming, where grains are pushed forward by the intruder (see Figs. 1 (left column)) and accumulate downstream, instead of moving crosswise. More worryingly, these "mechanical" features [START_REF] Raj | Moving efficiently through a crowd : A nature-inspired traffic rule[END_REF] are also observed in simulations of pedestrian dynamics performed with the social-force model [START_REF] Helbing | Social force model for pedestrian dynamics[END_REF], which rests on tangential and normal forces at contact and radial repulsive forces for longer-ranged interactions.

Introducing collision anticipation in the pedestrian model helps reproduce the opening of an agent-free 'tunnel' ahead of the intruder, as illustrated with a 'time to (first) collision' model (second column of Fig. 1) directly inspired from [START_REF] Karamouzas | Implicit crowds : Optimization integrator for robust crowd simulation[END_REF], details of which can be found in SI. However, even though the displacements need not align with the contact forces in this agent-based model, the displacement pattern diverges from the experimental observations, with streamwise (walk-away) moves that prevail over transverse (step-aside) ones. Indeed, such models rely on 'short-sighted' agents, who do not see past the most imminent collision expected from constant-velocity extrapolation.

Results may vary with the specific collision-avoidance model and the selected parameters. Yet, our inability to reproduce prominent experimental features suggests that an ingredient is missing in these approaches based on short-time (first-collision) anticipation.

III. A GAME THEORETICAL APPROACH TO ACCOUNT FOR LOW-LEVEL PLANNING

To bring in the missing piece, we start by noticing that the observed behaviours are actually most intuitive : Pedestrians anticipate that it will cost them less effort to step aside and then resume their positions, even if it entails enduring high densities for some time, than to endlessly run away from an intruder that will not deviate from its course. But accounting for this requires a change of paradigm compared to the foregoing approaches. Game theory is an adequate framework to handle the conflicting impulses of interacting agents endowed with planning capacities : agents are now able to optimise their strategy taking into account the choices (or strategies) of others. So far, its use in pedestrian dynamics has mostly been restricted to evacuation tactics in discrete models [START_REF] Mesmer | Incorporation of decision, game, and bayesian game theory in an emergency evacuation exit decision model[END_REF][START_REF] Heliövaara | Patient and impatient pedestrians in a spatial game for egress congestion[END_REF][START_REF] Bouzat | Game theory in models of pedestrian room evacuation[END_REF]. Unfortunately, the problem becomes intractable when the number of interacting agents grows.

To overcome this quandary, we turn to Mean Field Games (MFG), introduced by Lasry and Lions [START_REF] Lasry | Jeux à champ moyen. I -le cas stationnaire[END_REF][START_REF] Lasry | Jeux à champ moyen. II -horizon fini et contrôle optimal[END_REF] as well as Huang et al. [START_REF] Huang | Large population stochastic dynamic games : closed-loop McKean-vlasov systems and the nash certainty equivalence principle[END_REF] in the wake of the mean- field approximations of statistical mechanics, and since used in a variety of fields, ranging from finance [START_REF] Lachapelle | A monotonic algorithm for a mean field games model in economics[END_REF][START_REF] Cardaliaguet | Mean field game of controls and an application to trade crowding[END_REF][START_REF] Carmona | Control of McKean-vlasov dynamics versus mean field games[END_REF] to economics [START_REF] Achdou | A long-term mathematical model for mining industries[END_REF][START_REF] Guéant | Mean field games and applications[END_REF][START_REF] Achdou | Partial differential equation models in macroeconomics[END_REF], epidemiology [START_REF] Laguzet | Individual vaccination as nash equilibrium in a sir model with application to the 2009-2010 influenza a (h1n1) epidemic in france[END_REF][START_REF] Djidjou-Demasse | Optimal covid-19 epidemic control until vaccine deployment[END_REF][START_REF] Elie | Contact rate epidemic control of covid-19 : an equilibrium view[END_REF], sociology [START_REF] Laguzet | Individual vaccination as nash equilibrium in a sir model with application to the 2009-2010 influenza a (h1n1) epidemic in france[END_REF][START_REF] Lachapelle | On a mean field game approach modeling congestion and aversion in pedestrian crowds[END_REF][START_REF] Achdou | Mean field games models of segregation[END_REF], or engineering [START_REF] Kizilkale | Load shaping via grid wide coordination of heating-cooling electric loads : A mean field games based approach[END_REF][START_REF] Kizilkale | An integral control formulation of mean field game based large scale coordination of loads in smart grids[END_REF][START_REF] Mériaux | Mean field energy games in wireless networks[END_REF]. While applications of MFG to crowd dynamics have already been proposed [START_REF] Jiang | Comparison study of the reactive and predictive dynamic models for pedestrian flow[END_REF][START_REF] Guéant | Existence and uniqueness result for mean field games with congestion effect on graphs[END_REF][START_REF] Lachapelle | On a mean field game approach modeling congestion and aversion in pedestrian crowds[END_REF][46], our goal here is to demonstrate the practical relevance of this approach at the operational level, using an elementary MFG belonging to one of the first class of models introduced by Lasry and Lions [START_REF] Lasry | Jeux à champ moyen. I -le cas stationnaire[END_REF], and which can be thoroughly analysed thanks to its connection with the nonlinear Schrödinger equation.

In the mean field approximation, the "N-player" game is replaced by a generalized Nash equilibrium [START_REF] Kreps | Nash equilibrium[END_REF] where indiscriminate microscopic agents play against a macroscopic state of the system (a density field) formed by the infinitely many remaining agents. Consider a large set of pedestrians, the agents of our game, characterised by their spatial position (state variable) X i ≡ (x i , y i ) ∈ R 2 , which we assume follows Langevin dynamics, viz.,

dX i t = a i t dt + σdW i t , (1)
where the drift velocity (control variable) a i t reflects the agent's strategy. In (1), σ is a constant and components of W i are independent white noises of variance one accounting for unpredictable events. All agents are supposed identical, apart from their initial positions X i (t = 0) and realisations of W i .

Each agent strives to adapt their velocity a i t in order to minimise a cost functional that we assume to take the simple form

c[a i ](t, x i t ) = T t µa 2 2 -(gm t (x) + U 0 (x-vt)) dτ , (2)
where the average denoted by • is performed over all realizations of the noise for trajectories starting at x i t at time t. In this expression, the term µa 2 /2, akin to a kinetic energy, represents the efforts required by the agent to enact their strategy (how much/how fast they have to move in this case), while the interactions with the other agents via the empirical density m (e) (t, x) = i δ(x -X i (t))/N are controlled by a parameter g < 0. Finally, the space occupied by the intruding cylinder, which moves at a velocity v = (0, v), is characterised by a 'potential' U 0 (x) = V 0 Θ( x -R) that tends to V 0 → -∞ inside the radius R of the cylinder and is zero elsewhere. Agents need to balance those three terms over the whole duration T of the game, which enables them to make costly, but temporary moves if they lower the overall cost. For example, depending on the parameters, stepping aside into a high density region (a cost-inefficient strategy a priori ) to let the intruder through may prove overall more efficient than running away from it ; the first strategy implies paying a high cost upfront, but nothing afterwards, while the second implies paying a comparatively low cost that however extends over the whole duration of the game, resulting in a potentially worse pay-off.

In the presence of many agents, the density self-averages to m(t, x) = m (e) (t, x) noise and the optimization problem (2) does not feature explicit coupling between agents anymore. It can then be solved by introducing the value function u(t, x) = min a(•) c[a](t, x), which obeys a Hamilton-Jacobi-Bellman [HJB] equation [START_REF] Lasry | Jeux à champ moyen. II -horizon fini et contrôle optimal[END_REF][START_REF] Bellman | Dynamic Programming[END_REF], with an optimal control given by a * (t, x) = -∇u(t, x)/µ. Consistency imposes that m(t, x) is solution of the Fokker-Planck [FP] equation associated with (1), given the drift velocity a(t, x) = a * (t, x). As such, MFG can be reduced to a system of two coupled partial differential equations [START_REF] Lasry | Jeux à champ moyen. I -le cas stationnaire[END_REF][START_REF] Lasry | Jeux à champ moyen. II -horizon fini et contrôle optimal[END_REF][START_REF] Guéant | Mean field games equations with quadratic hamiltonian : a specific approach[END_REF][START_REF] Ullmo | Quadratic mean field games[END_REF].

       ∂ t u(t, x) = 1 2µ [∇u(t, x)] 2 - σ 2 2 ∆u(t, x) + gm(t, x) + U 0 (x -vt) [HJB] ∂ t m(t, x) = 1 µ ∇ [m(t, x)∇u(t, x)] + σ 2 2 ∆m(t, x) [FP] , (3)
The atypical "forward-backward" structure of Eqs. (3), highlighted by the opposite signs of Laplacian terms in the two equations, accounts for anticipation. The boundary conditions epitomise this structure : based on (2), the value function has terminal condition u(t = T, x) = 0, while the density of agents evolves from a fixed initial distribution m(t = 0, x) = m 0 (x). In previous work, we have evinced a formal, but insightful mapping of these MFG equations onto a nonlinear Schrödinger equation (NLS) [START_REF] Guéant | Mean field games equations with quadratic hamiltonian : a specific approach[END_REF][START_REF] Ullmo | Quadratic mean field games[END_REF][START_REF] Bonnemain | Universal behavior in non-stationary mean field games[END_REF], which has been studied for decades in fields ranging from non-linear optics [START_REF] Kaup | Perturbation theory for solitons in optical fibers[END_REF] to Bose-Einstein condensation [START_REF] Pitaevskii | Bose-Einstein condensation and superfluidity[END_REF] and fluid dynamics [START_REF] Kharif | Rogue Waves in the Ocean[END_REF].

We perform a change of variables (u(t, x), m(t, x)) → (Φ(t, x), Γ(t, x)) through u(t, x) = -µσ 2 log Φ(t, x), m(t, x) = Γ(t, x)Φ(t, x) [START_REF] Ullmo | Quadratic mean field games[END_REF]. The first relation is the usual Cole-Hopf transform [START_REF] Hopf | The partial differential equation u t + uu x = µxx[END_REF] ; the second corresponds to an "Hermitization" of Eqs. [START_REF] Jiang | Comparison study of the reactive and predictive dynamic models for pedestrian flow[END_REF].

       -µσ 2 ∂ t Φ = µσ 4 2 ∆Φ + (U 0 + gΓΦ)Φ +µσ 2 ∂ t Γ = µσ 4 2 ∆Γ + (U 0 + gΓΦ)Γ . (4)
Except for the missing imaginary factor associated with time derivation, these equations have exactly the structure of NLS describing the evolution of a quantum state Ψ(t, x) of a Bose-Einstein condensate, with formal correspondence Ψ → Γ, Ψ * → Φ and ρ ≡ ||Ψ|| 2 → m ≡ ΦΓ. This system, however, retains the forwardbackward structure of MFG evidenced by mixed initial and final boundary conditions Φ(T, x) = 1, Γ(0, x) Φ(0, x) = m 0 (x). Several methods have been developed to deal with NLS and most can be leveraged to tackle the MFG problem [START_REF] Ullmo | Quadratic mean field games[END_REF][START_REF] Bonnemain | Schrödinger approach to Mean Field Games with negative coordination[END_REF].

Self-consistent solutions of Eqs. ( 4) are obtained by iteration over a backwardforward scheme. A video illustrating the evolution of the agents' density for a particular set of parameters, as well as details about the numerical scheme, can be found in SI.

Focusing on the permanent regime (a.k.a. the ergodic state [START_REF] Cardaliaguet | Long time average of mean field games with a nonlocal coupling[END_REF]) , rather than on the transients associated with the intruder's entry or exit, further simplifies the resolution. In this regime, defined by time-independent density and velocity fields in the intruder's frame, the auxiliary functions Φ and Γ are not constant in time, but they assume the trivial dynamics Φ(t, x) = exp[λt/µσ 2 ]Φ er and exp[-λt/µσ 2 ]Γ er where, in the frame of the intruder, Φ er and Γ er satisfy

       µσ 4 2 ∆Φ er -µσ 2 v • ∇Φ er + [U 0 (x) + gm er ]Φ er = -λΦ er , µσ 4 2 ∆Γ er + µσ 2 v • ∇Γ er + [U 0 (x) + gm er ]Γ er = -λΓ er , (5)
(with m er = Φ er Γ er independent of time). Far from the intruder U 0 (x) = 0, m m 0 and pedestrians have constant velocity -v in the intruder frame. This imposes the asymptotic solutions Φ er (x) = Γ er (x) = √ m 0 , from which λ = -gm 0 .

IV. RESULTS

The ergodic Eqs. ( 5) have two remarkable features : (i) They give direct access to the permanent regime, and are straightforward to implement numerically since time dependence has disappeared. (ii) The solutions of Eqs. ( 5) are entirely specified by two dimensionless parameters.

Indeed, the intruder is characterised by its radius R and its velocity v. In the same way, pedestrians are characterized by a length scale ξ = |µσ 4 /2gm 0 |, the distance over which the crowd density tends to recover its bulk value from a perturbation, a.k.a healing length, and a velocity scale c s = |g m0 /2µ|, the typical speed at which pedestrians tend to move1 . Up to a scaling factor, solutions of Eqs. ( 5) can be expressed as a function of the two ratios ξ/R and c s /v instead of depending on the full set of parameters (R, v, µ, σ, m 0 , g), which facilitates the exploration of the parameter space.

Figure 2 presents typical density and velocity fields simulated in the ergodic state, for parameters selected in each quadrant of the reduced space parametrised by log c s /v and log ξ/R on the horizontal and vertical axis respectively. Intuitively, one understands that c s governs the cost of motion for the agents while ξ gives the extent of the perturbation caused by the presence of the intruder. The main visual difference between the small and large c s /v cases is the change in rotational symmetry, a fact that reflects a more fundamental change in strategy. For large values of c s /v pedestrians do not mind moving, and they rather try to avoid congested areas for as long as possible, thus creating circulation around the intruder, as shown in the velocity plots. On the other hand, for small values of c s /v, moving fast costs more ; therefore, in order to avoid the intruder, pedestrians have to move earlier, and will accept to temporarily side-step into a more crowded area, thereby causing a stretch of the density along the vertical direction. The experimental observations of [START_REF] Nicolas | Mechanical response of dense pedestrian crowds to the crossing of intruders[END_REF] are best reproduced for small c s /v and small ξ/R (c s = 0.11 and ξ = 0.15), as shown in the third column of Fig. 1. Considering the minimalism of our MFG model, the obtained agreement is especially satisfying.

V. DISCUSSION

The data plotted in Fig. 1 (third column) demonstrate that even basic MFG models can naturally capture and semi-quantitatively reproduce prominent features of the response of static crowds [START_REF] Nicolas | Mechanical response of dense pedestrian crowds to the crossing of intruders[END_REF], which may be out of reach of more short-sighted pedestrian dynamics models.

Beyond this particular example, MFG are also applicable to a broader array of crowd-related problems. This will now be illustrated by exploring the daily-life situation of people waiting to board the coach in an underground station. This is readily achieved by suitably modifying the external potential U 0 (x) and the geometry of the system, as shown on Fig. 3, and introducing a terminal cost c T (x) [START_REF] Ullmo | Quadratic mean field games[END_REF][START_REF] Bonnemain | Schrödinger approach to Mean Field Games with negative coordination[END_REF] that is lower aboard the metro than on the platform. By solving the time dependent equations (4), we manage to reproduce the boarding process in a qualitatively realistic way, up to the decision made by some agents to stay on the platform rather than board the overcrowded metro. We believe this last point to be particularly interesting since this "passive" behaviour emerges naturally from our (anticipatory) game theoretical model, something that would be essentially impossible to implement without an ad hoc treatment in traditional approaches of crowd dynamics at the tactical level.

To conclude, let us recall that the foregoing results have been obtained with a simple, generic MFG model which depends linearly on density via gm(t, x). This approximation can be refined and the MFG formalism is flexible enough to incorporate further elements to make it truer to life, including time-discounting effects [ [START_REF] Frederick | Time discounting and time preference : A critical review[END_REF][START_REF] Gomes | Economic models and mean-field games theory[END_REF] and congestion [START_REF] Guéant | Existence and uniqueness result for mean field games with congestion effect on graphs[END_REF][START_REF] Dogbé | Modeling crowd dynamics by the mean-field limit approach[END_REF][START_REF] Achdou | Mean field games with congestion[END_REF]]. Higher quantitative accuracy will be within reach of these more sophisticated approaches, possibly at the expense of less transparent outcomes compared to the elementary model used here. For sure, MFG will struggle to capture a variety of problems of crowd dynamics at the operational level, notably those for which the granularity of the crowd is central. However, the fact that even the simplest of the Mean Field Game models is able to capture qualitative features that are missed not only by "off-the-shelf" commercial software, but also by a stateof-the-art 'time to (first) collision' model including some anticipation, bolster the claim that optimization and anticipation are essential ingredients for the description of crowd dynamics at the operational level, and justifies to claim entry for Mean Field Game based approaches into the toolkit of practitioners of the field.

METHODS

Simulations

The granular response (first column of Fig. 1) to the penetration of an intruder of diameter D = 2d = 0.74 m was obtained by simulating the dynamics of a two-dimensional layer of identical frictionless grains of diameter d = 0.37 m with molecular dynamics. The interactions between grains were given by Hertzian contact forces

F ij = kζ 3/2 -λ dζ dt
, where ζ is the interpenetration of the grains, k is the stiffness of the contact, and λ is a damping coefficient.

The agent-based simulation (second column of Fig. 1) is performed with a model based on anticipated times to collision (TTC), inspired by [START_REF] Karamouzas | Implicit crowds : Optimization integrator for robust crowd simulation[END_REF]. In this model, at each time step every agent i selects their desired velocity v p as the minimum of an individual cost function (or pseudo-energy) E i [v p ] ; velocities v p that lead to a collision with another agent j within a very short time horizon τ ij (if j keeps their current velocity) are penalized by a cost E TTC i (reproduced from [START_REF] Karamouzas | Universal power law governing pedestrian interactions[END_REF]) in E i which becomes very large when one of the TTC τ ij gets small. In addition to this TTC term, the total cost E i includes (i) a driving term E target , which assesses whether v p brings the agent closer to the destination, (ii) a term constraining the agent's speed, E speed ∝ v p (v p -v p pref ) 2 , where v p pref is a comfortable walking speed, (iii) a term penalizing sudden changes in velocity, (iv) a repulsion term, E core-repulsion that is activated as soon as another agent steps into the private sphere of agent i and then grows as the inverse of their mutual distance f . MFG simulations are realised by numerically solving either Eqs. ( 4) or [START_REF] Best | Densesense : Interactive crowd simulation using density-dependent filters[END_REF].

Further details about the different algorithms can be found in the SI.

Smoothing of the density and velocity fields

The smooth velocity fields ṽ shown on (In practice, the Gaussian kernel was truncated at 3r c ). The coordinates r were then re-centered around the intruder's position at each time frame and the resulting fields were averaged over time. A similar smoothing process was used for the density fields.

Figure 1 -

 1 Figure 1 -Density (middle row) and velocity (bottom row) fields induced in a static crowd by a cylindrical intruder that crosses it ; the transparency of the velocity arrows is linearly related to the local density. (Column 1) Simulations of a mono-layer of vibrated disks. (Column 2) Simulations of an agent-based model wherein agents may anticipate the most imminent collision. All fields have been averaged over many realisations. The snapshot illustrating the agent-based model was rendered using the Chaos visualisation software developed by INRIA (https ://project.inria.fr/crowdscience/project/ocsr/chaos/). (Column 3) Results of the mean-field game introduced in this paper. (Column 4) Controlled experiments of [15]. Note the relatively symmetrical density dip in front and behind the intruder, as well as the transverse moves. (Columns 1-3) The crowd's density and intruder's size have been adjusted to match the experimental data (average density of 2.5 ped/m 2 ). Details of simulations and videos showcasing time evolution can be found in SI. 6

Figure 2 -

 2 Figure 2 -Typical density and velocity fields induced by the crossing intruder in the ergodic state, as predicted by the MFG model in different regions of the parameter space. Parameters taken in the small c s /v and small ξ/R quadrant display good visual agreement with the experimental data.

Figure 3 -

 3 Figure 3 -Boarding a crowded metro coach at rush hour. Left : Morning rush hour of November 18, 2021, on the platform of Metro A in Lyon, France. The doors are about to close and the gap between boarding passengers and those who preferred to wait for the next metro is clearly visible. Right : Snapshot from a MFG simulation at t = 0.9T . Players start uniformly distributed on the platform and would like to get on the coach before the doors close, at t = T . Just before that moment, the players closest to the doors choose to rush towards the coach and cram themselves in it despite the high density. Others prefer to stay on the platform (see SI for a movie of the whole process).

Fig. 1 2 c• exp -1 2 r 2 r 2 c

 122 were obtained by convoluting the discrete instantaneous experimental or numerical fields v(r) = i v i δ(r-r i ) (where the sum runs over all particles i and δ denotes a Dirac distribution) with a Gaussian kernel φ(r) = 1 2πr with r c ≈ 20cm, viz., ṽ(r) = d 2 r φ(r -r )v(r ).

Note that µξc s = µσ 2 has the dimension of an action and plays the role of in the original nonlinear Schrödinger equation.

ACKNOWLEDGMENTS

We acknowledge financial support for the internship of Theophile Bonnet by the "Investissements d'Avenir" of LabEx PALM (ANR-10-LABX-0039-PALM), in the frame of the PERCEFOULE project, as well as funding from the Hubert Curien Partnership France-Malaysia Hibiscus (PHC-Hibiscus) programme [203.PKOMP.6782005].

DATA AVAILABILITY

All study data are included in this article or the SI. Movies S1-S4 have been deposited in the Open Science Framework (OSF) (Movie S1, https://osf.io/cgs7y/ ; Movie S2, https://osf.io/te64f/ ; Movie S3, https://osf.io/vjzby/ ; Movie S4, https: //osf.io/b7ep8/).

COMPETING INTERESTS

The authors declare no competing interests.