Paper deep dive
Physics of anticipatory active matter, with application to crowd dynamics
Alexis Raulin-Foissac, Alexandre Nicolas
Intelligence
Status: succeeded | Model: Gemma-4-26B-A4B | Prompt: intel-v1 | Confidence: 93%
Last extracted: 7/9/2026, 5:44:46 AM
Summary
This paper introduces a statistical physics framework for anticipatory agents whose dynamics depend on prospective system states rather than just present or past configurations. It maps d-dimensional anticipatory dynamics to (d+1)-dimensional non-anticipatory chains, using a cost function and transverse fluctuations to model uncertainty. The framework is applied to pedestrian dynamics, successfully reproducing complex crowd scenarios through an agent-based model.
Entities (6)
Relation Signals (5)
Framework → appliedto → Pedestrian dynamics
confidence 95% · The foregoing framework is successfully applied to pedestrian dynamics
Anticipatory agents → mappedto → d+1 dimensions
confidence 94% · we show that the dynamics of an anticipatory agent in d dimensions can be mapped onto the dynamics of a (non-anticipatory) chain in d + 1 dimensions
Anticipatory agents → modeledvia → Cost function
confidence 92% · We clarify how these dynamics can be expressed in terms of a cost function constructed based on observations
Fluctuations → accountsfor → Uncertainty about future state
confidence 90% · with fluctuations acting transversely on the chain to account for the uncertainty about the future state
Polymer Physics → providesinsightsfor → Anticipatory agents
confidence 88% · Insights from polymer Physics help us characterize the dynamics of these chains
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Statistical Physics has traditionally dealt with entities that interact merely based on the present, and possibly past, configurations. This reactive framework is inefficient in many situations involving living beings, such as predators chasing a prey, pedestrians, or even robots. This paper introduces a statistical physical framework for the dynamics of anticipatory agents, whose present-time dynamics depend on the prospective system state that they anticipate. We clarify how these dynamics can be expressed in terms of a cost function constructed based on observations and we show that the dynamics of an anticipatory agent in d dimensions can be mapped onto the dynamics of a (non-anticipatory) chain in d + 1 dimensions, with fluctuations acting transversely on the chain to account for the uncertainty about the future state. Insights from polymer Physics help us characterize the dynamics of these chains and delineate an anticipation horizon beyond which the blurry future can be handled in a mean-field way. The foregoing framework is successfully applied to pedestrian dynamics, leading to a seamless integration of operational and tactical levels in an agent-based model. Even with a minimal expression of the cost, the model succeeds in reproducing various experimental scenarios which are challenging for state-of-the-art models, such as crossing cluttered environments or alighting from a crowded train. The transparent and flexible basis of the model allows the straightforward incorporation of additional mechanisms.
Tags
Links
- Source: https://arxiv.org/abs/2606.14818v1
- Canonical: https://arxiv.org/abs/2606.14818v1
Trouble viewing inline? Open PDF directly →
Full Text
90,040 characters extracted from source content.
Expand or collapse full text
Physics of anticipatory active matter, with application to crowd dynamics Alexis RAULIN–FOISSAC ∗ and Alexandre NICOLAS † Universit ́e Claude Bernard Lyon 1, Institut Lumi`ere Mati`ere, CNRS, UMR 5306, 69100, Villeurbanne, France (Dated: June 16, 2026) Context:Statistical Physics has traditionally dealt with entities that interact merely based on the present, and possibly past, configurations. This reactive framework is inefficient in many situations involving living beings, such as predators chasing a prey, pedestrians, or even robots. Results:This paper introduces a statistical physical framework for the dynamics of anticipatory agents, whose present-time dynamics depend on the prospective system state that they anticipate. We clarify how these dynamics can be expressed in terms of a cost function constructed based on observations and we show that the dynamics of an anticipatory agent inddimensions can be mapped onto the dynamics of a (non-anticipatory) chain in d+ 1 dimensions, with fluctuations acting transversely on the chain to account for the uncertainty about the future state. Insights from polymer Physics help us characterize the dynamics of these chains and delineate an anticipation horizon beyond which the blurry future can be handled in a mean-field way. Application:The foregoing framework is successfully applied to pedestrian dynamics, leading to a seamless integration of operational and tactical levels in an agent-based model. Even with a minimal expression of the cost, the model succeeds in reproducing various experimental scenarios which are challenging for state-of-the-art models, such as crossing cluttered environments or alighting from a crowded train. The transparent and flexible basis of the model allows the straightforward incorporation of additional mechanisms. I. INTRODUCTION Anticipation refers to “actions taken in relation to an event that has not occurred yet” [1]. A putative corner- stone in the singular evolution of the hominids [2], the development of anticipatory capabilities has also bene- fited multiple other natural species, from large predators and bees down to bacteria [3], as well as robotic systems [4, 5]. Since the end of the 20th century, Statistical Physics has triumphally extended its realm to the dynamics of living systems and active matter [6], but it has never fully severed the bonds with its reactive (non-anticipative) roots, perhaps saddled by an all-too-narrow vision of causality. In particular, while the effect of perception and the ensuing non-reciprocity of interactions between agents have progressively come in the limelight [7, 8], it is usually taken for granted that these interactions should be formulated based on only the present configuration of the system (and past ones, if the system has memory). The insufficiency of this standpoint for practical pur- poses has reached a breaking point in recent years, no- tably (but not only) in the field of pedestrian dynamics. Empirical crowd datasets have shown that what governs inter-pedestrian interactions is hardly relative positions only, but rather anticipated times to collision (TTC), namely, the delay after which a collision is to be antici- pated if all velocities are conserved [9, 10]. The response of a static crowd to an intruder’s crossing also largely hinges on anticipation [11]. ∗ alexis.raulin-foissac@univ-lyon1.fr † alexandre.nicolas@cnrs.fr To remedy the problems of reactive models, a num- ber of models for pedestrian dynamics have introduced a modicum of anticipation, by addingad hocterms that mimic specific anticipatory responses [12, 13], or by mak- ing interactions TTC-dependent [9, 14] or (in a similar vein) by barring the selection of velocities that would lead to a collision [4, 15]. The latter options have succeeded in better reproducing salient features of crowd dynam- ics, but nevertheless they rely on a linear extrapolation of trajectories, independent of one’s own actions, and thus do not strongly depart from the classical reactive theoretical framework; other examples of low-order ac- counts of anticipatory responses, in other self-propelled assemblies, can be found in [16, 17]. For several practical situations, e.g., crossing a cluttered space, these exten- sions were shown to be insufficient [18]. Poles apart from these linear extrapolations, optimal control and game theory aim to capture full trajecto- ries that are optimal in some sense. They have been applied to crowd dynamics with notable success [19–22], but for large anticipatory assemblies they give rise to such technical complications that the ensuing collective mo- tion eludes any intuitive grasp. Mean-field approaches overcome these technical issues to some extent, but at the substantial expense of obliterating the agents’ granu- larity, heterogeneity and variability, and assuming omni- scient pedestrians. Further issues arise from more tech- nical considerations, such as putting on an equal foot- ing multiple local solutions (Nash equilibria) and looking for optimal trajectories that extend over arbitrarily long time. In this contribution, we wish to establish a statisti- cal physical framework for the dynamics of anticipatory agents that is not marred by the opacity of current game- arXiv:2606.14818v1 [physics.soc-ph] 12 Jun 2026 2 theoretical approaches. We also aspire to anchor this ap- proach in a firmer basis, where (instead of positing util- ities or costs) the equations are framed based on obser- vations and agents are not supposed to be rational from the outset. These goals are not achieved by perturba- tively amending the classical reactive framework, but by including long-term anticipation from scratch. Indeed, we believe that the strategy of jumping in the deep end may be more successful than making small perturbative steps: for instance, Statistical Mechanics can hardly be derived by moving from one deterministic trajectory to a few interacting trajectories, but instead by considering infinitely many. Here, after formalizing the notion of cost as an observation-based construct, we delineate the dynamics of reactive agentsvs.anticipatory ones, whose present- time motion depends on the prospective state of the sys- tem that they anticipate, in Sec. I. We show that antici- patory dynamics inddimensions can be mapped onto the dynamics of a (non-anticipatory) chain ind+ 1 dimen- sions, with fluctuations acting transversely on the chain to account for the uncertainty about the future state. The implications of this framework are made more tan- gible in Sec. I by considering the dynamics of a single goal-driven agent; this leads to the definition of an antic- ipation horizon, beyond which the blurry future is han- dled in a mean-field way and before which trajectories are discretized in time, thus turning into polymer-like chains. In Sec. IV, insights from polymer Physics help us char- acterize the dynamics of these chains and also guide the numerical implementation of the model; note that this section is mostly technical and can be skipped for cur- sory reading. Finally, Sec. V applies the proposed general framework to pedestrian crowds and demonstrates that, even with a straightforward implementation and simple cost functions, the resulting agent-based model is able to replicate empirical scenarios with crowds that are partic- ularly challenging for state-of-the-art models. Readers only interested in this disciplinary application can di- rectly jump to this section. I. FORMAL DEFINITION AND THEORY OF ANTICIPATORY DYNAMICS Our ambition is to develop a dynamical theory of active systems that integrates anticipation, in an intu- itive framework that makes efficient numerical simula- tions possible. This ambition manifestly requires a clear delineation of anticipatory systems. A. Dynamics of interacting agents Interacting agents such as animals or human pedestri- ans do not traditionally pertain to Statistical Physics, so we start by contextualizing their dynamics on the basis of objective, observable quantities. For this pur- pose, let us consider an assembly ofNagents indexed byj= 1...N, whose trajectories are globally denoted byQ ω = q ω j j=1...N , withq ω j (t) representing the posi- tion of agentjinddimensions at timet∈[0,T]. These trajectories may vary between realizationsω, hence the superscript. For each realizationω, it is always possible to design a functionC ω,j , such that Q ω = arg min Q∈R dN×[0,T] C ω [Q],(1) where adequate initial conditions are prescribed. The goal of a dynamical description is to capture the statis- tics ofQ ω over realizations with anexplicitfunctionC[Q] (instead ofC ω [Q]), possibly complemented with anex- plicitrandom distribution to account for the variations between realizations. For example, for a Newtonian par- ticle of massmin a potentialU, one can make use of C[Q] = Z T 0 X j m ̈ q j (t) + ∂U ∂q j 2 dt or substitute it with the usual action R T 0 P j 1 2 m ̇ q 2 j (t)− U Q(t) dtif the end positions are fixed, whereas over- damped particles exposed to a friction coefficientζare suitably described by C[Q] = Z T 0 X j ζ ̇ q j (t) + dU dq j 2 dt. The use of a global functionC[Q] entails a reciprocity principle ( ∂ ∂q j ∂C ∂q i = ∂ ∂q i ∂C ∂q j , for smooth enough func- tions) that holds for simple particles, but not for gen- eral agents, owinginter aliato the asymmetry of per- ception. This issue is overcome by looking for explicit agent-dependentfunctionsC j [Q] (in lieu ofC[Q]), pos- sibly including random terms, whose “minimizers”Q ⋆ , defined by the Nash equilibrium conditions ∀j,q ⋆ j = arg min q j ∈R d×[0,T] C j [q ⋆ 1 ,...,q j ,...,q ⋆ N ],(2) are statistically similar toQ ω . B. Anticipatory systems To clarify the notion of anticipation, consider an ar- bitrary intermediate timet. Forreactivesystems, the trajectories up tot,Q ω t ′ ⩽t , can be determined indepen- dently of the motion planned fort ′ > t. Accordingly, in Eq. 2, it is sufficient to look for functionsC j that de- pend on test trajectoriesQ t ′ ⩽t extending only up tot. In particular, the dynamics at timetare ruled by quan- tities measured up to timet(or just at timetfor systems without memory), viz., [Reactive agents]∀j, δC j δq j (t) h Q t ′ ⩽t =Q ω t ′ ⩽t i = 0.(3) 3 For the aforementioned overdamped particle, it is easy to check that Eq. 3 boils down to the overdamped equation ∀j, ζ ̇ q ω j (t) =− ∂U ∂q j (Q ω t ). Beyond this specific example, simple models of self- propelled particles, such as active Brownian particles, also naturally fit in this reactive category. By contrast, the dynamics ofanticipatingagents seem to be governed by how they predict the system will evolve: a predator chasing a prey is not interested in where the prey currently is, but in where it will soon be; many social bees start to become more active just before (i.e., in anticipation of) sunrise, while still inside the nest cavity [23]; a pedestrian does not fear collisions with pedestrians at theircurrentpositions, but where they should be next [9, 24]; a person at a bus stop does not care about where the bus currently is, but where and when it will stop; evenE. Colibacteria traveling through human digestive tracts activate genes for mal- tose digestion not necessarily because they currently are in maltose-rich regions, but before reaching (i.e., in antic- ipation of) such regions [3, 25]. More generally, Robert Rosen [26] claims that biology in general cannot be re- duced to just applied physics, because living organisms notably have a distinctive capacity to anticipate: they do not merely react to the present but adjust their be- havior to the (broadly defined) anticipated state e Q ω,j (t ′ ) that they predict for future timest ′ in light of the cur- rent and past statesQ ω t ′ ⩽t e.g. via an internal model of themselves and their environment. Accordingly, the reactive framework of Eq. 3 is ineffi- cient for anticipating agents. On the other hand, at time t, agentsjdo not have access to the exact future trajec- toriesq ⋆ i of other agentsifeatured in Eq. 2. Therefore, we substitute the future trajectories on the rhs of Eq. 2 with the anticipated state e Q ω,j , arriving at [Anticipatory agents] ∀j,q ⋆ j = arg min q j ∈R d×[0,T] C j [q j ,Q ⋆ t ′ ⩽t , e Q ω,j (Q ⋆ t ′ ⩽t ,q j )],(4) where we have made explicit the dependence of the antic- ipated state on the surroundings’ stateQ ⋆ t ′ ⩽t and on the prospective trajectoryq j under consideration. In partic- ular, at timet, [Anticipatory agents] ∀j, δC j δq j (t) [q j ,Q ω t ′ ⩽t , e Q ω,j ] q j =q ⋆ j = 0.(5) (In practice, however,q ⋆ j is obtained from Eq. 4.) The internal representation e Q ω,j is not directly observ- able; yet, it is a convenient proxy for the variables that guide decision-making, somewhat similarly to the use of complex numbers to encode phase and dynamical infor- mation in Electromagnetism, although physical observ- ables are all real numbers. What is observable here is the agent’s actionsq ⋆ j (t+ε) whenε→0 + , i.e., how they “step into the future”. Unless something unexpected happens, this action should be consistent with the trajectory that the agent has anticipated for themselves in the imminent future, i.e., e q ω,j j (t+ε) =q ⋆ j (t+ε) =q ω j (t+ε). C. From a multi-verse of anticipated states to a shared anticipation universe Overall, solving the assembly’s dynamics via Eq. 4 re- quires continuously updating a multi-verse, or more pre- cisely anN-verse, of anticipated states n e Q ω,j o j=1...N . Indeed, different agents need not have identical antici- pations. To better grasp the complexity of the prob- lem, a loose parallel may be drawn with the paradox of Wigner’s friend in Quantum Mechanics [27], if the pre- diction e Q ω,j is probabilistic (i.e., a collection of density functions, rather than trajectories): pending a future ob- servation, agentj(like Wigner) is uncertain about their ‘friend’i’s position (even thoughiknows it) and must blindlyevolve their own prediction, based on their inter- nal model, until an observation determines agenti’s ac- tual state. The resulting assembly ofNWigner’s friends, who mutually observe each other every now and then and update their own anticipation universe e Q ω,j accordingly, is practically intractable forN ≫1. However, if the observations are frequent (which will be the case for pedestrians), it makes sense to consider that the present-time state e Q ω,j (t ′ =t) is the configura- tion of all the agents that are currently perceived byj. Furthermore, anticipation will only be efficient if, for all perceived agentsi, agentjpredicts trajectories e q ω,j i (t ′ ) that closely match the actual ones in the very near fu- turet ′ ≈t, e q ω,j i (t ′ )≈q ω i (t ′ )≈ e q ω,i i (t ′ ). This implies that the internal models of agentsjyield similar short-term predictions for the agents that are perceived. Therefore, we recast the state anticipated by agentjinto e Q ω,j (t ′ ) = n π j t ′ ( e q ω i ) o i=1...N .(6) Here, the observer-specific functionsπ j t ′ warp[13] the self-centered predictions e q ω i ˆ= e q ω,i i , in order to account for nonperception (π j t ′ ( e q ω i ) =∅) and for the probable diver- gence of predictions at long times. (In practice, we will use extremely simple warping functionsπ j ). The simplifying assumptions leading to Eq. 6 have a major practical advantage: they reduce the antici- pation multi-verse n e Q ω,j o to a shared base universe e Q ω ˆ= n e q ω i o i=1...N , possibly warped by the observer’s per- spective and internal rules. While n e Q ω,j o consists ofN states of multiple (up toN) predicted trajectories each, the shared base universe e Q ω consists of onlyNtrajecto- ries. Naturally, this comes at a cost: observer-dependent 4 correlations, whereby for instancejmispredictsi’s tra- jectory becauseiactually interacts with another agent not seen byj(or the other way round), are barred. That being said, even in the shared universe, the trajectory that agentjpredicts foridoes not depend solely on the past, but possibly also on the future actions contem- plated byj– a crucial point for what follows. D. Variability between realizations As for the actual trajectories, for each realizationω, it is always possible to design functions e C ω j that are mini- mized by the planned trajectories e q ω j , ∀j, e q ω j = arg min q j e C ω j h q j | π j ( e q ω i ) i̸=j i .(7) e C ω j can be regarded as the ‘cost’ that agent j aims to min- imize and actually minimizes, for a given set of others’ anticipated trajectories π j ( e q i ) i̸=j . The costs e C ω j vary between realizationsω. We express these variations as (supposedly modest) fluctuations around a central cost functionC j [q j | π j (q i ) i̸=j ], viz., e C ω j =C j +ε ω j .(8) Roughly speaking, the fluctuating cost has an effect similar to temperature in a physical system, populating trajectories whose “costs” are not strict minima ofC j . Its origin can be ascribed to the agents’ variable responses and their uncertainty about the future; its magnitude should increase with time: the further in time, the more uncertain (until trajectories become fully blurred, and equiprobable, in the distant future.) Incidentally, the introduction of anticipation in Eq. 4 and, above all, of a “cost” in Eq. 7 puts in the lime- light the much-debated issue of the rationality of the agents. One should bear in mind that our reasoning is premised on no such rational hypothesis. Interpret- ing the statistics-based (or probability-based) auxiliary functionC j as acostis a subjective choice here, made out of intellectual convenience. So is the choice to derive theobserveddynamics using virtual anticipated trajecto- ries and/or a putative internal model of the environment maintained by agents in Eq. 4. In Kantian parlance, these choices echo the subjective purposiveness that the Subject introduces in contingent natural forms such as sea shells to make up for the inability of Reason to grasp them, where the “laws of causality arising from the sim- ple mechanisms of Nature do not suffice for their under- standing” [28]. E. Geometric interpretation of anticipatory dynamics Provided the cost functions are smooth enough, the minimization of Eq. 7 can be achieved by letting the t=0 t=dt FIG. 1. Interplay between real-time trajectories (in blue) and artificial dynamics (heatmap). The thick chains in warm colors (from yellow – near future, with limited fluctuations – to dark red – longer-term future, with higher fluctua- tions) represent the last chain configuration at the end of the artificial (Langevin) dynamics at successive real-time steps t= 0,dt,...and the heatmaps in the background are the corresponding probability density functions over the whole dynamics. At each real time step, the first position of the chain is frozen and real time is shifted (t→t+ dt). planned trajectory e q j descend the gradient of e C ω j in arti- ficial timeτ, for allj: ∂ e q j (t ′ ) ∂τ =− δ e C ω j [ e q j |π j ( e q i̸=j )] δ e q j (t ′ ) =− δC j [ e q j |π j ( e q i̸=j )] δ e q j (t ′ ) +η ω j ,(9) where we have introduced the shorthandη ω j =− δε ω,j δ e q j and the dependence of e q j (t ′ ) onτis implicit. Now, should one interprett ′ in Eq. 9 as just another dimension (on top of thedspatial dimensions of e q j ), one will immedi- ately see a parallel between the planned trajectories e q j and chains that wiggle in space-time (see Fig. 5a). This is the first take-home message of our paper: the dynam- ics of anticipatory agents inddimensions reduce to the dynamics of interacting (but non-anticipatory) chains in d+ 1 dimensions. This formal mapping is reminiscent of the use of Wick’s rotation of time to connect Quantum Field Theory to Statistical Field Theory. F. Real-time motion and artificial dynamics To sample planned trajectories, minimizers of e C ω j could in principle be obtained by simulating Eq. 9 for a given ω(hence,η ω j ), collecting the resulting e q j after a long re- laxation timeτ→ ∞, running the simulation afresh for anotherω, and so on. However, as the random pertur- bationη ω j is unknown, we will overlook this quenched disorder and simply assume thatη ω j is fully uncorrelated in fictitious timeτand in space, so that it acts as white noise. Equation 9 is then akin to an overdamped stochas- tic Langevin equation. Its numerical resolution enables one to sample the e q j ’s over artificial timeτ, after an 5 “equilibration” period (the duration of which will be de- rived using insights from Polymer Physics in Sec. IV A). This “equilibration” does not produce thermal equi- librium, for two reasons. Firstly, the ‘forces’ acting on a chain do not derive from a global potential and will generally be non-reciprocal. Secondly, the volatility of η ω j grows witht ′ , mirroring the increasing uncertainty in thefuturedirection: the chain wiggles in a temperature gradient directed towards the future. At thepresentend (t ′ =t), shown in yellow in Fig. 1, the chain is pinned (its position is fully determined). As timetgoes on, the temperature gradient is shifted towards the future and thepresentend of the chain gets frozen at its current position (marked as a blue dot in Fig. 1). The simulated dynamics thus alternate between ‘equilibrations’ in arti- ficial timeτ(Eq. 9), during which the chain randomly explores configurations, and stepwise shifts in real time (t→t+δt). One can interpret these steps as decision- making processes through which anticipating agents con- tinuously update their planned trajectories. G. Connections with game theory and motion planning At this stage, some connections ought to be drawn between the newly introduced framework and adjacent fields. First consider the limit-case of vanishing variability be- tween realizations (ε ω,j →0) and perfect inference of the others’ trajectories (i.e.,π j =1is the identity function or, equivalently, e Q ω,j = e Q ω ). In this case, the station- ary solutions of the gradient descent Eq. 9 satisfy the optimality condition of Eq. 2: they are Nash equilibria of a game betweenNplayers aiming to find a strategy (i.e., a trajectory) that minimizes their costC j . Thus, al- though the proposed theory of anticipative dynamics was not originally framed as a competition between rational agents, it does boil down to a gamein the aforemen- tioned limit. More precisely, the shared universe hypoth- esis (Sec. I C) with perfect inference (π j =1) implies the common knowledge hypothesis of game theory [29], as the optimal choice of each agent is known to, and used by, everyone else. However, the proposed theory eschews the conundrum of (perfect) rationality via the fluctuating term in Eq. 9. Not only does the notion of a cost emerge as a statis- tical construct, rather than a postulate on the agents’ behaviors, but in addition the planned trajectories are not strict minima of this cost. They are ‘satisficing’ so- lutions (using the expression coined by Herbert Simon), rather than strict optima, and are thus easier to reach by learning [30]. Besides, the random fluctuations also serve a more practical purpose, in that they prevent the indefinite en- trapment of trajectories in a given local minimum, mak- ing a broader exploration of phase space possible. In this regard, combining fluctuations with a gradient term in Eq. 9 is reminiscent of the inclusion of stochastic- ity in optimization-based motion planners in the field of robotics. These planners aim to find trajectories in a given workspace for body points on a robot such that a global cost penalizing collisions and jerky motion is mini- mized. In particular, the CHOMP algorithm follows from writing a gradient descent scheme in covariant form; it complements this gradient descent with random ‘pushes’ generated by a Hamiltonian Monte Carlo algorithm with resetting, in order to push the system out of basins of attraction in which it may be trapped [5]. In the alter- native STOMP algorithm, stochasticity instead emerges from the computation of gradients based on a sample of directions [5], instead of exact gradients. A connec- tion [31] can thus be drawn between motion planning in robotics and the dynamics of anticipatory agents, even though in the former stochasticity does not reflect uncer- tainty or limited anticipation capabilities, but only has a practical purpose. Moreover, a global potential (or cost function) is used in robotics, whereas this is not legiti- mate for an assembly of autonomous agents with possibly non-reciprocal interactions. With autonomous agents, the game-theoretical opti- mization process is typically exposed to a curse of dimen- sionality (i.e., a computational complexity that increases exponentially with the numberNof agents, insofar as an optimum should be sought in a space of dimension pro- portional toN). We will see that this problem will be bypassed by simulating Eq. 9 in a discretized form, with simple enough (but practically relevant) cost functions, and using insights from Condensed Matter Physics. I. DYNAMICS OF A SINGLE PURPOSEFUL AGENT A. Generic expression of the cost Given the novelty of the proposed framework, we start by analyzing the response of a single purposeful (antic- ipatory) agent, with a minimal form for the cost func- tionalC. The agent heads for a target areaq g , so there is a penaltyc g (eq) for being away fromq g . However, the agent is aware that it cannot move infinitely fast: there must be a costc v (v) that becomes prohibitive at large speedsvˆ=|| ̇ e q||. Thus, upon integration along the agent’s planned trajectory, C[ e q] = Z T t h c v || ̇ e q(t ′ )|| +c g ( e q(t ′ )) i dt ′ .(10) The results presented in this section are valid for fairly general functionsc v andc g , as long asc v (v) increases superinearly withvand thatc g is peaked aroundq g . These conditions ensure that, in the competition between the driving termc g andc v , an optimal trade-off is reached at afinitespeedv opt . 6 In particular, supposingc v (v) =αv β andc g ( e q) = κ(1−χ q g ( e q)), whereα, κ >0,β >1 andχ q g is the indicator function of a small neighborhood ofq g , one ar- rives at v opt = κ α(β−1) 1/β .(11) B. Fluctuations and anticipation horizon We recall that in the Langevin-like Eq. 9, we model the random contributionη(τ,t ′ ) = δε ω δ e q as white noise, with an amplitude that grows witht ′ , mirroring a growing uncertainty. Thus, for the single agent, even without any amplification of the uncertainty due to the uncertain behavior of neighbors, the variance overτof the planned position e q(τ,t ′ ) increases witht ′ , not to mention that the chain is fixed at one end (t ′ =t). It follows that the chain fluctuations will exceed any typical length of the system (e.g., the agent’s size) past some timet ′ =t+T ant ; we will refer toT ant as the antic- ipation horizon and evaluate it analytically in Sec. IV A, after specifying the temperature gradient. BeforeT ant , trajectories can be predicted with meaningful precision; the chain is localized. Beyond this horizon, uncertainty dominates. C. Beyond the anticipation horizon So far, chains (i.e., planned trajectories) can be almost infinitely long, which is impractical and often meaning- less. Therefore, we want to approximate the contribution to the cost beyondT ant (T ant ≪T) with an effective ‘final’ costC f ( e q(T ant )) (averaged over fluctuations) that only depends on the agent’s position e q(T ant ) on the verge of the anticipation horizon.C f pulls the chain end toward the target. With the expressions of Eq. 11, noticing that the instantaneous costs vanish once the agent has reached the targetq g , C f e q T ant = Z T T ant c v (v(t ′ )) +c g ( e q(t ′ )) dt ′ = Z q g e q(T ant ) αv β opt +κ dℓ v opt =κ β β−1 D g v opt ,(12) Thus, in this minimal setting, the final cost is propor- tional to the effective distanceD g that remains from e q T ant toq g , taking into account the geometry of the premises. More generally, the local cost functional will include contributions due to anticipated interactions with other agents and a mean-field approximation will be required. Concretely, the individual trajectories e q j will be averaged over fluctuations and replaced by densities of probability, thereby capturing their average influence on a represen- tative agent, but neglecting higher-order correlations. D. Discrete-time chains in the very short run By contrast, before the anticipation horizonT ant , correlations are likely to be important. To solve the Langevin-like equation (Eq. 9), we discretize time us- ing a small time step dt(which will coincide with the decisional update timeδtin practice). The trajectories e q(t ′ ) are thus atomized into a chain of successive posi- tionsr n ˆ= e q(t ′ =t+ndt), forn= 0,...,N(Nˆ= T ant dt ), so that Eq. 9 becomes ∂r n ∂τ =− ∂C[r] ∂r n +η(τ,t+ndt).(13) For an isolated agent, remembering that the target cost c g in Eq. 10 has been integrated out into a final costC f acting on atomNand usingv(t+ndt) = r n+1 −r n dt , the gradient term reads ∀n∈J1,N−1K, ∂C[r] ∂r n = αβ dt β−1 h (r n −r n−1 ) β−1 −(r n+1 −r n ) β−1 i (14) These terms may be interpreted as cohesive forces that hold successive positions close to each other; in the spe- cific caseβ= 2, they correspond to linear springs. The artificial Langevin equation (Eq. 13) therefore describes the dynamics of a thermalized chain of atoms fixed at one end (namely,r 0 =0, in an appropriate reference frame) and pulled by the gradient ofC f (r N ) at the other end; successive atoms are bound by spring forces (because of the velocity cost): this is an active polymer grafted at one end and immersed in a thermal gradient [32]. This poly- mer analogy will be extensively exploited in the next sec- tion. BeyondT ant , our continuum mean-field approach bears some similarity with the mean-field approximation in polymer field theory. IV. INSIGHTS FROM CONDENSED MATTER AND NUMERICAL IMPLEMENTATION In this mostly technical section, we explain how in- sights from condensed matter can be leveraged to derive quantities of interest for the anticipatory trajectories and we detail the implementation of the model. A. Relaxation times of the isolated chain To get insight into the dynamics of the polymer-like chains, we build on the well-known Rouse model, taking 7 FIG. 2. Probability density function of the (thermalized) atoms forming the chain, i.e., theplannedtrajectory, of an isolated purposeful agent starting at (x,y) = (0,0) and intent on moving to the right. A snapshot of the chain configuration is depicted with circles, with colors representing the anticipated time fromt ′ =ttot ′ =T ant . The black dashed lines are the RMSD alongt ′ , as predicted by Eq. 21. due account of the specifics of our setting, with polymers fixed at one end and pulled towards the target at the other end. From now on, the exponentβin the bio- mechanical cost is set to 2,c v (v) =αv 2 , which will be the relevant value for our application to pedestrian crowds. The dynamics in artificial timeτthus obey: ∀n∈J1,N−1K, ∂r n ∂τ =− 2α dt (2r n −r n−1 −r n+1 ) +η(τ,t+ndt) (15a) ∂r N ∂τ =− 2α dt (r N −r N−1 ) +η(τ,t+T ant ) +F,(15b) where we arbitrarily setr 0 =0, out of convenience, and Fˆ= ∂C f ∂r n = 2κ v 0 ∂D g ∂r n is assumed to be constant for the time being, corresponding to a fixed heading direction. In schematic form, using Einstein’s summation convention, Eq. 15 reads∂r n /∂τ=M nm r m +.... Diagonalizing the matrixM nm gives eigenvalues λ p = 8α dt sin 2 2p+ 1 2N+ 1 π 2 , p∈J0, NK(16) and (oscillatory) eigenmodesu p (τ) such that ∂u p ∂τ =−λ p u p + ̃η p +α (N) p F,(17) where ̃η p is the transform ofη n in thep-basis. The trans- formation from then-basis to thep-basis is not a simple Fourier transform, because of our particular boundary conditions; it involves coefficientsα (n) p that satisfy r n (τ) = N X p=0 α (n) p u p (τ) andu p (τ) = N X n=0 α (n) p r n (τ). (18) Analytical details can be found in Appendix A. An Ornstein-Uhlenbeck process is then obtained by changing variables,u p −→ ̃ u p =u p + α (N) p κ p F. FIG. 3. Evolution in fictitious timeτof the RMSD of the first oscillatory mode of the polymer,u 0 , for different tem- perature gradients Θ. The RMSD have been normalized by their predicted values atτ=∞. The black dashed line is our theoretical prediction, with the characteristic timeτ 0 given by Eq. 19. The foregoing equation gives direct insight into the (os- cillatory) relaxation modes of the chains, in particular, the shortest and longest relaxation times τ 0 ≈ 2dtN 2 απ 2 , τ N ≈ dt 8α .(19) These times govern the choice of a suitable numerical time step, here dτ=τ N /10, and the duration of the ini- tial ‘equilibration’. Concretely, the system will initially thermalize forτ= 5τ 0 , att= 0. After this period, the positionr 1 of the first atom will be frozen; atom 0 will be destroyed and a new atom will be appended at the chain’s end, atr N ; and real-timet(and the temperature gradi- ent) will be shifted by dt, following the iterative scheme described in Sec. I F and Fig. 1; the thermalization will then start over again, adding one atom to the end of the last known polymer configuration. These subsequent thermalizations will be shorter:τ= 5τ 0 dt/t cor , drawing on the fact that it takes some (real) timet cor for a trajec- tory plan to drastically change. In terms of algorithmic complexity, it follows that the number of basic operations to evolve the chain (made ofNatoms) by one real time unit scales withO dtN 3 , that is,O T 3 ant /dt 2 . The polymer analogy also points to a caveat in the im- plementation, which will prove practically relevant and prickly: polymers may get entangled. In other words, in a complex environment, the chains may get trapped in a sub-optimal local trajectory basin during the equi- libration, for instance, a trajectory that unrealistically crosses a physical obstacle that cannot be perturbatively circumvented. Empirically, this issue was observed in the crossing of a cluttered environment (Sec. V D) when the density was high. When such crossings occur, the 8 polymer is truncated at then ⋆ -th atom after which the unphysical segment is observed. The atomsn⩾n ⋆ are then repositioned atr n ⋆ and thermalization restarts. B. Fluctuation amplitudes Following the qualitative arguments of Sec. I B, the amplitude of the white noiseηis chosen to increase quadratically with future timet ′ , starting from zero att, viz., ⟨η(τ,t+ndt)η(τ ′ ,t+mdt)⟩= 4Θ(ndt) 2 δ nm δ(τ−τ ′ ). (20) Solving Eq. 17 is somewhat more intricate than in the bona fideRouse model, due to our particular boundary conditions, but the mean squared displacement (MSD) of then-th atom (n≪N), derived in Appendix A, reduces to a simple approximate expression, ∆r 2 n ≈ 4 π 2 + 2 3 Θ α Ndt(ndt) 2 ≈ ΘT ant α (t ′ −t) 2 (21) The dependence onT ant notably stems from the higher thermal agitation at the chain’s end segment. The nu- merical root mean squared displacement (RMSD) results shown in Fig. 4 support the validity of the analytical derivation and (of course to a lesser extent) of its ap- proximation. The scaling law ∆r n ∼ndtcomforts our choice of a noise that grows at least quadratically in (anticipated) time; otherwise, themarginalincrease of the uncertainty on future positions would have been decreased with time. In light of these considerations, we define a dimension- less number,Pe −1 , to gauge how quickly the prediction precision decays with time, by comparing the RMSD ∆r n to the characteristic distancev 0 ndttraveled by the agent duringndt: Pe −1 ˆ= ∆r(t ′ ) v 0 (t ′ −t) = p ΘT ant /α v 0 .(22) We call this quantity a bare inverse P ́eclet number be- cause it measures the relative strength of diffusionvs. elasticity in a single polymer (hence the ‘bare’ qualifica- tion, as opposed to thedressednumber defined subse- quently in the presence of interactions between agents). Note that, had we chosen a faster growth of noise with time, the diffusion-over-elasticity ratio would not have been constant along the chain, but would have increased along it. From the perspective of the agent,Pe −1 cor- responds to the intrinsic positional uncertainty at a 1- meter horizon: the higherPe −1 , the more uncertain this future position. The parameterPeis thus a cursor that controls the agents’ anticipation capabilities, from com- pletely myopic agents (Pe= 0) to omniscient rational agents (Pe→∞). 01020 index n 0.0 0.5 1.0 1.5 2.0 r 2 n (m) Numerical results Analytical Linear approximation 1e-4 2e-4 5e-4 1e-3 2e-3 5e-3 1e-2 2e-2 FIG. 4. RMSD of the successive atomsnof the chain of an isolated agent in the long-time limitτ > τ 0 , for different temperature gradiens Θ. The linear approximation in dashed line corresponds to Eq.21, while the full analytical expression is shown in solid lines. Numerical results have been averaged over 100 realizations. BesidesPe −1 , two (dimensional) parameters suffice to fully determine the problem, e.g.,T ant andv 0 ; the above analysis enables us to deduce the other parameters (e.g., Θ,αandκ) from them. C. Effect of interactions between chains The foregoing reasoning only holds for an isolated chain.For a chain that evolves in a heterogeneous environment or interacts with other chains (i.e., other agents), the cost of Eq. 10 is complemented with an in- teraction costc int , viz. C= Z T t c v +c g +c int dt ′ ,(23) where we have omitted functional dependencies. The RMSD then deviates from Eq. 21. For example, we ex- pect smaller fluctuations (hence, a smallerdressedinverse P ́eclet number Pe −1 ) under strong spatial confinement, but larger ones (hence, a larger Pe −1 ) when the chain is subject to multiple interactions with its neighbors. This suggests a reduced anticipation horizon at higher densi- ties, which we shall confirm numerically in Sec. V C when the model is applied to pedestrians. That being said, owing to the analogy with dilute poly- mer solutions, the Rouse characteristic timesτ 0 andτ N introduced above are expected to still govern the relax- ation of individual chains, as long as entanglements re- main scarce and interactions are not too nonlinear. Ac- cordingly, we will keep the equilibration times defined above as a function ofτ 0 when we simulate interacting chains. Additional numerical concerns emerge in this inter- acting context. Overlaps between chains (i.e., prospec- tive ”collisions” between agents) should generally be pro- hibited, but may go numerically unnoticed when chains 9 0 t t+T ant a)b) c) d) FIG. 5. Simulated pedestrian trajectories in an ‘antipodal’ scenario, in which agents are initially on a circle of diame- ter 5 m and each one aims for the antipodal position. The pedestrian model is described in Sec. V.(a)Trajectories in space–time. Colors indicate the random fluctuation intensity; the plane in gray, at present timet ′ =t, separates the future from the past frozen trajectories.(b)Corresponding posi- tions (circles) att ′ =tand planned trajectories fort ′ ≥t, in space. Destinations are shown as crosses.(c)Snapshot of a 3D animation of the dynamics, created inUnity; the colors of the shaded circles coincide with those of the 2D trajectories. (d)Full trajectories, obtained by simulating the dynamics for t= 8 s. are discretized and leave some space between successive atoms. To avoid these spurious tunneling effects, inter- actions between chains will be evaluated as a function not of the distance between their respective atomsr n , but of the minimal distance between corresponding seg- ments [r n ,r n+1 ], which can readily be obtained numer- ically. The same method is applied to interactions with the environment (walls in the pedestrian case). D. Mean-field approach beyondT ant The reasoning developed in Sec. I C to approximate the cost beyondT ant can be generalized in the presence of interactions between chains as well as other forms of spatial dependence. BeyondT ant , in a mean-field spirit, we want to aver- age interactions along the chains over realizations, and to coarse-grain individual trajectories e qinto a continu- ous a density fieldρ(r). This could be achieved using the framework of mean-field game theory [11, 33], but here we opt for a much coarser, but simpler approach: we con- sider the fictitious-time-averaged positions of the ends of the other agents’ chains and insert a Gaussian halo at this position into the density fieldρ(r), blurring the halo all the more as the agent is far. More precisely, the standard deviation of the Gaussian with the expected time of in- teraction (as inferred from the effective distance) follows the RMSD law of Eq. 21. Interaction costs at a given prospective positionrare then weighted byρ(r), defin- ing an effective spatial potential Φ j (r), which represents agentj’s estimated cost for being atrin the future. A detailed derivation of this construction will be presented elsewhere. Given a spatial cost field Φ(r) — which can include target attraction, interactions, local discomfort, and en- vironmental heterogeneities — the final cost functional C f can be expressed as C f = Z T T ant αv(t ′ ) 2 + Φ(r(t ′ )) dt ′ .(24) Provided that the positions at the boundaries are fixed, namely, e q(T ant ) =r N and e q(T) =q g (whereq g is the lo- cation of the goal), optimizing the costC f in Eq. 24 comes down to extremizing the action of an inertial particle of mass 2αin a potential field−Φ. Thus, the Hamiltonian is constant along the optimal trajectory, H(t ′ ) =αv(t ′ ) 2 −Φ(r(t ′ )) = Φ(q g ) ˆ=0,(25) and the optimal speed reads v opt (r) = r Φ(r) α .(26) This result generalizes the expression used in Sec. I C, which corresponds to the specific choice Φ(r) =κ 1− χ q g (r . Changing integration variables dt= dr/v opt (r) in Eq. 24 yields a final cost C f = Z q g r N 2 p Φ(r) dr.(27) Numerically,C f is computed for any initial position r N , using the Fast Marching Method, which propagates a wavefront fromq g with an effective refractive index 2 p Φ(r) following the Eikonal equation; then, its gradi- ent is readily obtained. In passing, a remark about the negative sign in the po- tential−Φ is worthy of interest: While typical models for collision avoidance between pedestrians or robots [4, 34] posit repulsive interactions, the optimal trajectory here is that of a Newtonian particle interactingattractively with its neighbors. However, direct resolution of New- ton’s equations will obviously go astray, if one is not able to prescribe the initial position and velocity of the parti- cle with exquisite precision. V. APPLICATION TO PEDESTRIAN CROWDS A. Context of pedestrian dynamics This section is concerned with the application of our anticipatory framework to the modeling of crowd dynam- 10 ics. Over the past years, evidence has been amassed that pedestrians exhibit distinctive anticipatory skills, not only at the higher level of route choice, but also in their local navigation in various scenarios, from head-on encounters [35] to passing through a static crowd [11, 36] or circumnavigating small groups [37]. Agent-based mod- els for pedestrian dynamics typically account for such an- ticipatory capabilities (perceived through the lens of col- lision avoidance) by supplementing mostlyreactiveequa- tions of motion with specific forces to anticipate collisions [9, 12, 34, 38, 39] or constraints aimed at guaranteeing the absence of collisions [4, 15]. Most of the time, these corrections rely on a linear extrapolation of trajectories, i.e., on the assumption that current velocities are con- served [12, 39, 40]. Thus, they are bound to fail in sit- uations requiring more complex anticipatory behaviors, such as pedestrians crossing cluttered environments [18], or in the scenario sketched in Fig. 9, where one agent needs to stop in a side niche and let another one pass. Applying our broader anticipatory framework to pedestrians will both clarify some relatively fuzzy notions in the field, such as the decomposition of the dynamics into strategic, tactical and operational [41], and remedy many of the aforementioned deficiencies. Remarkably, we will see that even the fairly straightforward imple- mentation of the framework that we put forward outper- forms established models notably in a scenario involving crossing static crowds. The proposed model bears some resemblance with the (already discussed, see Sec. I G) adaptation of the CHOMP motion planning algorithm to pedestrian dynamics [20] (but here pedestrians are duly considered as autonomous agents) and, to a greater ex- tent, to Modi et al.’s pioneering work on handling pedes- trian trajectories as spacetime tubes [22] (but these re- searchers viewed the problem as an optimization problem under constraints, rather than delving into anticipation and the uncertainty that comes along with it). There is also some connection with machine-learning based mod- els, in which future pedestrian moves are probabilistically predicted with a neural network, to guide decisions of motion [21]. B. Cost and Specific Features Our starting point is that pedestrians strive to reach their goal (‘target’) as soon as possible, taking into ac- count penalties incurred along their paths. Put in math- ematical terms, each agentjstrives to minimize a gen- eralized travel time T j := Z T t c j (t ′ )dt ′ ,(28) where the running costc j (t ′ ) should vanish when the agent has reached the target area andTis a large upper time bound. Introducing the complementary indicator function ̄χ j (equal to 0 if the agent is in the target zone, 1 otherwise), the local running cost will thus comprise a penalty due to the built environment (κ ̄χ j (r j (t ′ ))), the biomechanical expenditure due to the instantaneous speed (c bm (|| ̇r j (t ′ )||) and penaltiesc int due to contact and to proxemic interactions with the neighbors, as follows c j (t ′ ) =κ ̄χ j (r j (t ′ ))+c bm (|| ̇r j (t ′ )||)+c int (r 1 (t ′ ),r 2 (t ′ ),...). (29) For an isolated agent walking at constant speed in uni- form space, we notice thatTT j is simply proportional to the time to reach the target area, as expected. In the following, we detail and discretize in time the different contributions. 1. Target cost For numerical purposes, it is convenient to smooth the (discontinuous) ̄χ j in space, viz. ̄χ j (r)≃1−exp − |r−q g | 2 2λ 2 ,(30) whereλshould be of the order of magnitude of the small- est typical pedestrian length scale set to 0.1 m. The tar- get cost enters the dynamics both through the final cost, which drives the chains toward the target, and through the gradient of the Gaussian well, which stabilizes the atoms in the vicinity of the target once it has been reached 2. Bio-mechanical cost This cost represents the energetic expenditure associ- ated with maintaining a walking speedv. Experimen- tally, by measuring oxygen consumption, it was found to increase quadratically with speed [42], c bm (v) =cst+αv 2 .(31) The chosen parametersαandκcontrol the preferred speed of the pedestrian. As described in Eq. 5 forβ= 2, v opt = p κ/αwherev opt is a given parameter that de- pends on the pedestrian, usually ranging from 1 m s −1 to 1.5 m s −1 . Since the total cost is defined up to a multi- plicative constant,αcan be set to 1 2 andκis deduced fromv opt . 3. Perception and interactions between agents Following common practice in pedestrian dynamics, the interactions between agents are divided into two con- tributions, contact interactions and social ones: c j←i int (s ij ) =c j←i contact (s ij ) +c j←i social (s ij ).(32) where the interaction depends on the anticipated spacing s ij =||r i (t ′ )−r j (t ′ )||−R i −R j between the agents, of 11 radiiR i andR j , at timet ′ . Here, additive pair-wise interactions have been assumed, as the total interactions cost is summed overj. In practice the quick spatial decay ofc j←i int will ensure that the closest agents dominate the interaction. The contact contribution, the first term, is activated only when the spacings ij is negative, hence the use of a Heaviside function Θ, and it is modeled as a soft-sphere contact between supposedly deformable human bodies: c j←i contact (s ij ) =b contact Θ(−s ij )s 2 ij .(33) For the second term, the (anticipated) social interac- tions between an agentjand other agentsiare affected by howjperceives them and anticipates their evolution through space. This was integrated into a perception warpingfunctionπ j t ′ in the general context of Sec. I C. Here, to keep the model as simple as possible, we re- duce these considerations to whether other agentsiare, or not, in the visual cone ofjat present timetand ac- cordingly we modulate the interaction strengths with a smooth function cos + (θ ij ) = max (0,cosθ ij (t)) of the an- gle between agentj’s current direction and agenticur- rent position relative toj: c j←i social (s ij ) =b social cos + (θ ij ) exp −s ij σ ij .(34) This term represents the longer-range proxemic interac- tion [34, 43], whereby an agent is intent on preserving their ‘social bubble’ of characteristic sizeσ ij . The coefficientsb social andb contact should satisfy: 0< b social ≪b contact δ 2 r (withδ r ≪R); they have been ad- justed by considering a schematic scenario of face-to-face avoidance. 4. Obstacle avoidance cost Prohibited regions in the environment (walls, obsta- cles, ...) impact the dynamics of chains in the same way as contacts with other pedestrians, i.e., via soft-sphere in- teractions, but, for computational efficiency, these costs and their gradients are pre-computed on a fine-mesh lat- tice: obstacles are defined on a lattice and at every lat- tice node the distance to the nearest obstacle is (pre)- computed using the Fast Marching algorithm described in Sec. IV D. C. Fundamental diagrams A key quantity in applied crowd dynamics [44–47], the fundamental diagram relates the average speed or flow of a crowd to the pedestrian density in given settings (this is the counterpart of constitutive equations in Mechanics). The speed is approximately constant in the low-density, free-flow regime, and then decreases with density. This TABLE I. Parameters of the model applied to pedestrian dy- namics. SymbolDefinitionValue Agent parameters Rradius[0.15,0.25] m v 0 Preferred speed[1,1.5] m s −1 αBiomechanical prefactor1/2 κAttraction toward the targetαv 2 0 λWidth of target well0.1 m Interaction parameters σSocial interaction range0.2 m b social Social repulsion coefficient 1 b contact Contact repulsion coefficient 300 m −2 b obstacles Obstacle repulsion coefficient 300 m −2 Simulation parameters dtTime step[0.1,0.2] s Pe −1 Bare inverse P ́eclet number [0.05,0.1] T ant Chain length (in time)[2,8] s dτFictitious time stepdt/80α leads to an increase of non-monotonic fundamental dia- gram for the flow, which increases at relatively low den- sities, before reaching a peak and falling off. Let us consider the fundamental diagram in unidirec- tional and bidirectional flows in a corridor of width 2.5 m (i.e., wide enough to have several pedestrians walk side by side) and (periodic) length 10 m. These scenarios were simulated with a crowd of agents of non-uniform radii, randomly drawn from a normal distribution with mean R= 0.22 m and standard deviation 0.02 m. For compati- bility with the periodic boundaries along the longitudinal axis, the agents’ targets are constantly relocated 4 m in front of them, like a carrot in front of a donkey. t = 0.0 s t = 11.0 s t = 40.0 s FIG. 6.Lane formation in a bidirectional corridor flow (Pe −1 = 0.05): snapshots att= 0 s,11 s,40 s. The cor- ridor is 10 m long in the horizontal (periodic) direction and 2.5 m wide; the density isρ= 1.8 Ped/m 2 (44 agents). 12 Snapshots of the simulations are shown in Fig. 6, at different times, from the random initial configuration to the steady state. In the bidirectional flow conditions, we observe the formation of lanes; this well documented phe- nomenon is present in a variety of related systems, such as driven binary mixtures [48, 49], as well as in the ba- sic social force model [34]. However, it is worth noticing that in our simulations lanes are not always stable, in par- ticular for densities close to the critical density (beyond which the crowd does not move). Thus, thesteady state is not truly stationary. Besides, the characteristic time required for lane formation increases as the system ap- proaches the critical density, suggesting a slowing-down behavior reminiscent of the divergence of the character- istic times at phase transitions in binary active liquids [50]. 0.0 0.5 1.0 1.5 V (m/s) a) Unidirectional Bidirectional Zhang Mori c = 2.2 (P/m 2 ) 0.00.51.01.52.02.5 (P/m 2 ) 0.0 0.1 0.2 0.3 Pe 1 Bare Pe 1 b) Pe 1 T ant 0 2 4 6 T ant ( s ) FIG. 7. Unidirectional and bidirectional corridor flows.(a) Fundamental diagram, relating the average longitudinal speed to the pedestrian density. Error bars: standard error, among 10 realizations for the bidirectional case and 2 realizations for the unidirectional case. Experimental measures from Zhang et al.[44] and M ̄ori and Tsukaguchi [51] are shown for com- parison.(b)Dressed Pe −1 (computed from the RMSD mea- sured during equilibration) and associated effective anticipa- tion time T ant obtained via Eq. 35, as a function of density. Refer to Fig. 6 for details about the corridor geometry. The bare P ́eclet number was fixed atPe −1 = 0.05. The fundamental diagrams presented Fig. 7a are ob- tained by running such simulations at various densities and measuring the average longitudinal speed after 50 s. In the low-density region, they agree well with experi- mental measurements [44, 51], without anyad hocad- justment. They reproduce the gradual decay from the free-flowing speed (as do many other pedestrian mod- els).Then the mean speed is found to plummet to zero at a critical densityρ c = 2.2 Ped/m 2 , with large error bars that echo the aforementioned absence of a truly stationary steady state in this region. This criti- cal density is much lower than densities at which crowds are still found to move experimentally and empirically (4 Ped/m 2 to 8 Ped/m 2 ) [47]. As in other models [14], this is most probably due to the circular shape of the agents, which enhances surface coverage, hence excluded- volume effects, and also bars torso rotations and other anisotropic behaviors whereby real pedestrians can tem- porarily reduce their effective cross section. Figure 7b presents a more original perspective on these corridor-flow experiments, by showing how theeffective anticipation horizon T ant , defined by t ∆r(t+ T ant )≃ℓ (whereℓ= 0.5 m is a characteristic length), evolves with density. In practice, we first measure the polymer fluc- tuations att= 0 during the Langevin dynamics, deduce the dressed Pe −1 from Eq. 22, and then find T ant from the relation: ℓ= ∆r(t+ T ant ) = Pe −1 v 0 T ant .(35) In Fig. 7b, we see that the dressed inverse P ́eclet number Pe −1 is equal to its bare counterpart (Eq. 22) at vanish- ing density, but then grows with density, while the antici- pation time concomitantly decreases from approximately T ant = 7 s to T ant = 1 s. These evolutions are caused by enhanced fluctuations of the chains, which we explain as follows: As congestion increases, possible paths around neighbors start to proliferate and individual trajectories become less predictable. D. Constrained navigation and cluttered environments Properly modeling anticipatory dynamics plays a more important part in the complex scenarios with multiple in- teracting agents or cluttered environments that we probe in this section. 1. Antipodal configuration First consider a scenario [52], in which pedestrians are initially spaced along a circle and are asked to walk to the antipodal position. This antipodal scenario is known to raise intense conflicts between agents at the center, hence issues for models. Even when models avoid deadlocks thanks to the integration of some level of anticipation [4, 9, 15], they often produce trajectories that deviate from a straight line (along the diameter) only quite late, or that are highly symmetric between agents, as though the collective motion has been harmoniously organized. By contrast, the trajectories generated with our model, displayed in Fig. 5d, feature detours that are undertaken 13 quite early, as soon as the agents leave their initial posi- tions, in anticipation of the congestion that will arise in the central zone. To give an estimate of the computational cost, the sim- ulation of the 10-pedestrian scenario takes slightly longer than real time (≈10 s) on a CPU. The computational cost, however, scales with the square of the number of pedestrians due to the increasing number of pairwise in- teractions, and increases further when the time step dt is reduced to achieve a more accurate description of con- tact interactions (as requried to describe the metro exit in Sec. V G). At this stage, we have not made substantial efforts to optimize or parallelize the code; still, all simu- lations presented in this article ran in reasonable times, typically within a few hours. 5 m a) 0123 0.0 0.5 1.0 1.5 g(r) b) c) 0123 r (m) 0.0 0.5 1.0 1.5 g(r) d) Model Experiment FIG. 8. Crossing a static crowd.(a, c)Experimental trajec- tories measured by Wang et al. [53] (in blue) and their numer- ical counterparts (in red) at (a) low densityρ= 0.6 Ped/m 2 and (c) high densityρ= 1.6 Ped/m 2 .(b, d)Pair distribu- tion functions (pdf)g(r) between the crossing pedestrian and the static ones, computed from experimental data (in blue) and numerical simulations (in red).g(r) =G(r)/G NI (r) was normalized byG NI (r), the pdf obtained using the same static configuration, but crossing trajectories from uncorrelated tri- als. The baselineg(r) = 1 is shown in green. Simulations were performed atPe −1 = 0.1, with a pedestrian radius r= 17 cm. Results for other densities are displayed in Ap- pendix B, Fig. A1,A2 2. Crossing of a static crowd A second, more complex scenario consists in crossing a cluttered space. Wang et al [53] investigated this scenario experimentally by asking participants to cross one-by-one a confined area cluttered with static pedestrians as ob- stacles. These obstacles will be modeled as non-moving agents, standing at the same positions as in the exper- iments. In [18], we showed that prominent models for pedestrian dynamics utterly fail to capture the crossing motion, above some (modest) density of static agents, even if the agents’ radii are set to barely 10 cm; many agents end up in ‘dead ends’ because of too short-sighted anticipation. To simulate these scenarios, we initialize the crossing agents at the same initial positions as participants in the experiments (on the right-hand side in Fig. 8a,c), and we set their target as a destination zone located on the opposite (left-hand) side of the confined area. The sim- ulated trajectories for a sparse static crowd and for a denser one are shown Fig. 8a,c and compared to the ex- perimental ones. Contrary to what we had found with existing models [18], all simulated agents manage to cross the crowd, even in the denser case. Furthermore, on the whole, the simulated trajectories are similar to the ex- perimental observations. Note, however, that theexperi- mentaltrajectories (but not the simulated ones) tend to bend downwards close to the exit, on the left, probably because the instruction given to participants to resume their starting positions introduces a bias. For a finer-scale comparison centered on interpersonal distances, we plot the radial pair distributionsg(r) be- tween the crossing pedestrian and the static individuals in Fig. 8b,d;g(r) ˆ=G(r)/G NI (r) was normalized by the pair distributionG NI (r) obtained using the same static crowd configuration, but crossing trajectories from other realizations, so that the baselineg(r) = 1 corresponds to situation without interactions. Once again, model and experiments are found to agree relatively well, with a dip in the vicinity ofr= 0 due to short-range repulsions, followed by a peak. The rise fromr= 0 is smoother in the experiments (where the static pedestrians are of course not circular), whereas in the model they rise more sharply atr= 17 cm because of the soft-sphere contact interactions which strictly prevent overlaps. Nonethe- less, the results show that, even though our focus was on anticipation and we only used very simple interaction terms between circular objects in the cost function, the model accurately captures pedestrian behavior at the in- dividual scale. Similar results are obtained for the other scenarios tested in [53] with static crowds, as shown in Appendix B. We also confirmed that the model gives re- alistic results in the scenarios in which the crowd is not static, but moving (not shown). 3. Anticipation in a narrow corridor Thirdly, we investigate a scenario in which anticipa- tion may be even more critical, because of geometric constraints: two pedestrians have to pass one another in a very narrow corridor with a small niche on one side (see Fig. 9). One pedestrian needs to anticipate suffi- ciently far ahead to understand that the most only viable strategy is to wait in the niche and let their counterpart pass, before moving forward. This nontrivial strategy is successfully adopted by the simulated agent (in blue in 14 Fig. 9), without prescribing any additional rule to enforce yielding. 012345 x(m) 0 1 y (m) FIG. 9. Agents walking in opposite directions in a one-person- wide corridor with a side niche (Pe −1 = 0.1). The agents’ positions att= 0 s (transparent disks) andt= 5 s (opaque disks) are displayed; the full trajectories are shown as lines. E. Tactical route choice Pedestrian dynamics usually makes the distinction be- tween three levels of path planning: strategic, tactical, and operational, each of them acting on a different time and length scale. The strategic level defines the macro- scopic framework of crowd organization, including large- scale decisions such as scheduling, global route design, and transportation logistics. At the tactical level, the fo- cus shifts to intermediate-scale processes, namely route choice and collective guidance mechanisms. Finally, the operational level describes the microscopic dynamics, ad- dressing individual motion and local interactions within the crowd. Our anticipatory framework shines a new light on this decomposition [40], through the lens of uncertainty. One transits from the operational to the tactical level when agents can no longer anticipate localized trajectories but make decisions based on averaged density fields, i.e., at the effective anticipation horizon T ant . At even higher levels of uncertainty (not considered in this paper), the very geometry of the environment gets blurred and spe- cific routes can no longer be distinguished; in other words, temperature is so high that the polymer chains may cross walls. This marks the entrance into the strate- gic level, where choices are made on the basis of a coarse generalized travel time or cost. Here, we show that the seamless articulation between the operational and tactical levels in the proposed frame- work efficiently solves modeling issues in concrete situa- tions. For that purpose, we turn to the field study con- ducted by Gabbanaet al.[54] at the GLOW light festi- val in Eindhoven, in the Netherlands. As illustrated in Fig. 10a, a unidirectional pedestrian flow is confronted with an asymmetric route choice dilemma, either going straight (routeA) or making a detour around a large support pillar (routeB). While virtually all pedestrians choose routeAat low enough density, a growing fraction select the longer routeB, as the crowd gets denser and congestion emerges. This choice is anchored in tactical 2.5 m Measurement area B A a) 0.000.250.500.751.001.251.50 (P/m 2 ) 0.0 0.5 1.0 A / B (P/m 2 ) b) Simulations Field data FIG. 10. Route choice depending on the density.(a)Sketch of the geometry studied on the field by Gabbana et al. [54] and reproduced numerically here (with periodicity along the horizontal axis). Pedestrians walk to the right and may choose a shorter, but possibly more congested route (A) or a longer one (B); the two are separated by a support pillar (black disk). (b)Densities of pedestrians selecting routesAandB, as a function of the total pedestrian density in the measurement area. The dashed line indicatesρ A/B =ρ. reasoning that extends over at least∼10 seconds and meters, balancing travel distance against the expected local density. Figure 10b proves that, without any specific adjust- ment, the model reproduces the empirical trends: Below an intermediate densityρ≈0.8 Ped/m 2 , virtually every- body chooses routeA, whereas above this threshold more and more pedestrians opt for routeB, with proportions that are broadly captured by the model. This shows that our mean-field approach is able to fill the gap between the operational and the tactical level. The mean-field, ‘tacti- cal’ approach implemented beyondT ant (Sec. IV D) was crucial to reproducing these observations. When pedes- trians are still 5 m-10 m upstream of the pillar, the last atom of their polymer chain, att ′ =t+T ant , reaches the bifurcation point and is guided towards either of the paths by the gradient of the terminal cost, which relies on a continuous, mean-field description of upcoming den- sities. Thus, routes are chosen in light of the anticipated congestion along them, rather than on the sole basis of local interactions. F. Low-speed limit of the cost and halting So far, the model ingredients have been kept minimal to show that a fairly generic implementation of the frame- work is already practically efficient. However, a further asset of the general formalism is that the cost function can readily incorporate additional features in order to account for specific, possibly complex behaviors. Let us first focus on halts along walks. It so happens that pedes- trians usually prefer stopping for a few seconds before 15 walking again, rather than walking very slowly (‘shuf- fling their feet’). As a matter of fact, this phenomenon naturally emerges from the model, as soon as one pays attention to the constant in the bio-mechanical cost of Eq. 31. In- deed, there is actually an extra energy expenditure for setting to walk, even at vanishing speed [42]. Numer- ically, handling a discontinuity in the cost atv= 0 is inconvenient, so we smooth it using a polynomial expres- sion belowv ∗ = 0.5 m s −1 (see Fig. 11a): FIG. 11.(a)Bio-mechanical costc bm (v) without drop atv= 0 (‘Quadratic cost’) or with a smoothed discontinuity atv= 0 (‘Regularized cost’), as defined in Eq. 36.Inset:derivative of the cost (used in the cost gradient).(b–c)Simulation of walking agents crossing a standing crowd located in a 17 m× 3 m rectangle. Probability distributions of the speeds of(b) standing agents,(c)crossing agents. c bm (v) = 2αv ∗ 2 v v ∗ 4 −3 v v ∗ 3 + 3 v v ∗ 2 ,ifv < v ∗ α(v 2 +v ∗ 2 ),otherwise. (36) The ensuing steep derivative at low speed (inset of Fig. 11a) has an effect similar to a discontinuity. Simulating a stream of pedestrians walking through a group of standing pedestrians in a rectangular area, we find a distribution of speeds that markedly differs depending on whether drop of the bio-mechanical cost atv= 0 is discarded (Eq. 31) or smoothly integrated (Eq. 36). In the former case, standing agents (Fig. 11b) slowly drift due to the social interactions, whereas they stay almost still in the latter case.Walking agents (Fig. 11c) are also affected: agents that yield to let an- other one pass first may exhibit arbitrary low speeds in the rangev= 0 m s −1 tov=v ⋆ if the cost drop at standstill is not implemented, whereas they halt when it is. Accordingly, the ‘regularization’ of the cost makes it more favorable to stop to let another pedestrian pass than to shuffle one’s feet all along, and (for agents at rest) to not move unless the perturbation is large enough. G. Applied example of a metro exit Finally, we consider the integration of impatience, or time-dependent motivation [55], to render a complex sce- nario of direct relevance for applications of crowd dynam- ics to the design of transport infrastructures: alighting and boarding a subway train. A real (two-dimensional) train geometry is reproduced in Fig. 12 and a crowd of 80 passengers is randomly placed inside it, as though it were morning rush hour. When the doors open, at t= 0, 16 passengers will strive to alight while the oth- ers want to stay onboard. To account for the mounting pressure to alight or to be onboard before the doors close, att=T close , we make the prefactorκin the target cost (Eq. 29) time-dependent: κ(t) =κ 0 · 1 + 2t/T close 2 .(37) In the absence of interactions, this leads to a time- dependent optimal speedv opt =v 0 (1+2t/T close ); passen- gers maypushthree times stronger to elbow their way to the exit astreachesT close . Interesting features can be observed in the dynamics shown in the Supplemental video and sketched in Fig. 12. Overall, the dynamic patterns in this complex scenario are quite realistic, as far as one can judge with the naked eye. In detail, we observe that some passengers far from the doors, such as the purple one between two seats, eventually become impatient enough, i.e., reach a high enough value ofκ, to manage to make their way to the exit through a large and dense passenger crowd. Equally interesting is the seemingly cooperative mo- tion of non-alighting passengers who move transversely to give leeway to alighting agents, or may even choose to temporarily step out of the train. These behaviors are obtained without explicit incentives for cooperation, nor any specific psychological factor apart from Eq. 37. Unlike in other models, the agents are not shoved aside by others pushing them, but act in light of what they anticipate. Note that transverse motion to let an in- truder through had already been captured using a mean- field game approach [11], but the finer granularity of our agent-based model represents a leap forward in the sim- ulation of complex scenarios. VI. CONCLUSION Starting from fundamental considerations, we have in- troduced a delineation between reactive agents and an- 16 Initial positions Trajectories FIG. 12. Simulations of passengers alighting from a realistic crowded subway train, whose walls and seats are shown in gray. 80 agents are initially randomly distributed in the train and 16 of them (in red) intend to alight; the others (in blue) want to stay onboard. The trajectories of a selection of pedestrians are shown to illustrate the avoidance behavior of the agents in blue and the paths followed by agents in red. For red agents, the coefficientκin the final cost increases linearly with time, accounting for the growing urgency to leave the train before the doors close. ticipatory ones, whose present-time dynamics depend on the prospective system state as they anticipate it thanks e.g. to an internal model. These dynamics can be ex- pressed in terms of a ‘cost’ function; we expose how this cost, rather than being postulateda prioriunder of a rational hypothesis, can be constructed on the basis of observations. In this framework, the dynamics of an an- ticipatory agent inddimensions can be mapped onto the dynamics of a (non-anticipatory) chain ind+ 1 dimen- sions; the seemingly complex problem of concurrent path planning by multiple agents thus reduces to the search for satisficingchain configurations in an augmented space of dimensiond+ 1. Uncertainty about the future state of the system is mirrored by fluctuations acting transversely on the chain, more precisely, by subjecting the succes- sive positions that form the chain (once discretized into a polymer-like object) to non-uniform temperatures. Building on this polymer analogy opened the door to an analytical characterization of the fluctuations and temporal dynamics of these objects, notably in terms of a dimensionless P ́eclet number. In the very short term, i.e., up to an anticipation horizon, trajectories are local- ized enough for inter-agent interactions to be resolved individually. The blurry future, beyond the anticipation horizon, is handled in a mean-field way. We applied the resulting unified framework to pedes- trian dynamics. Thanks to the consistent bridge between short-term and long-term anticipation, the operational and tactical levels have been integrated seamlessly in an agent-based model which naturally accounts for tacti- cal processes such as route choice while maintaining the granularity that is necessary to resolve complex scenarios. Even with a simple, generic expression of the cost, the model was shown to perform well and reproduce experi- mental results in several scenarios that were particularly challenging to existing models, such as cluttered environ- ments; agents are able to sacrifice their very short-term interests, keeping an eye on their final goal. Interest- ingly, the effective anticipation horizon is not fixed, but gets shorter at higher density, reflecting the lower pre- dictability of the system. The complex trajectories generated by the model do not stem from intricate specifications of the cost or pro- fuse rules, but emerge from the collective anticipatory dynamics. Nonetheless, specific features can readily be incorporated into the cost to describe particular situa- tions. For example, including proximity costs to main- tain the cohesion of social groups would be a valuable future extension. The mean-field approach, beyond the anticipation horizon, also suffers from some limitations, which could be remedied, to begin with, by enforcing ad- vection of the density field. From a fundamental perspective, being able to mir- ror ‘psychological processes’ such as the perception of neighbors or anticipation with well-known physical pro- cesses in space-time instills the hope that the machinery of Physics can be deployed to study the dynamical im- plications of these processes. Our findings open up new perspectives on anticipatory systems that could benefit diverse fields of research, from Active Matter Physics to Animal Behavior and Robotics. If the profuse past studies on their counterparts, namely, dynamical systems with memory, are anything to go by, vast swaths of future research territories may open for anticipatory systems. ACKNOWLEDGMENTS We acknowledge financial support from Agence Na- tionale de la Recherche through project MUTATIS (ANR-24-CE22-0918). AN thanks Jakob CORDES for his early input into the project. 17 Appendix A: Calculations of the mean-squared displacement of a polymer chain in a temperature gradient 1. Projection of the atom displacements on the dynamic eigenmodes The dynamics of theN+ 1 ‘atoms’ forming the polymer, pinned atr 0 =0at one end and pulled by a force at the other end, are governed by theNlinear stochastic differential equations of Eq. 15 of the main text. We look for coefficientsα (n) p which diagonalize the matrixM nm representing the elastic part of these equations: ( α (n+1) p +α (n−1) p −2α n p =− e λ p α (n) p α (N−1) p −α (N) p =− e λ p α (N) p , (A1) where we have setα (0) p = 0 for convenience and defined e λ p = dt 2α λ p (we will drop the tildes in the following). We surmise thatα (n) p ∝sin (k p n+φ p ), withφ p = 0 because of the fixed boundary condition. This leads to: sin k p (n+ 1) + sin k p (n−1) −2 sin k p n =−λ p sin k p n (A2a) sin k p (N−1) −sin k p N =−λ p sin k p N .(A2b) By factorizing the sum of the two sines in the first equation and then dividing by sin (k p n), we get: λ p = 2· 1−cosk p = 4 sin 2 k p 2 .(A3) Rewriting Eq. A2b as −2 cos k p (N− 1 2 ) sin k p 2 =−4 sin 2 k p 2 sin k p N cos k p (N− 1 2 ) = 2 sin k p 2 sin k p N cos k p (N− 1 2 ) = cos k p N− k p 2 −cos k p N+ k p 2 cos k p · 2N+ 1 2 = 0,(A4) we arrive at: k p = 2p+ 1 2N+ 1 π;α (n) p ∝sin 2p+ 1 2N+ 1 nπ .(A5) Finally, we choose the following normalization α (n) p = 2 sin 2p+1 2N+1 nπ √ 2N+ 1 ,(A6) so that P N n=0 α (n) p α (n) q =δ pq , as we prove in the next subsection. 18 2. Calculation of the normalization constant for theα (n) p With the foregoing normalization, we verify that, for all non-negative integersp, q, N X n=0 α (n) p α (n) q = N X n=0 4 2N+ 1 ·sin 2p+ 1 2N+ 1 nπ ·sin 2q+ 1 2N+ 1 nπ (A7) = 4 2N+ 1 · −1 4 N X n=0 n e isn +e −isn −e idn −e −idn o = −1 2N+ 1 n N X n=−N h e is i n − N X n=−N h e id i n o = 1 2N+ 1 (2N+ 1)δ pq =δ pq , where we have introduced the shorthandssˆ= 2(p+q+1) 2N+1 πanddˆ= 2(p−q) 2N+1 π. 3. Correlation of the noise modes with quadratic temperature Let us calculate the correlation between two modespandqof the noise term in our Langevin equation Eq. 18: ⟨ ̃η p (τ) ̃η q (τ ′ )⟩= N X n=0 N X m=0 α (n) p α (m) q ⟨η n η m ⟩(A8) = 4Θdt 2 N X n=0 N X m=0 α (n) p α (m) q ·n·m·δ nm ·δ(τ−τ ′ )(A9) = Θdt 2 δ(τ−τ ′ ) N X n=0 4n 2 α (n) p α (n) q .(A10) Now, let us introduce S(s,d) = −1 2N+ 1 n N X n=−N e isn − N X n=−N e idn o (A11) and notice that, in the light of Eq. A7, forp̸=q, g pq ˆ= N X n=0 4n 2 α (n) p α (n) q =−4 ∂ 2 S ∂s 2 −4 ∂ 2 S ∂d 2 = 4 2N+ 1 · n ∂ 2 ∂s 2 h sin((N+ 1 2 )s) sin( s 2 ) i − ∂ 2 ∂d 2 h sin((N+ 1 2 )d) sin( d 2 ) io = 4· n 0 + −cos (N+ 1 2 )s cos( s 2 ) 2 sin 2 ( s 2 ) + cos (N+ 1 2 )d cos( d 2 ) 2 sin 2 ( d 2 ) o = 2·(−1) p+q · h cos( s 2 ) sin 2 ( s 2 ) + cos( d 2 ) sin 2 ( d 2 ) i ,(A12) where we have used the fact that, at the evaluation point, sin((N+ 1 2 )s) = 0 and sin((N+ 1 2 )d) = 0. In the limit p, q≪N, g pq ≈(−1) p+q · 2 π 2 ·(2N+ 1) 2 · h 1 p+q+ 1 2 + 1 p−q 2 i (A13) 19 Forp=q < N, asd= 0, the second term inS(s,d) cannot be expressed in the same way. Instead, we have g p ˆ=4 N X n=0 n 2 α (n) p α (n) p =−4 ∂ 2 S ∂s 2 + 4 2N+ 1 N X n=0 2n 2 (A14) = 2· cos( s 2 ) sin 2 ( s 2 ) + 4 3 ·N·(N+ 1).(A15) In the limitp, q≪N, g p ≈ 2 π 2 · 2N+ 1 2p+ 1 2 + 4·N·(N+ 1) 3 .(A16) Finally, the casep=q=Nis straightforward:g N = 0. 4. Mean-square displacements We can now integrate the Ornstein-Ulhenbeck process (Eq. 17) to find the correlation between modespandq(in p-space): ⟨(u p (τ)−u p (0))((u q (τ)−u q (0))⟩= Z τ 0 Z τ 0 ⟨ ̃η p (τ ′ ) ̃η q (τ ′ )⟩e − τ−τ ′ τ p e − τ−τ ′ τ q dτ ′ dτ ′ =g pq Θdt 2 Z τ 0 e −(τ−τ ′ )( 1 τ p + 1 τ q ) dτ ′ =g pq Θdt 2 Z τ 0 e −(τ−τ ′ )(κ p +κ q ) dτ ′ = g pq κ p +κ q Θdt 2 h 1−e −τ(κ p +κ q ) i .(A17) This enables us to calculate the mean-squared displacement of then-th atom in real space: D (r n (τ)−r n (0)) 2 E = N X p=0 N X q=0 α (n) p α (n) q D (u p (τ)−u p (0)) ((u q (τ)−u q (0)) E = Θdt 2 N X p=0 N X q=0 α (n) p α (n) q g pq κ p +κ q 1−e −τ(κ p +κ q ) .(A18) Thus, after the initial transient, whenτ→∞, the mean-square displacement tends to ∆r 2 n ≈Θdt 2 (α (n) 0 ) 2 g 00 τ 0 2 ≈ 4 π 2 + 2 3 Θ dt 2 n 2 Ndt α ,(A19) where the last approximation holds forn≪N. Appendix B: Complete set of simulations corresponding to the static crowd crossing experiments 20 N = 5 N = 10 N = 15 N = 20N = 25 N = 30N = 35N = 40 N = 45 N = 50 FIG. A1. Experimental trajectories measured by Wang et al. [53] (in blue) and their numerical counterparts (in red) at various densities. Refer to Fig. 8 for the rest of the caption. N = 5 N = 10 N = 15 N = 20N = 25 N = 30N = 35N = 40 N = 45 N = 50 FIG. A2. Pair distribution functions (pdf)g(r) between the crossing pedestrian and the static ones, computed from experimental data (in blue) and numerical simulations (in red), at various densities. Refer to Fig. 8 for the rest of the caption. [1] J. Adrian, M. Amos, C. Appert-Rolland, M. Baratchi, N. Bode, M. Boltes, T. Chatagnon, M. Chraibi, A. Corbetta, A. Cuesta,et al., Glossary for research on human crowd dynamics, Collective Dynamics10, 1 (2025). [2] M. D. Bownds and D. Bownas,The biology of mind: Origins and structures of mind, brain, and consciousness(Fitzgerald Science Press Bethesda, MD, 1999). [3] T. Suddendorf and J. Redshaw, Anticipation of future events, inEncyclopedia of animal cognition and behavior(Springer, 2022) p. 349–358. [4] J. Van den Berg, M. Lin, and D. Manocha, Reciprocal velocity obstacles for real-time multi-agent navigation, in2008 IEEE international conference on robotics and automation(Ieee, 2008) p. 1928–1935. [5] N. Ratliff, M. Zucker, J. A. Bagnell, and S. Srinivasa, Chomp: Gradient optimization techniques for efficient motion planning, in2009 IEEE international conference on robotics and automation(IEEE, 2009) p. 489–494. [6] M. Marchetti, J. Joanny, S. Ramaswamy, T. Liverpool, J. Prost, M. Rao, and R. A. Simha, Hydrodynamics of soft active matter, Reviews of Modern Physics85, 1143 (2013). [7] F. A. Lavergne, H. Wendehenne, T. B ̈auerle, and C. Bechinger, Group formation and cohesion of active particles with visual perception–dependent motility, Science364, 70 (2019). 21 [8] A. V. Ivlev, J. Bartnick, M. Heinen, C.-R. Du, V. Nosenko, and H. L ̈owen, Statistical mechanics where newton’s third law is broken, Physical Review X5, 011035 (2015). [9] I. Karamouzas, B. Skinner, and S. J. Guy, Universal power law governing pedestrian interactions, Physical review letters 113, 238701 (2014). [10] J. Cordes, A. Schadschneider, and A. Nicolas, Dimensionless numbers reveal distinct regimes in the structure and dynamics of pedestrian crowds, PNAS nexus3, pgae120 (2024). [11] T. Bonnemain, M. Butano, T. Bonnet, I. Echeverr ́ıa-Huarte, A. Seguin, A. Nicolas, C. Appert-Rolland, and D. Ullmo, Pedestrians in static crowds are not grains, but game players, Physical Review E107, 024612 (2023). [12] Q. Xu, M. Chraibi, and A. Seyfried, Anticipation in a velocity-based model for pedestrian dynamics, Transportation research part C: emerging technologies133, 103464 (2021). [13] D. Wolinski, M. C. Lin, and J. Pettr ́e, Warpdriver: context-aware probabilistic motion prediction for crowd simulation, ACM Transactions on Graphics (TOG)35, 1 (2016). [14] I. Echeverr ́ıa-Huarte and A. Nicolas, Body and mind: Decoding the dynamics of pedestrians and the effect of smartphone distraction by coupling mechanical and decisional processes, Transportation Research Part C: Emerging Technologies157, 104365 (2023). [15] J. Van Den Berg, S. J. Guy, M. Lin, and D. Manocha, Reciprocal n-body collision avoidance, inRobotics Research: The 14th International Symposium ISRR(Springer, 2011) p. 3–19. [16] A. Morin, J.-B. Caussin, C. Eloy, and D. Bartolo, Collective motion with anticipation: Flocking, spinning, and swarming, Physical Review E91, 012134 (2015). [17] P. Szab ́o, M. Nagy, and T. Vicsek, Transitions in a self-propelled-particles model with coupling of accelerations, Physical Review E—Statistical, Nonlinear, and Soft Matter Physics79, 021908 (2009). [18] A. Raulin-Foissac and A. Nicolas, The highs and lows of short-term anticipation in models for pedestrian dynamics: From groping to probing the imminent future, inEPJ Web of Conferences, Vol. 334 (EDP Sciences, 2025) p. 04023. [19] S. Hoogendoorn and P. HL Bovy, Simulation of pedestrian flows by optimal control and differential games, Optimal control applications and methods24, 153 (2003). [20] B. D. Ziebart, N. Ratliff, G. Gallagher, C. Mertz, K. Peterson, J. A. Bagnell, M. Hebert, A. K. Dey, and S. Srinivasa, Planning-based prediction for pedestrians, in2009 IEEE/RSJ International Conference on Intelligent Robots and Systems (IEEE, 2009) p. 3931–3936. [21] W. Zhi, T. Lai, L. Ott, and F. Ramos, Anticipatory navigation in crowds by probabilistic prediction of pedestrian future movements, in2021 IEEE International Conference on Robotics and Automation (ICRA)(IEEE, 2021) p. 8459–8464. [22] V. Modi, Y. Chen, A. Madan, S. Sueda, and D. I. W. Levin, Multi-agent path planning with heterogenous interactions in tight spaces, Computer Graphics Forum42, e14737 (2023), https://onlinelibrary.wiley.com/doi/pdf/10.1111/cgf.14737. [23] G. Bloch, N. Bar-Shai, Y. Cytter, and R. Green, Time is honey: circadian clocks of bees and flowers and how their interactions may influence ecological communities, Philosophical Transactions of the Royal Society B: Biological Sciences 372(2017). [24] L. A. Meerhoff, J. Bruneau, A. Vu, A.-H. Olivier, and J. Pettr ́e, Guided by gaze: Prioritization strategy when navigating through a virtual crowd can be assessed through gaze activity, Acta psychologica190, 248 (2018). [25] A. Mitchell, G. H. Romano, B. Groisman, A. Yona, E. Dekel, M. Kupiec, O. Dahan, and Y. Pilpel, Adaptive prediction of environmental changes by microorganisms, Nature460, 220 (2009). [26] R. Rosen, Anticipatory systems, inAnticipatory systems: Philosophical, mathematical, and methodological foundations (Springer, 2011) p. 313–370. [27] The paradox of Wigner’s friend refers to a situation in which “Wigner” observes a friend of his perform a measurement on a quantum object. Depending on the viewpoint, the wavefunction of the object was reduced either during the friend’s measurement or when Wigner learned about the result, which is paradoxical if this reduction is an objective event. [28] I. Kant,Critique of the Power of Judgment(Cambridge University Press, 2000). [29] The converse is not true, as one can readily see with the following counterexample. Suppose that agentjhas the choice between two equivalent optimal strategies. The shared universe hypothesis allows other agents to infer agentj’s path, whereas in the common knowledge hypothesis other agents only know that agentjwill choose either of the strategies. [30] J. Garnier-Brun, M. Benzaquen, and J.-P. Bouchaud, Unlearnable games and “satisficing” decisions: a simple model for a complex world, Physical Review X14, 021039 (2024). [31] Interestingly, in [20], the authors reverse-engineered related motion-planning ideas to predict probable pedestrian motion in the context of robotic navigation; this was achieved by reinforcement learning, with a model specifically trained for a given environment. But interactions between the anticipatory agents were largely overlooked. [32] C. Nguyen, Y. Ozkan-Aydin, H. Tuazon, D. I. Goldman, M. S. Bhamla, and O. Peleg, Emergent collective locomotion in an active polymer model of entangled worm blobs, Frontiers in Physics9, 734499 (2021). [33] M. Butano, C. Appert-Rolland, and D. Ullmo, Discounted mean-field game model of a dense static crowd with variable information crossed by an intruder, SciPost Physics16, 104 (2024). [34] D. Helbing and P. Molnar, Social force model for pedestrian dynamics, Physical review E51, 4282 (1995). [35] H. Murakami, C. Feliciani, Y. Nishiyama, and K. Nishinari, Mutual anticipation can contribute to self-organization in human crowds, Science Advances7, eabe7758 (2021). [36] A. Nicolas, M. Kuperman, S. Iba ̃nez, S. Bouzat, and C. Appert-Rolland, Mechanical response of dense pedestrian crowds to the crossing of intruders, Scientific reports9, 105 (2019). [37] J. Bruneau, A.-H. Olivier, and J. Pettre, Going through, going around: A study on individual avoidance of groups, IEEE transactions on visualization and computer graphics21, 520 (2015). 22 [38] Y.-X. L ̈u, Z.-X. Wu, and J.-Y. Guan, Pedestrian dynamics with mechanisms of anticipation and attraction, Physical Review Research2, 043250 (2020). [39] X. Hu, T. Chen, and Y. Song, Anticipation dynamics of pedestrians based on the elliptical social force model, Chaos: An Interdisciplinary Journal of Nonlinear Science33(2023). [40] I. Echeverr ́ıa-Huarte, A. Roge, O. Simonin, and A. Nicolas, Near-future projections in continuous agent-based models for crowd dynamics: mathematical structures in use and their implications, Journal of Statistical Mechanics: Theory and Experiment2025, 033403 (2025). [41] S. P. Hoogendoorn and W. Daamen, Pedestrian behavior at bottlenecks, Transportation science39, 147 (2005). [42] L. W. Ludlow and P. G. Weyand, Energy expenditure during level human walking: seeking a simple and accurate predictive solution, Journal of Applied Physiology120, 481 (2016). [43] E. T. Hall,The hidden dimension, Vol. 609 (Anchor, 1969). [44] J. Zhang, W. Klingsch, A. Schadschneider, and A. Seyfried, Transitions in pedestrian fundamental diagrams of straight corridors and t-junctions, Journal of Statistical Mechanics: Theory and Experiment2011, P06004 (2011). [45] D. Helbing, A. Johansson, and H. Z. Al-Abideen, Dynamics of crowd disasters: An empirical study, Physical review E75, 046109 (2007). [46] U. Weidmann,Transporttechnik der Fussg ̈anger: Transporttechnische Eigenschaften des Fussg ̈angerverkehrs (Literatu- rauswertung)(ETH, IVT, 1993). [47] L. D. Vanumu, K. Ramachandra Rao, and G. Tiwari, Fundamental diagrams of pedestrian flow characteristics: A review, Eur. Transp. Res. Rev.9, 49 (2017). [48] A. Poncet, O. B ́enichou, V. D ́emery, and G. Oshanin, Universal Long Ranged Correlations in Driven Binary Mixtures, Phys. Rev. Lett.118, 118002 (2017). [49] J. Dzubiella, G. P. Hoffmann, and H. L ̈owen, Lane formation in colloidal mixtures driven by an external field, Phys. Rev. E65, 021402 (2002). [50] N. Bain and D. Bartolo, Critical mingling and universal correlations in model binary active liquids, Nat. Commun.8, 15969 (2017). [51] M. M ̄ori and H. Tsukaguchi, A new method for evaluation of level of service in pedestrian facilities, Transportation Research Part A: General21, 223 (1987). [52] Y. Xiao, Z. Gao, R. Jiang, X. Li, Y. Qu, and Q. Huang, Investigation of pedestrian dynamics in circle antipode experiments: Analysis and model evaluation with macroscopic indexes, Transportation Research Part C: Emerging Technologies103, 174 (2019). [53] J. Wang, W. Lv, H. Jiang, Z. Fang, and J. Ma, Exploring crowd persistent dynamism from pedestrian crossing perspective: an empirical study, Transportation research part C: emerging technologies157, 104400 (2023). [54] A. Gabbana, F. Toschi, P. Ross, A. Haans, and A. Corbetta, Fluctuations in pedestrian dynamics routing choices, PNAS Nexus1, pgac169 (2022). [55] E. ̈ Usten, A. Sieben, M. Chraibi, and A. Seyfried, A well-motivated model of pedestrian dynamics, arXiv preprint arXiv:2604.26858 (2026).