Forward-Forward Mean Field Games in mathematical modeling with application to opinion formation and voting models

While the general theory for the terminal-initial value problem in mean-field games is widely used in many models of applied mathematics, the modeling potential of the corresponding forward-forward version is still under-considered. In this work, we study the well-posedness of the problem in a quite general setting and explain how it is appropriate to model a system of players that have a complete knowledge of the past states of the system and are adapting to new information without any knowledge about the future. Then we show how forward-forward mean field games can be effectively used in mathematical models for opinion formation and other social phenomena.


Introduction
Mean Field Games (MFGs) are models for large populations of competing rational agents who seek to optimize an individual objective function.They were introduced for the first time in 2006 in [27].The most investigated form has a forward-backward structure that can be sketched by the following system of partial differential equations: −u t (t, x) − tr(A(x)D 2 u(t, x)) + H(x, ∇u(t, x)) = F (t, x, m(t)), m t (t, x) − ij ∂ 2 ij (A ij (x)m(t, x)) − div(H p (x, ∇u(t, x))m(t, x)) = 0. (1.1) Here, a density of individuals m moves in the direction determined by the potential function u.In the system above, A is a diffusion matrix, D 2 is the Hessian, ∇ is the usual space gradient and H p is the gradient w.r.t. the variable p of the Hamiltonian operator H(x, p).The notation ∂ 2 ij stands for the second-order derivatives with respect to the space coordinates x i ,x j , finally, in F the density m(t) := m(t, •), i.e. the coupling may be nonlocal.To give a hint of the idea behind the model, the Hamilton-Jacobi equation (HJ) contained in the first line of the system solves, backward in time, an optimal control problem relative to the strategic choice of any individual.This information is used, forward in time, to move the density m accordingly to the second equation of (1.1).The existence and uniqueness of equilibrium solutions of (1.1) can be found, for example, in [6,20].Other researches on this subject are [23], where strong solutions for parabolic problems were considered, or [34], for weak solutions of parabolic problems with Dirichlet and Neumann boundary conditions.In [7] the authors discuss the existence of weak solutions for first-order MFGs.The stationary case was also investigated in detail and it was first considered in [27].Generally, the uniqueness of solution is obtained (both for stationary and time-dependent MFGs) via a monotonicity argument introduced in [27].
Another model closely related to our discussion is Hughes' model [9,25].In this model, the optimization process of each player relies solely on information about the current state of the system, without any anticipation of future states.Consequently, the density evolution is associated with a stationary HJ that incorporates only the present configuration of the density.This model has been demonstrated to be suitable for effectively simulating scenarios in which agents may change their strategy due to unforeseen events.Notably, they are prone to changing their strategy instantaneously, with no consideration given to their past behavior.This modeling approach is particularly useful for simulating large crowd fluxes of pedestrians.A version of a MFG system, in a forward-forward form, has been proposed in [2], as effective way to approximate the stationary state of the system, and in [21,22], in its one-dimensional form, mostly with the purpose of studying the qualitative properties of the system.
Our paper aims to investigate forward-forward Mean Field Games (FF-MFGs) from a modeling perspective.We seek to demonstrate that FF-MFGs are not merely effective tools for approximating stationary problems or theoretical curiosities; rather, they represent a potent and, in some cases, more suitable model for simulating collective processes.In this framework, agents are influenced by past states of the system, as they lack access to information about the future.Instead, their current strategic choices are significantly shaped by the collective past configurations.These distinctive features can be leveraged effectively to model collective motion phenomena, where factors such as tradition and stubbornness play a crucial role.Examples include opinion formation and voters' tendencies.
We present a concise overview of the paper's content: In Section 2, we formally derive a class of FF-MFGs, providing a stochastic interpretation in terms of optimal control for stochastic differential equations.Section 3 contains general results on existence and uniqueness, demonstrating their broad applicability.We emphasize the generality of these findings, showcasing proofs for solutions in the Cauchy problem and cases involving Dirichlet and Neumann boundary conditions.While we do not explore periodic solutions in this work, specifically when the state space Ω = T d , it can be demonstrated more straightforwardly compared to other cases.In Section 4, we introduce and discuss two FF-MFG models for social processes, accompanied by various numerical simulations that practically illustrate their features.The numerical tools employed throughout the paper are briefly outlined in Appendix A.

Derivation and interpretation of the evolution process
Let us denote by X s ∈ R n the quantity of interest (e.g.opinion, ideological position on a political spectrum, etc.) at time s, which follows the stochastic differential equation (SDE) for some x ∈ R n .Here, σ(X s ) is a n × n matrix, and B s is a standard n-dimensional Brownian motion.We define the quantity m as the probability density of players moving accordingly to the SDE (2.1) and initial distribution m(0, x) = m 0 (x) ∈ P(R n ).Classical arguments in diffusion theory imply that the measures m of the initial distribution m 0 will be characterized by the dynamics given by the Fokker-Planck (FP) equation with A(x) := σ(x)σ T (x).The latter has to be understood in the weak sense [6].
The crux of the model lies in the selection of the drift, denoted as β.We make the assumption that the players are uninformed about future states of the system (i.e., m(t, x) for t ∈ [t, T ]).However, they assume that certain tendencies from the past may reemerge in the future.This scenario is particularly relevant in domains like political opinions or voting intentions, where fluctuations around specific poles of attraction often manifest.In such instances, recent past events exert a more pronounced influence on individual choices, whereas distant past events, wield a comparatively limited impact.
With the latter in mind, for any fixed t ∈ (0, T ] consider the optimal control problem where Y x,τ [α](s) := Y s with s ∈ [τ, 2 t] is assumed to be the unique strong solution to ℓ : R n × R n → R and F : R n × P(R n ) → R are running cost functions, and λ ∈ [0, +∞) is a time discount factor.Defining a Hamiltonian function H as the optimal solution of the optimization problem in (2.3) is given in feedback form by α(τ, x) = − Hp (τ, x, ∇v(τ, x)).Moreover, a classic Dynamic Programming Principle (see [3]) applies to the value function v(s, x) in (2.3) bringing us a differential representation formula for v(s, x) in HJ form as We can interpret the function v(τ, x) as the value function for an agent who engages in an optimal control problem at every instant t ∈ [0, T ] within the time interval [ t, 2 t].In the absence of knowledge about the future states of the system, the agent replaces them by mirroring the past states of the time interval [0, t], which are assumed to be known.The discount coefficient λ gauges the significance of the past in this decision-making process.Therefore, we anticipate that as λ approaches +∞, the models will converge towards an instantaneous response of the system, where trajectory optimization is not performed.
Considering the special nature of the coupling between v and m it is convenient to reverse the time evolution: if we define v(τ, x) = u(2 t − τ, x) and we move the time interval in [0, t] (with the substitution t = 2 t − τ ) we obtain which holds for any t ∈ [0, T ] and therefore in particular for t = T .Here, H and F are defined in the following way: We then set β(t, x) = −H p (t, x, ∇u(t, x)): the latter equation, coupled with (2.2), gives a Forward-Forward MFG system.
Clearly, the motion of the density and the optimal control do not follow the same trajectories.Therefore, similar to the Hughes' model, this framework cannot be accurately labeled as a game.This is a critical aspect that enables our model to describe potential changes in strategy and less rational behaviors among the players, as in the case of high stubbornness and ideological bias.However, we maintain the term FF-MFGs for consistency with the existing literature.[28].However, we do not delve into these interpretations here, as they involve a readaptation of the backward-forward MFG developed in [14,35].
3 Some results about Forward-Forward Mean Field Games The forward-forward model was introduced in [2] to approximate stationary MFGs.
The key insight is that the parabolicity in (3.1) should imply the long-time convergence to a stationary solution.
In this section, we want to prove existence and uniqueness of classical solutions for the forward-forward MFGs.In particular we discuss the existence and the uniqueness of the FF-MFG general framework which includes the models that we are going to discuss in the rest of the paper.We consider the forward-forward MFG problem described by the system Here, Ω ⊆ R n is an open domain.Note that in this section we consider the case λ ≥ 0. This is done just to simplify the presentation.The presence of a negative smoothing term is not a problem and the same results hold, since the function z(t, x) := e (|λ|−λ)t u(t, x) solves the same Hamilton-Jacobi equation with λ replaced by |λ|.We distinguish between three cases, giving rise to three different kind of problems.Namely, either Ω = R n , no boundary conditions prescribed, (C) which is known as Cauchy problem, or we require Ω to be a bounded domain (the regularity of such domain is stated in the hypotheses) complementing the system with homogeneous Dirichlet or Neumann boundary conditions, i.e.
Recall that in (2.5) we have H(t, x, p) = max less, the results given in this section are more general and may include other kind of Hamiltonian.
The existence and the long-time convergence of the forward-forward model have not been addressed, except in a few cases, see [23] and [24].In [24], the forward-forward problem was examined in the context of eductive stability of stationary MFGs with a logarithmic coupling.In [23], the existence and regularity of solutions for the forwardforward, uniformly parabolic MFGs with subquadratic Hamiltonians was proven.
A general result for existence and uniqueness of solutions for systems of parabolic equations was given, just with Dirichlet boundary conditions, in [26,Theorem VII.7.1].Hence, the results provided in this section can be considered as a generalization of that (since we include also the cases (N) and (C)) of that.Moreover, the proof was not given there, but the techniques used (fixed-point method) are the same we use in this paper.Except for these cases, the question of existence and regularity is open in all other regimes.In the case of forward-forward MFGs without viscosity, these questions are particularly challenging.Moreover, the long-time convergence has not been established even in the parabolic case.Nevertheless, numerical results in [1] indicate that convergence holds and that the forward-forward model approximates well stationary solutions.
Let P(Ω) (resp.P sub (Ω)) be the set of probability measures (resp.sub-probability measures) on Ω with finite first moments.Then, P(Ω) is a topological space endowed with the weak*-convergence and metrizable with respect to the Wasserstein distance, which is defined as the distance between two probability measures m 1 , m 2 ∈ P(Ω) as Here Π(m 1 , m 2 ) is the set of all joint probability distributions (X, Y ) with L (X 1 ) = m 1 , L (X 2 ) = m 2 .An equivalent definition is the following one: where with Lip 1 (Ω) we mean the space of Lipschitz continuous functions with Lipschitz constant equal to one.The equivalence of the two definitions was given in [6].
The same definition applies in case of (D), with P(Ω) replaced by P sub (Ω) and test function g with Lip(g) ≤ 1 and g ∞ ≤ 1, see [32].This is called generalized Wasserstein distance.
We observe that, in case of (N) and (C), we can restrict to test functions g with g(x 0 ) = 0, for a fixed x 0 ∈ Ω.In particular, in case of Neumann condition we have g ∞ ≤ C, where C = diam(Ω), and in case of the Cauchy problem we have |g(x)| ≤ |x|.
Henceforth, when there is no possibility of mistake, we use the notation d 1 to refer to both Wasserstein distance and generalized Wasserstein distance.
We start giving the basic assumptions that we need for an existence and uniqueness result.

Hypotheses:
Let γ ∈ (0, 1) and C > 0. We assume that, in the cases (D) and (N), Ω is a bounded domain with C 2+γ boundary.Moreover, we suppose that ) are continuous functions and C γ 2 ,γ in (t, x) variable, with H differentiable and convex in the last variable, and H(•, •, 0) is globally bounded.Moreover, the growth of H is at most quadratic: (H2) For µ 1 , µ 2 ∈ P(Ω) or P sub (Ω), the following condition hold: (H3) In case of boundary conditions, we require compatibility conditions for the initial data: namely, in the setting (D), we require whereas in the setting (N) In the setting (C), we require instead a finite first order moment for m 0 , namely From now on, C indicates a non-negative constant, that can change from line to line.Theorem 3.1.Let Hypotheses (H1) − (H3) hold true.Then there exists a unique solution Proof.For M > 0 which will be chosen later, we consider the following set: , where in case of (C) or (N), V = P(Ω) and Note that X is closed and convex in the topology inherited by C([0, T ]; V ).In order to apply Schauder's Theorem, we define a functional Φ : X → X in the following way: for µ ∈ X, we take u = u µ as the solution of with conditions (C), (D) or (N).In all the three cases, a solution u is unique and regular.In case of boundary conditions (D) and (N), from the comparison principle we have u ∞ uniformly bounded.Then from Theorem V.4.1 and Lemma VI.3.1 (resp.Theorem V.7.2 ) of [26], we have u globally Lipschitz in the space variable x.Hence, we can linearize the problem of u, which turns out to be the solution of with conditions (D) or (N), and with Then we can apply the Corollary of Theorem IV.9.1 of [26] to obtain, for all 0 ≤ γ < 1, For the Cauchy problem (C), we consider, for k ∈ N, the solution u k of the following problem where A straightforward application of the comparison principle (see [12]) implies that u k (t, •) is bounded in W 1,∞ uniformly in t and k, and so the same estimate holds for u.Then we can apply Theorem V.8.1 of [26] and Hence, from Theorem 5.1.2 of [30] and the hypotheses on H we have, for all 0 ≤ γ < 1, where C does not depend on µ.Moreover, from this estimate we get Hence, from Theorem 5.1.9 of [30] we get where C does not depend on µ.
Then we choose Φ(µ) = m, where m = m µ is a solution, in the distributional sense, of the FP equation with conditions (C), (D) or (N).
For the distributional formulation, m satisfies, for all 0 < s < t < T , with conditions (C), (D) or (N).We note that the results obtained for the HJ equation can be applied also for the backward equation (3.4), with the change of variable (t, x) → (T − t, x).
Taking f = 0 and rearranging, we find In case of conditions (C) or (N), we choose Lip(ψ) = 1.As already said, for (N) we can also take ψ ∈ W 1,∞ and thanks to Lemma 3.2 of [36] we have which implies, for a C not depending on µ, We argue in a similar way for the case (C).Here, we have ∇φ uniformly bounded in L ∞ .Hence, φ solves and applying again Theorem 5.1.2 of [30], (3.5) remains true, which implies once again (3.6).
As regards Dirichlet boundary conditions (D), we take ψ ∈ C 1 (Ω) with ψ |x∈∂Ω = 0 and ψ 1 ≤ 1.From Lemma 4 of [14] we get Hence, if we choose M sufficiently large, we have in all cases m ∈ X, and Φ : X → X is well-defined.
To apply Schauder's theorem, we have to check that Φ(X) is relatively compact in C([0, T ]; V ) and continuous.For the relatively compactness, let {µ k } k ⊂ X, and let u k and m k be the solutions of the HJ and the FP equation related to µ k .As already seen, we have u k 1+α 2 ,1+α ≤ C, where C does not depend on k.Hence, up to subsequences, we can apply Ascoli-Arzelà's Theorem and, for a certain at least for boundary conditions (D) or (N).In those cases, take φ k and φ the solution of (3.4) related to u k and u, with ψ ∈ W 1,∞ , satisfying ψ |x∈∂Ω = 0 in case of (D).Then, arguing as before, φ k is uniformly bounded in C 1+γ 2 ,1+γ and, up to subsequences, φ k → φ in C([0, T ] × Ω).Then, subtracting the distributional formulations of m k and m with test functions φ k and φ we get In this case we note that m k is the density of the following process where X 0 is any fixed process with L (X 0 ) = m 0 , and In the same way we define the drift b and the process X t related to m, solution of the FP equation (3.3).Then, we have The second integral is bounded using the Itô isometry and the Lipschitz bound on σ: For the first term we get For the last integral we use the following strategy: This means The space-time integral is handled in the following way: for a compact E ⊂ R n , we have The first term goes to 0 for each compact E ⊂ R n .For the second term, we note that m k has finite first order moments, uniformly bounded in k.Actually, if we take the solution φ of (3.4) with f = 0 and ψ = |x|, from standard regularity results (see [33]) we have Using hypothesis (H3), we obtain in the weak formulation of This implies that m k L 1 ([0,T ]×E c ) can be chosen arbitrarily small, if we take E sufficiently large.This implies that Coming back to (3.7) and using Gronwall's inequality, we finally obtain we have proved that m k → m in C([0, T ]; V ) (up to subsequences) for all the boundary conditions (C), (D) or (N).
The continuity argument can be proven in the same way of the compactness.This concludes the existence result.
Observe that, since u is smooth, we can split the divergence term in (3.3), obtaining for m the equation with conditions (C), (D) or (N).This implies, arguing as in the HJ equation, For the uniqueness, let (u 1 , m 1 ) and (u 2 , m 2 ) be two solutions of (3.1), and set (z, µ the couple (z, µ) solves the following system: coupled, in the case of Dirichlet boundary conditions, with conditions (D) for (z, µ).
In the case of Neumann boundary conditions, we have for the couple (u, m) and for x ∈ ∂Ω the conditions We start with the two cases (D) and (N).Multiplying by µ the Fokker-Planck equation of µ, we obtain Since ∇u 1 ∞ ≤ C, we get from Young's inequality In the same way, since m 2 ∞ ≤ C and H p is Lispchitz in the last variable, we get This means To estimate the last integral, we study the equation of z.Since V ∈ L ∞ and, for all s ∈ [0, T ], we have from the Corollary of Theorem IV.9.1 of [26], Since in case of (D) and (N) the domain Ω is bounded and the test functions for d 1 are bounded, we have Coming back to (3.8), we have which implies, thanks to Gronwall's Lemma, µ ≡ 0, and so z ≡ 0.
For the Cauchy problem (C), we consider two processes (X 1 t ) t and (X 2 Arguing as in (3.7), we have Applying Gronwall's Lemma, we have Using once again (3.9), we get sup s∈[0,t] which implies µ ≡ 0, and so z ≡ 0. This concludes the proof.

Two Forward-Forward models
In this section we introduce two models which have the structure of a FF-MFG.The framework is appropriate when we want to model a continuity of agents which are dynamically retrieving information from the past environmental scenarios.We focus on an opinion formation model set in a 1D space and a 2D voting model which share the same formal structure.

A 1D opinion formation model
In recent years, the process of opinion formation, along with other sociological and economic phenomena, has garnered considerable attention from physicists and mathematicians.It has been observed that certain tools employed in statistical mechanics can be effectively applied to model these phenomena.Notable works in this area include [13,18,41] and others.Within this context, two active fields have swiftly emerged, commonly referred to as sociophysics or, within the mathematical community, behavioral social systems.These fields are dedicated to describing these phenomena from the perspective of physicists.For an overview and up-to-date references, we recommend the monographs [4,10,19,38].Additionally, for works with a more mathematical focus, consider [5], where the authors discuss the use of partial differential equations in modeling for the social sciences, and [17], where the authors employ Fokker-Planck equations to model socio-economic phenomena.
In the work [39], the authors propose an opinion dynamic model that describes the evolution of an opinion in a population consisting of two groups: pliant and stubborn agents, where the latter act as leaders.The model adopts the structure of a multi-population backward-forward Mean Field Game.Drawing inspiration from [39], we adopt standard notation and concepts, considering a population of homogeneous agents.Each agent is characterized by the opinion where [0, T ] represents the time horizon window.We also consider the presence of some advertised opinions, as clarified further below.Notably, in the case of a Forward-Forward Mean Field Game (FF-MFG), there is no modeling or theoretical necessity to bound T , unless for the numerical tools that are required for approximating the solution.
We assume that the opinion X(t) is a solution of (2.1), where the dynamics are driven by the control variable α.The presence of the stochastic term in (2.1) is motivated by the effect of uncertainty in the opinion evolution.We consider a probability density function m : Ω × [0, T ] → R representing the percentage of agents in state x at time t, satisfying Ω m(t, x)dx = 1, for any t ∈ [0, T ].
The fundamental principle underlying our model is that each agent adjusts his opinion based on the average opinion of their surroundings.Specifically, an agent is more sensitive to and attracted by opinions with high density that are close to their own, while they give less consideration to opinions that are too distant.This reflects a typical crowd-seeking behavior, previously studied in its non-local variation in [39] and justified by a kinetic framework in [42].We consider a fixed probability distribution function g(x) (for example, g could be the density of a normally distributed random variable).For any fixed t ∈ [0, T ], we define the local average opinion as where C(t, x) is a normalization variable, i.e., C(t, x) = 1/ Ω m(t, y)g(y − x)dy.
We model the running cost terms in (2.3) to penalize the distance from the average opinion of the surroundings, determined by the shape of the distribution g.Thus, Simultaneously, we assume the existence of a collection of points {x i } i=1,...,N that represent special opinions where advertising is spent.These points serve as special points of attraction, and their strength depends on the parameters k i .Therefore, 2) It's worth noting that we also penalize the control, implying that the agents are stubborn and prefer to change their opinion as little as possible.The parameters a 1 , a 2 , a 3 ≥ 0 balance the influence of these various principles guiding the evolution of the agents' choices.
We consider an initial distribution of opinions m 0 (x) and an initial cost u 0 (x).It is possible to assume either that u 0 (x) ≡ 0 if the agents start the game without any prior information about the system or 2 if we assume that there have already been some advertisements prior to the start of the game, introducing the presence of some polarizing opinions.
The final FF-MFG model that we obtain is, for We observe that using the standard Legendre-Fenchel transform, the control depending part of the hamiltonian is Lemma 4.1.Let A > 0 and (m 0 , u 0 ) satisfying H3 in the setting (C).Then all the hypotheses H0-H3 are verified and therefore the system (4.3) has a unique solution.
Proof.The hypothesis H1 is obviously verified.For the hypothesis H2, observe that for any t ∈ [0, T ] for a K big enough.Therefore we can apply Theorem 3.1 and conclude the proof.
It is noteworthy that the model bears closer resemblance to [42] and other kinetic-based frameworks than to [39].This is due to our assumption that agents lack access to any information about future states or changes in the dynamics of the system.Nevertheless, the model has a steady-state formulation that adopts the typical stationary MFG form.Hence, we anticipate that after a certain time, the solutions (u, m) will converge to (ū, m), which are solutions of the system: where ρ ∈ R is a constant of compatibility between the two systems to be defined.
Proving the long-time convergence of this class of problems remains an open issue (cf.[1]).

FF-Opinion formation: Tests
In this section, we highlight some of the features of the proposed model.The primary objective of the following tests is to emphasize the distinctions from the corresponding forward-backward system and to illustrate the qualitative characteristics of the model.The simulations presented are obtained using semi-Lagrangian schemes (refer to A and the cited references for details).
The objective of our first test is to compare our opinion formation model with its corresponding forward-backward counterpart.It is essential to note that in the latter case, agents forecast all future states of the system and optimize their policy based on those predictions.In contrast, in our case, each agent determines their policy based on past states of the system.The forward-backward coupling introduces additional computational challenges.Due to the nature of its evolution, we cannot employ an explicit numerical scheme for both equations simultaneously.To address this, we adopt a solution strategy similar to [9], utilizing a fixed-point argument until convergence to the equilibrium of the discrete system.
We consider the opinion domain Ω = R, and the initial values of the potential and density functions are given by In other words, initially, the opinion is uniformly distributed, but agents are aware of two polarizing opinions {0.2, 0.8} for which some prior advertisement may have been spent.Specifically, the parameter of the pole x2 = 0.2 is set to k 2 = 3, while the pole x1 = 0.8 has a lower value parameter k 1 = 1.The same parameters appear in the running cost ℓ(x, α).The strength of this factor is tuned by the weight a 3 = 2, while the penalization of the control, i.e., the resistance to change an opinion, is set to 2 , modeling the influence on every agent of their surroundings.The weight of this tendency to conform to the local mean is tuned by a 1 = 1.Finally, the diffusion is set to A(x) ≡ 0.01, and the discount parameter is λ = 0.

Forward-Forward Model
In Figure 1, we present the results of this initial test implemented with discretization parameters ∆x = 0.04 and ∆t = 0.02, covering approximately Ω ≈ [−4, 4] with Neumann boundary conditions.We observe that the density distribution of the agents, initially constant in [0, 1] and null elsewhere, splits into two clusters under the influence of the initial choice of u 0 .During the initial phase, the right-hand-side cluster progressively acquires a greater attraction capacity and tends to absorb the second cluster.Around t = 10, this process concludes, and only one cluster is present, although it is still not centered on the advertised pole x2 .This occurs during the final phase of the system's evolution, where the cluster slowly moves toward x2 , becoming the center of its distribution.Notably, there is no formation of Dirac's deltas due to the presence of a strictly positive diffusion parameter A. Let us compare this with the forward-backward counterpart model.We maintain all the parameters of the system unchanged, only inverting the evolution of the potential equation.The results are presented in Figure 2. We observe that the evolution of the Forward-Forward Model Forward-Backward Model system is markedly different.Firstly, there is no formation of two competing clusters since the agents are aware of all the future states of the system; therefore, only one attraction point emerges.Also in this case, the 'winner' of the competition is the pole x2 , and the average opinion of the agents monotonically aligns with this final state.
A more evident comparison is also reported in Figure 3, where the evolution of the density of opinions is shown side by side.
Test 2. The effect of the discount variable λ.
In our second test, we aim to show the effect of the discount variable λ on the model.While it makes sense to limit the influence of the past in the optimization process (clearly, the paradigm of a player assuming that past scenarios will repeat in the future is potentially flawed), adopting a larger λ tends to trivialize the model, transforming it into a simple relaxation around the average.This effect is illustrated in Figure 4, where, for the same parameters as Test 1, the potential u and the density distribution m are shown for various choices of λ.Notably, for λ ≥ 7, both u and m quickly move, in the early instants of the process, to a stable configuration around the poles.This dynamic, less interesting and varied than for lower values of λ, led us to restrict the remaining tests to the case λ = 0.For intermediate values of lambda (e.g., λ ∈ (0, 7)), we expect to observe essentially the same type of behavior as for λ = 0, albeit mitigated and relatively smoothed down around the attraction points of the model.Test 3. Cluster formation and control.
In our third test, we aim to illustrate two distinct features of our opinion model.In the first one, we demonstrate how our model can generate clusters over time.To achieve this, we consider the same setting as the previous test, with the only exception of the parameters a 1 = 1, a 2 = 4, and a 3 = 1.In practice, we penalize the possibility to change opinions, fostering the 'stubbornness' of our density of agents.The two attraction poles are again 0.2 and 0.8 with equal attraction capacities, i.e., (x 1 , k 1 ) = (0.8, 1) and (x 2 , k 2 ) = (0.2, 1).
Forward-Forward Model The test results, depicted in Figure 5, reveal a symmetric pattern around two attraction points.Initially, the agents are uniformly distributed in density, but they quickly aggregate around the two advertised poles.The problem's inherent symmetry ensures that the average opinion of all agents remains stable, with minor numerical oscillations, at the midpoint between the two clusters, denoted as x = 0.5.Notably, in this scenario, the two clusters are interconnected, indicating that the intersection of their support is not empty.By varying the distance or making a different choice for the function g (as demonstrated in subsequent tests), it's possible to achieve two or more separated clusters.
We delve into the question of the best advertising strategy in a relatively stable situation like the latter.Particularly, considering a limited advertising budget, is it more advantageous to be the first one to advertise at one pole, or is it better to have the ability to advertise for a longer duration?To address this question, we conduct the same test as before, setting for t ∈ [0, 0.5], (x 1 , k 1 ) = (0.8, 3), (x 2 , k 2 ) = (0.2, 1); then t ∈ (0.5, 10], (x 1 , k 1 ) = (0.8, 1), (x 2 , k 2 ) = (0.2, 3).
All the other parameters of the test are left as in the previous case.In this scenario, the agent interested in advertising position 0.8 acts before and for a shorter duration, while its competitor has a much longer advertising span but is less responsive at the beginning of the simulation.Notably, the advertisement parameters k 1 and k 2 switch their roles at t = 0.5, representing 5% of the total evolution of the system.
Forward-Backward Model The results of this simulation are presented in Figures 6 and 7. We observe that in the long run, the position advertised with more anticipation, 0.8, becomes predominant, even though at t = 0.5, when its advertising advantage ends, it is actually in a minority position if we consider the average opinion of the agents.Therefore, we can assert, at Forward-Forward Model Controlled FF Model

A dynamic 2D vote model
In this section, we extend the previously introduced opinion formation model to a 2D political spectrum, often utilized to provide a more detailed ideological categorization of voters.An illustrative example of such 2D representations is the Nolan Chart [40], where the axes represent personal freedom and economic freedom.We assume that each voter adopts a position X(t) ∈ Ω = R 2 as a solution of the SDE dynamics (2.Adopting the same principles as the previous 1D model, we assert that every agent adjusts their vote opinion based on an average of its surroundings.Therefore, we introduce a distribution function g(x) and define, for any fixed t ∈ [0, T ], the local average as where C(t, x) is a normalization variable, i.e., C(t, x) = 1/ Ω m(t, y)g(y − x)dy.
The distribution g(x) is chosen as the isotropic multivariate normal distribution g 1 +x 2 2 µ .More complex choices for modeling the influence of the surrounding on each voter are possible.The other terms in (2.3) are given by This term penalizes the distance from the average opinion of the surrounding.Assuming the existence of a collection of points {x i } i=1,...,N ∈ (R 2 ) n representing "advertised political opinions" or policy-seeking behavior of various parties with strengths k i , Here, a 1 , a 2 , and a 3 (all greater than or equal to 0) model conformism (to the political environment), stubbornness, and advertisement-influenced behavior of each voter, respectively.
As initial scenarios, we consider a uniform initial distribution of opinions m 0 (x) and a constant initial cost v 0 (x), i.e., where χ B (x) is the indicator function of the set B. Setting a constant diffusion parameter A(x) ≡ A, we obtain the following FF-MFG model for ( Also in this case, the standard hypotheses on H(x, p) are verified.

FF-dynamic vote model: Tests
We present simulations conducted using the same schemes outlined in A, focusing on a 2D opinion of voting scenario with 2 candidates.The primary objective of these tests is to demonstrate the effectiveness of the proposed model in simulating complex phenomena such as cluster formation or the adoption of classic strategies to enhance the electoral performance of a candidate.

Test 4: Stable Cluster Formation between Two Candidates
In this 2D setting, we showcase a fundamental cluster formation where voters polarize between two candidates.It is essential to note that our model, relying on attraction poles, naturally tends towards the formation of clusters over the long run.For this test and the following one, model parameters a 1 , a 2 , and a 3 are all set to one.The constant µ, representing the size of the area related to the conformism tendency of a voter, is set to 0.2, while the diffusion parameter A is set to 0.01.We assume the presence of two candidates, C1 and C2, positioned at (0.8, 0.8) and (−0.8, −0.8), respectively.Both candidates conduct a political campaign with constant strength and efficiency, setting k 1 = k 2 = 1.Since voters are initially evenly distributed across the entire political spectrum [−1, 1] 2 , and the potential v 0 is initially constant, no prior knowledge of the candidates' positions is assumed.Following the median voter theorem [37], victory of one candidate over its opponent is achieved when the average of all voters' positions (i.e., the median voter) falls within the respective victory regions, which are denoted as follows: We approximate the solution using semi-Lagrangian schemes with ∆x = 0.04 and ∆t = 0.02.The problem is solved on a grid constructed in [−3/2, 3/2] 2 with Neumann boundary conditions.In Figure 8, the outcomes are presented.Several interesting features of the model are observed: firstly, even starting with no prior knowledge of the candidates' positions and no previous advertisements, the initial moments of system evolution (t ∈ (0, 1)) significantly influence the final results.The density of voters quickly splits equally between the two candidates due to the symmetry of the data.Additionally, the conformism tendency generates multiple clusters that progressively migrate toward the advertised positions of the candidates.During this migration, multiple clusters may merge.In this scenario, we assume infinite advertisement strength from each candidate (constant in time), and as t ≫ 0, the density distribution of voters cannot differ from one (or more) clusters at the advertised positions of the candidates.In this case, there is a perfect balance between the two candidates, and as evident from the position of the median voter (the red cross in Fig. 8), neither candidate prevails over the opponent.Test 5. Overcoming the impasse via different political strategies.
We explore the possibility of emulating typical electoral strategies in our model to overcome the impasse caused by the symmetric setting in the previous test.One potential strategy involves creating an electoral alliance to break the deadlock.How does the introduction of a third candidate C3, positioned at (0.6, −0.2), influence the system's evolution?For this third candidate, we assume a very limited attraction strength by setting k 3 = 0.2.The results are presented in Figure 9.The presence of the additional candidate C3 plays a crucial role in the evolution of the voters.It facilitates the formation of a large central cluster, which leans slightly more towards the victory region Ω 1 , where both C1 and C3 are positioned.Although this central cluster initially has a limited impact on the position of the median voter, it gradually attracts voters who initially leaned towards C2.Subsequently, the cluster moves, passing through the position of candidate C3 before eventually reaching, over an extended time horizon (t = 20), the more extreme position of candidate C1.
We explore another potential strategy: What if a candidate advertises a position that is not its final goal?In this deliberately illustrative example, we assume that the position of candidate C1 initially lies at the point (0.2, 0.2) but switches to (0.4, 0.4) at t = 2, to (0.6, 0.6) at t = 4, and finally to (0.8, 0.8) (the candidate's ultimate goal) at t = 6. Figure 10 visually demonstrates how this strategy immediately influences the position of the median voter, effectively guiding the crowd of voters toward the final goal of C1.This occurs even with a minor cluster formation before reaching the candidate C1's final position.The tendency of politicians to gravitate toward the position occupied by the median voter, or more generally, toward the position favored by the electoral system, is sometimes referred to as Hotelling's law [11].This test can also be viewed as a continuous version of the McKelvey-Schofield theorem [31], where the authors observe that any position on a multidimensional political spectrum can be reached by a sequence of majority votes.

Conclusions
In this work, we discuss the fundamental features of a general FF-MFG, illustrating how such a framework can be utilized to formulate mathematical models in scenarios where a large population of rational individuals is influenced by their past position and control.This framework is particularly suitable for social mathematical models, allowing the inclusion of non-local interaction terms, diffusion effects, complex strategic behaviors, agent stubbornness, and more.

A A semi-lagrangian scheme for FF-MFG
In this appendix we provide more details about the numerical schemes that we used for approximating the FF-MFG system.To simplify a bit the presentation we consider Here, I[u](x) is an interpolation operator on the matrix U , and e i is the i unitary vector of an orthonormal basis of the space.The discrete operator is then simply N (x, DU α i,j ) = F (t, x i,j , M ) + (D α U i,j ) α .
We take the adjoint of the linearized of N and we use it into (A.2),K(x i,j , (D α U ] i,j , M i,j ) = We note that the operator N (x, p) is for contruction monotone.

Fig. 1
Fig. 1 Test 1. Forward-Forward model: evolution of the potential function u and density distribution m (top), control map −∇u/a 2 and mean opinion Ω xm(t, x)dx.

Figure 1 ForwardFig. 2
Fig. 2 Test 1. Forward-Backward model: evolution of the potential function u and density distribution m (top), control map −∇u/a 2 and mean opinion Ω xm(t, x)dx.

Fig. 3
Fig. 3 Test 1. Evolution of the density of opinion in the FF and FB model.

Forward 5 Fig. 4
Fig. 4 Test 2. Forward-Forward model: evolution of the potential function u (left) and density distribution m (top) with various values of the discount coefficient λ.

Fig. 5
Fig. 5 Test 3. Forward-Forward model: evolution of the potential function u and density distribution m (top), control map −∇u/a 2 and mean opinion Ω xm(t, x)dx.

Fig. 6
Fig. 6 Test 3. Controlled FF model: evolution of the potential function u and density distribution m (top), control map −∇u/a 2 and mean opinion Ω xm(t, x)dx.

Fig. 7
Fig. 7 Test 3. Evolution of the density of opinion in the uncontrolled and controlled model 1), controlled by the variable α.Once again, the density function m : [0, T ] × Ω → R represents the percentage of voters in state x at time t, subject to the condition Ω m(t, x)dx = 1, for any t ∈ [0, T ].

Fig. 8
Fig. 8 Test 4. Evolution of the density of voters at t = 0, 0.38, 0.78, 1.18, 1.66, 10.The green squares are the position of the two candidates, the red cross is the median voter position and the dotted white line is the separation between the victory region of each candidate.

Fig. 9
Fig. 9 Test 5.a.'Having a moderate ally' strategy: Evolution of the voter density at t = 0, 0.38, 0.78, 1.18, 10, 20.The green squares depict the positions of the three candidates, the red cross indicates the median voter position, and the dotted white line represents the boundary between the victory regions of each major candidate.

Fig. 10
Fig. 10 Test 5.b. 'Advertising a more moderate position' strategy.Evolution of the density of voters at t = 0, 0.38, 0.78, 1.18, 1.66, 10.The green squares are the advertised position of the two candidates (we note that one candidate changes progressively its position), the red cross is the median voter position and the dotted white line is the separation between the victory region of each candidate.