Chapter 12.2: The Mean Field Game System
Coupling Optimality with Consistency
A Mean Field Game (MFG) couples two PDEs: the HJB equation (backward in time), describing each agent’s optimal strategy given the population density, and the Fokker-Planck (FP) equation (forward in time), describing how the population density evolves under the optimal strategy. The fixed-point condition—the density that agents optimise against is the same density that their optimal actions produce—constitutes the Nash equilibrium of the continuum game.
This framework, introduced independently by Lasry-Lions (2006) and Huang-Caines-Malhamé (2006), provides the mathematical foundation for understanding how individual rational decisions aggregate into collective urban patterns.
12.2.1 The HJB-FP Coupled System
The MFG system consists of two coupled PDEs. The first is the Hamilton-Jacobi-Bellman equation, solved backward from the terminal time\(T\):
$$-\frac{\partial u}{\partial t} - \nu \Delta u + \frac{1}{2}|\nabla u|^2 = F(x, \rho)$$
$$u(x, T) = g(x) \quad \text{(terminal condition)}$$
The second is the Fokker-Planck equation, solved forward from the initial time:
$$\frac{\partial \rho}{\partial t} - \nu \Delta \rho - \operatorname{div}(\rho \nabla u) = 0$$
$$\rho(x, 0) = \rho_0(x) \quad \text{(initial condition)}$$
The coupling is through \(F(x, \rho)\) in the HJB (the cost depends on the density) and through\(\nabla u\) in the FP (the velocity field is the optimal control \(\alpha^* = -\nabla u\)).
The Fixed-Point Structure
Given a density \(\rho\), solve HJB backward to get\(u\). Then use\(\alpha^* = -\nabla u\) in FP to get a new\(\rho'\). At equilibrium,\(\rho' = \rho\): the density is self-consistent.
12.2.2 Three Coupling Functions
The coupling function \(F(x, \rho)\)determines how congestion affects costs. Three canonical choices:
Local Power-Law Coupling
$$F_{\text{local}}(x, \rho) = \rho(x)^\gamma, \qquad \gamma > 0$$
Higher local density means higher cost. The exponent\(\gamma\) controls the sensitivity to congestion. For \(\gamma = 1\), cost is linear in density (BPR-like). For\(\gamma > 1\), cost grows superlinearly, modelling severe congestion effects.
Nonlocal Coupling
$$F_{\text{nonlocal}}(x, \rho) = (K * \rho)(x) = \int K(x - y) \, \rho(y) \, dy$$
Agents care about density in a neighbourhood, not just their exact location. The kernel\(K\) represents the range of perception.
Logarithmic Coupling
$$F_{\text{log}}(x, \rho) = \ln \rho(x)$$
This arises when the coupling represents an entropy term. It has the special property of making the MFG system equivalent to a Schrödinger system via Cole-Hopf.
12.2.3 Variational Structure and Well-Posedness
When \(F\) is monotone increasing in\(\rho\) (congestion aversion), the MFG system has a variational structure. The solution\((u, \rho)\) is a saddle point of the functional:
$$\mathcal{L}[u, \rho] = \int_0^T \!\!\int \left[\rho\!\left(\frac{\partial u}{\partial t} + \nu\Delta u - \frac{1}{2}|\nabla u|^2\right) + \mathcal{F}(x, \rho)\right] dx \, dt$$
where \(\mathcal{F}\) satisfies\(\partial_\rho \mathcal{F} = F\). For\(F = \rho^\gamma\), we have\(\mathcal{F} = \rho^{\gamma+1}/(\gamma+1)\).
The monotonicity of \(F\) ensuresuniqueness of the MFG equilibrium. This is the Lasry-Lions monotonicity condition. When \(F\) is decreasing (agents prefer crowded areas—agglomeration), multiple equilibria can exist.
12.2.4 Stationary MFG: Bid-Rent as Value Function
In the stationary (time-independent) case, setting\(\partial_t u = -\bar{H}\) (the ergodic constant), the MFG system reduces to:
$$-\nu \Delta u + \frac{1}{2}|\nabla u|^2 = F(x, \rho) + \bar{H}$$
$$-\nu \Delta \rho - \operatorname{div}(\rho \nabla u) = 0$$
The stationary value function \(u(x)\)represents the long-run cost of being at location\(x\). This is precisely the bid-rent function from urban economics (Module 4): the maximum rent an agent is willing to pay at location \(x\) in equilibrium.
The density \(\rho(x)\) is the equilibrium population distribution. The MFG system simultaneously determines both the rent gradient and the population distribution—extending Alonso-Muth-Mills to a fully dynamic framework with strategic agents.
12.2.5 Price of Anarchy and Pigouvian Tax
The MFG equilibrium is a Nash equilibrium, but it is generally not socially optimal. Each agent ignores the externality they impose on others through congestion. The Price of Anarchy (PoA) quantifies this inefficiency:
$$\text{PoA} = \frac{\text{Social cost at Nash equilibrium}}{\text{Minimum social cost}} \leq e^{1/\gamma}$$
The bound depends on the congestion exponent\(\gamma\). For linear congestion (\(\gamma = 1\)), PoA\(\leq e \approx 2.718\)—the Nash equilibrium can be nearly three times worse than the social optimum.
Pigouvian Congestion Tax
To align individual incentives with social welfare, we add a Pigouvian taxthat internalises the congestion externality. The optimal tax at the socially optimal density\(\rho^*\) is:
$$\tau(x) = \gamma \, \rho^*(x)^\gamma$$
This equals the marginal externality: the additional cost one agent imposes on all others. With this tax, the Nash equilibrium coincides with the social optimum—the Price of Anarchy becomes 1.
12.2.6 MFG on Networks and Wardrop Limit
The MFG framework extends naturally to networks (graphs). On a graph with nodes\(i = 1, \ldots, N\) and edges\(e_{ij}\), the discrete MFG system is:
$$u_i = \min_{j \sim i} \left\{c_{ij}(\rho_{ij}) + u_j\right\} \qquad \text{(discrete HJB)}$$
$$\rho_i = \sum_{j: i \to j \text{ optimal}} \rho_j \qquad \text{(discrete FP / flow conservation)}$$
In the limit \(\nu \to 0\) (no randomness), agents follow deterministic shortest paths. The MFG equilibrium reduces to the Wardrop equilibrium of traffic assignment: all used routes have equal cost, and no agent can improve by switching. The MFG framework thus provides a stochastic generalisation of the classical Wardrop equilibrium, with\(\nu\) playing the role of a “temperature” controlling the randomness of route choice.
12.2.7 Simulation: Solving the MFG System
We solve the stationary MFG system via fixed-point iteration: solve HJB for\(u\) given\(\rho\), then solve FP for\(\rho\) given\(u\), and iterate until convergence.
MFG Solver: Fixed-Point Iteration (HJB ↔ FP)
PythonClick Run to execute the Python code
Code will be executed with Python 3 on the server
Key Takeaways
- The MFG system couples HJB (backward, optimal control) with FP (forward, density evolution) through the feedback \(F(x, \rho)\).
- Three canonical coupling functions:\(F = \rho^\gamma\) (local),\(F = K * \rho\) (nonlocal),\(F = \ln\rho\) (entropic).
- Monotone coupling (congestion aversion) guarantees uniqueness via the Lasry-Lions condition.
- The stationary MFG value function \(u(x)\) is the bid-rent function from urban economics.
- Price of Anarchy \(\leq e^{1/\gamma}\); Pigouvian tax \(\tau = \gamma\rho^{*\gamma}\) restores social optimality.
- On networks, MFG reduces to Wardrop equilibrium as \(\nu \to 0\).