97
Mean Field Games: Numerical Methods and Applications in Machine Learning Part 1: Introduction & LQMFG Mathieu LAURIÈRE https://mlauriere.github.io/teaching/MFG-PKU-1.pdf Peking University Summer School on Applied Mathematics July 26 – August 6, 2021

Mean Field Games: Numerical Methods and Applications in

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Mean Field Games: Numerical Methods and Applications in

Mean Field Games:Numerical Methods and

Applications in Machine Learning

Part 1: Introduction & LQMFG

Mathieu LAURIÈRE

https://mlauriere.github.io/teaching/MFG-PKU-1.pdf

Peking UniversitySummer School on Applied Mathematics

July 26 – August 6, 2021

Page 2: Mean Field Games: Numerical Methods and Applications in

Outline

1. IntroductionMean Field GamesOptimal Control and Games

2. From N to infinity

3. Warm-up: LQMFG

Page 3: Mean Field Games: Numerical Methods and Applications in

Outline

1. IntroductionMean Field GamesOptimal Control and Games

2. From N to infinity

3. Warm-up: LQMFG

Page 4: Mean Field Games: Numerical Methods and Applications in

MFGs & Applied Mathematics

Analysis

Numerics Stochastics

Machine Learning

1 / 44

Page 5: Mean Field Games: Numerical Methods and Applications in

MFGs Research Landscape

Initiated by Lasry & Lions [LL07], and Caines, Huang & Malhamé [HMC06]

Main research directions:

(1) Modeling: economics, crowd motion, flocking, risk management, smart grid, energyproduction, distributed robotics, opinion dynamics, epidemics, . . .

(2) Mean field theory: justification of the approximation:� N -agent problem→ mean field: convergence of equilibria / optimal control

� N -agent problem← mean field: ε-Nash equilibrium / ε-optimality

(3) Characterization of the mean field problems solutions (optimality conditions):� analytical: partial differential equations (PDEs)

� probabilistic: stochastic differential equations (SDEs)

(4) Computation of solutions� crucial for applications

� challenging (coupling between optimization & mean-field)

2 / 44

Page 6: Mean Field Games: Numerical Methods and Applications in

MFGs Research Landscape

Initiated by Lasry & Lions [LL07], and Caines, Huang & Malhamé [HMC06]

Main research directions:

(1) Modeling: economics, crowd motion, flocking, risk management, smart grid, energyproduction, distributed robotics, opinion dynamics, epidemics, . . .

(2) Mean field theory: justification of the approximation:� N -agent problem→ mean field: convergence of equilibria / optimal control

� N -agent problem← mean field: ε-Nash equilibrium / ε-optimality

(3) Characterization of the mean field problems solutions (optimality conditions):� analytical: partial differential equations (PDEs)

� probabilistic: stochastic differential equations (SDEs)

(4) Computation of solutions� crucial for applications

� challenging (coupling between optimization & mean-field)

2 / 44

Page 7: Mean Field Games: Numerical Methods and Applications in

MFGs Research Landscape

Initiated by Lasry & Lions [LL07], and Caines, Huang & Malhamé [HMC06]

Main research directions:

(1) Modeling: economics, crowd motion, flocking, risk management, smart grid, energyproduction, distributed robotics, opinion dynamics, epidemics, . . .

(2) Mean field theory: justification of the approximation:� N -agent problem→ mean field: convergence of equilibria / optimal control

� N -agent problem← mean field: ε-Nash equilibrium / ε-optimality

(3) Characterization of the mean field problems solutions (optimality conditions):� analytical: partial differential equations (PDEs)

� probabilistic: stochastic differential equations (SDEs)

(4) Computation of solutions� crucial for applications

� challenging (coupling between optimization & mean-field)

2 / 44

Page 8: Mean Field Games: Numerical Methods and Applications in

MFGs Research Landscape

Initiated by Lasry & Lions [LL07], and Caines, Huang & Malhamé [HMC06]

Main research directions:

(1) Modeling: economics, crowd motion, flocking, risk management, smart grid, energyproduction, distributed robotics, opinion dynamics, epidemics, . . .

(2) Mean field theory: justification of the approximation:� N -agent problem→ mean field: convergence of equilibria / optimal control

� N -agent problem← mean field: ε-Nash equilibrium / ε-optimality

(3) Characterization of the mean field problems solutions (optimality conditions):� analytical: partial differential equations (PDEs)

� probabilistic: stochastic differential equations (SDEs)

(4) Computation of solutions� crucial for applications

� challenging (coupling between optimization & mean-field)

2 / 44

Page 9: Mean Field Games: Numerical Methods and Applications in

Some References

Introduction to Mean Field Games:I Pierre-Louis Lions’ lectures at Collège de France

https://www.college-de-france.fr/site/pierre-louis-lions/index.htmI Pierre Cardaliaguet’s notes (2013):

https://www.ceremade.dauphine.fr/ cardaliaguet/MFG20130420.pdfI Cardaliaguet, P., & Porretta, A. (2020). An Introduction to Mean Field Game Theory. In Mean Field Games (pp.

1-158). Springer, Cham.I Carmona, Delarue, Graves, Lacker, Laurière, Malhamé & Ramanan: Lecture notes of the 2020 AMS Short

Course on Mean Field Games (American Mathematical Society), organized by François Delarue

Monographs on Mean Field Games and Mean Field Control:I [BFY’13]: Bensoussan, A., Frehse, J., & Yam, P. (2013). Mean field games and mean field type control theory

(Vol. 101). New York: Springer.I [CD’18, Vol. I]: Carmona, R., & Delarue, F. (2018). Probabilistic Theory of Mean Field Games with Applications I:

Mean Field FBSDEs, Control, and Games (Vol. 83). Springer.I [CD’18, Vol. II]: Carmona, R., & Delarue, F. (2018). Probabilistic Theory of Mean Field Games with Applications

II: Mean Field Games with Common Noise and Master Equations (Vol. 84). Springer.

Surveys about numerical methods for MFGs:I Achdou, Y. (2013). Finite difference methods for mean field games. In Hamilton-Jacobi equations:

approximations, numerical analysis and applications (pp. 1-47). Springer, Berlin, Heidelberg.I Achdou, Y., & Laurière, M. (2020). Mean Field Games and Applications: Numerical Aspects. Mean Field Games:

Cetraro, Italy 2019, 2281, 249.I [L., AMS notes’21]: Lauriere, M. (2021). Numerical Methods for Mean Field Games and Mean Field Type

Control. arXiv preprint arXiv:2106.06231.I Carmona, R., & Laurière, M. (2021). Deep Learning for Mean Field Games and Mean Field Control with

Applications to Finance. arXiv preprint arXiv:2107.04568.

3 / 44

Page 10: Mean Field Games: Numerical Methods and Applications in

Outline

1. IntroductionMean Field GamesOptimal Control and Games

2. From N to infinity

3. Warm-up: LQMFG

Page 11: Mean Field Games: Numerical Methods and Applications in

Optimal Control

Key ingredients:

state

action

cost

4 / 44

Page 12: Mean Field Games: Numerical Methods and Applications in

Games

Multiple agents:• Competition: Nash equilibrium, individual cost→ “game”

• Cooperation: Social optimum, social cost→ “control”

Example: 2 players, 2 actions each, matrix of costs (to be minimized):

Bobb1 b2

Alice a1 (4, 6)

, SC = 5

(6, 8)

, SC = 7

a2 (7, 5)

, SC = 6

5 / 44

Page 13: Mean Field Games: Numerical Methods and Applications in

Games

Multiple agents:• Competition: Nash equilibrium, individual cost→ “game”• Cooperation: Social optimum, social cost→ “control”

Example: 2 players, 2 actions each, matrix of costs (to be minimized):

Bobb1 b2

Alice a1 (4, 6)

, SC = 5

(6, 8)

, SC = 7

a2 (7, 5)

, SC = 6

5 / 44

Page 14: Mean Field Games: Numerical Methods and Applications in

Games

Multiple agents:• Competition: Nash equilibrium, individual cost→ “game”• Cooperation: Social optimum, social cost→ “control”

Example: 2 players, 2 actions each, matrix of costs (to be minimized):

Bobb1 b2

Alice a1 (4, 6)

, SC = 5

(6, 8)

, SC = 7

a2 (7, 5)

, SC = 6

5 / 44

Page 15: Mean Field Games: Numerical Methods and Applications in

Games

Multiple agents:• Competition: Nash equilibrium, individual cost→ “game”• Cooperation: Social optimum, social cost→ “control”

Example: 2 players, 2 actions each, matrix of costs (to be minimized):

Bobb1 b2

Alice a1 (4, 6), SC = 5 (6, 8), SC = 7a2 (7, 5), SC = 6

5 / 44

Page 16: Mean Field Games: Numerical Methods and Applications in

Games

Multiple agents:• Competition: Nash equilibrium, individual cost→ “game”• Cooperation: Social optimum, social cost→ “control”

Example: 2 players, 2 actions each, matrix of costs (to be minimized):

Bobb1 b2

Alice a1 (4, 6), SC = 5 (6, 8), SC = 7a2 (7, 5), SC = 6 (1, 7), SC = 4

5 / 44

Page 17: Mean Field Games: Numerical Methods and Applications in

Games

Multiple agents:• Competition: Nash equilibrium, individual cost→ “game”• Cooperation: Social optimum, social cost→ “control”

Example: 2 players, 2 actions each, matrix of costs (to be minimized):

Bobb1 b2

Alice a1 (4, 6), SC = 5 (6, 8), SC = 7a2 (7, 5), SC = 6 (2, 2), SC = 2

5 / 44

Page 18: Mean Field Games: Numerical Methods and Applications in

Games

Multiple agents:• Competition: Nash equilibrium, individual cost→ “game”• Cooperation: Social optimum, social cost→ “control”

Example: 2 players, 2 actions each, matrix of costs (to be minimized):

Bobb1 b2

Alice a1 (4, 6), SC = 5 (6, 8), SC = 7a2 (7, 5), SC = 6 (2, 2), SC = 2

5 / 44

Page 19: Mean Field Games: Numerical Methods and Applications in

Outline

1. Introduction

2. From N to infinityExample 1: Population DistributionExample 2: FlockingExample 3: Price Impact

3. Warm-up: LQMFG

Page 20: Mean Field Games: Numerical Methods and Applications in

Intuition

6 / 44

Page 21: Mean Field Games: Numerical Methods and Applications in

Outline

1. Introduction

2. From N to infinityExample 1: Population DistributionExample 2: FlockingExample 3: Price Impact

3. Warm-up: LQMFG

Page 22: Mean Field Games: Numerical Methods and Applications in

A Static Example: Towel on the Beach

N players (people)State = position of the towel. Space:S = {−M,−M + 1, . . . ,−1, 0, 1, . . . ,M − 1,M}Simultaneously choose their location: xi, i = 1, . . . , NPopulation distribution:

µ(x) = |{j : xj = x}|/N, x ∈ S

Each player pays a cost:I density of people at their locationI distance to a point of interestI mean position of the populationI . . .

7 / 44

Page 23: Mean Field Games: Numerical Methods and Applications in

A Static Example: Towel on the Beach

N players (people)State = position of the towel. Space:S = {−M,−M + 1, . . . ,−1, 0, 1, . . . ,M − 1,M}Simultaneously choose their location: xi, i = 1, . . . , NPopulation distribution:

µ(x) = |{j : xj = x}|/N, x ∈ S

Each player pays a cost:I density of people at their locationI distance to a point of interestI mean position of the populationI . . .

7 / 44

Page 24: Mean Field Games: Numerical Methods and Applications in

A Static Example: Towel on the Beach

N players (people)

State = position of the towel. Space:S = {−M,−M + 1, . . . ,−1, 0, 1, . . . ,M − 1,M}

Simultaneously choose their location: xi, i = 1, . . . , NPopulation distribution:

µ(x) = |{j : xj = x}|/N, x ∈ S

Each player pays a cost:I density of people at their locationI distance to a point of interestI mean position of the populationI . . .

7 / 44

Page 25: Mean Field Games: Numerical Methods and Applications in

A Static Example: Towel on the Beach

N players (people)

State = position of the towel. Space:S = {−M,−M + 1, . . . ,−1, 0, 1, . . . ,M − 1,M}Simultaneously choose their location: xi, i = 1, . . . , N

Population distribution:

µ(x) = |{j : xj = x}|/N, x ∈ S

Each player pays a cost:I density of people at their locationI distance to a point of interestI mean position of the populationI . . .

7 / 44

Page 26: Mean Field Games: Numerical Methods and Applications in

A Static Example: Towel on the Beach

N players (people)

State = position of the towel. Space:S = {−M,−M + 1, . . . ,−1, 0, 1, . . . ,M − 1,M}Simultaneously choose their location: xi, i = 1, . . . , NPopulation distribution:

µ(x) = |{j : xj = x}|/N, x ∈ S

Each player pays a cost:I density of people at their locationI distance to a point of interestI mean position of the populationI . . .

7 / 44

Page 27: Mean Field Games: Numerical Methods and Applications in

A Static Example: Towel on the Beach

N players (people)

State = position of the towel. Space:S = {−M,−M + 1, . . . ,−1, 0, 1, . . . ,M − 1,M}Simultaneously choose their location: xi, i = 1, . . . , NPopulation distribution:

µ(x) = |{j : xj = x}|/N, x ∈ S

Each player pays a cost:I density of people at their locationI distance to a point of interestI mean position of the populationI . . .

7 / 44

Page 28: Mean Field Games: Numerical Methods and Applications in

A Static Example: Towel on the Beach

Infinitely many players (people)

Simultaneously choose their location

Population distribution µ on S

8 / 44

Page 29: Mean Field Games: Numerical Methods and Applications in

A Static Example: Towel on the Beach

9 / 44

Page 30: Mean Field Games: Numerical Methods and Applications in

A Static Example: Towel on the Beach

What if people cooperate instead of competing?

10 / 44

Page 31: Mean Field Games: Numerical Methods and Applications in

A Static Example: Towel on the Beach

What if people cooperate instead of competing?

10 / 44

Page 32: Mean Field Games: Numerical Methods and Applications in

Outline

1. Introduction

2. From N to infinityExample 1: Population DistributionExample 2: FlockingExample 3: Price Impact

3. Warm-up: LQMFG

Page 33: Mean Field Games: Numerical Methods and Applications in

A Dynamic Example: Flocking

Flocking model Cucker & Smale [CS07], . . . :N players (birds)State: (position, velocity). Space: S = R3 × R3

Player i chooses their acceleration: ai ∈ R3, i = 1, . . . , NDynamics: {

xin+1 = xin + vin∆t,vin+1 = vin + ain∆t+ εin+1

Each player pays a cost of velocity misalignment:

fflock,iβ (x, v) =

∥∥∥∥∥ 1N

N∑j=1

(vi − vj

)(1 + ‖xi − xj‖2)β

∥∥∥∥∥2

,

where β ≥ 0 is a parameterPopulation distribution µNn on S

µNn = 1N

N∑j=1

δ(xjn,v

jn)

New writing for fflock,iβ

11 / 44

Page 34: Mean Field Games: Numerical Methods and Applications in

A Dynamic Example: Flocking

Flocking model Cucker & Smale [CS07], . . . :N players (birds)State: (position, velocity). Space: S = R3 × R3

Player i chooses their acceleration: ai ∈ R3, i = 1, . . . , NDynamics: {

xin+1 = xin + vin∆t,vin+1 = vin + ain∆t+ εin+1

Each player pays a cost of velocity misalignment:

fflock,iβ (x, v) =

∥∥∥∥∥ 1N

N∑j=1

(vi − vj

)(1 + ‖xi − xj‖2)β

∥∥∥∥∥2

,

where β ≥ 0 is a parameterPopulation distribution µNn on S

µNn = 1N

N∑j=1

δ(xjn,v

jn)

New writing for fflock,iβ

11 / 44

Page 35: Mean Field Games: Numerical Methods and Applications in

A Dynamic Example: Flocking

Flocking model Cucker & Smale [CS07], . . . :N players (birds)State: (position, velocity). Space: S = R3 × R3

Player i chooses their acceleration: ai ∈ R3, i = 1, . . . , NDynamics: {

xin+1 = xin + vin∆t,vin+1 = vin + ain∆t+ εin+1

Each player pays a cost of velocity misalignment:

fflock,iβ (x, v) =

∥∥∥∥∥ 1N

N∑j=1

(vi − vj

)(1 + ‖xi − xj‖2)β

∥∥∥∥∥2

,

where β ≥ 0 is a parameterPopulation distribution µNn on S

µNn = 1N

N∑j=1

δ(xjn,v

jn)

New writing for fflock,iβ

11 / 44

Page 36: Mean Field Games: Numerical Methods and Applications in

A Dynamic Example: Flocking

Flocking model Cucker & Smale [CS07], . . . :N players (birds)State: (position, velocity). Space: S = R3 × R3

Player i chooses their acceleration: ai ∈ R3, i = 1, . . . , NDynamics: {

xin+1 = xin + vin∆t,vin+1 = vin + ain∆t+ εin+1

Each player pays a cost of velocity misalignment:

fflock,iβ (x, v) =

∥∥∥∥∥ 1N

N∑j=1

(vi − vj

)(1 + ‖xi − xj‖2)β

∥∥∥∥∥2

,

where β ≥ 0 is a parameter

Population distribution µNn on S

µNn = 1N

N∑j=1

δ(xjn,v

jn)

New writing for fflock,iβ

11 / 44

Page 37: Mean Field Games: Numerical Methods and Applications in

A Dynamic Example: Flocking

Flocking model Cucker & Smale [CS07], . . . :N players (birds)State: (position, velocity). Space: S = R3 × R3

Player i chooses their acceleration: ai ∈ R3, i = 1, . . . , NDynamics: {

xin+1 = xin + vin∆t,vin+1 = vin + ain∆t+ εin+1

Each player pays a cost of velocity misalignment:

fflock,iβ (x, v) =

∥∥∥∥∥ 1N

N∑j=1

(vi − vj

)(1 + ‖xi − xj‖2)β

∥∥∥∥∥2

,

where β ≥ 0 is a parameterPopulation distribution µNn on S

µNn = 1N

N∑j=1

δ(xjn,v

jn)

New writing for fflock,iβ

11 / 44

Page 38: Mean Field Games: Numerical Methods and Applications in

A Dynamic Example: Flocking

Mean Field Game version (see Nourian, Caines & Malhamé [NCM11], . . . ):

Infinitely many players (birds)

Population distribution µ on S:

µNn −−−−→N→∞

µn

Each player pays a cost of velocity misalignment:

fflockβ (x, v, µ) =

∥∥∥∥∫R3×R3

(v − v′)(1 + ‖x− x′‖2)β

dµ(x′, v′)∥∥∥∥2

,

where β ≥ 0

12 / 44

Page 39: Mean Field Games: Numerical Methods and Applications in

A Dynamic Example: Flocking

Mean Field Game version (see Nourian, Caines & Malhamé [NCM11], . . . ):

Infinitely many players (birds)

Population distribution µ on S:

µNn −−−−→N→∞

µn

Each player pays a cost of velocity misalignment:

fflockβ (x, v, µ) =

∥∥∥∥∫R3×R3

(v − v′)(1 + ‖x− x′‖2)β

dµ(x′, v′)∥∥∥∥2

,

where β ≥ 0

12 / 44

Page 40: Mean Field Games: Numerical Methods and Applications in

A Dynamic Example: Flocking

13 / 44

Page 41: Mean Field Games: Numerical Methods and Applications in

Outline

1. Introduction

2. From N to infinityExample 1: Population DistributionExample 2: FlockingExample 3: Price Impact

3. Warm-up: LQMFG

Page 42: Mean Field Games: Numerical Methods and Applications in

Another Dynamic Example: Price Impact

N players (traders)State of player i: (Si, Xi,Ki) ∈ R3

I Price process:

with ν = population’s distribution over actions = 1N

∑N

j=1 δvj ,

dSt = σ0dW0t

+ γ

∫Radνt(a)dt

I Inventory: action = trading speed vitdXi

t = vitdt+ σdW it

I Wealth:dKi

t = −(vitSt + |vit|2

)dt

Payoff of player i:

J i() = E[V iT −

∫ T

0|Xi

t |2dt− |XiT |2]

where V it = Kit +Xi

tSt = portfolio value

14 / 44

Page 43: Mean Field Games: Numerical Methods and Applications in

Another Dynamic Example: Price Impact

N players (traders)

State of player i: (Si, Xi,Ki) ∈ R3

I Price process:

with ν = population’s distribution over actions = 1N

∑N

j=1 δvj ,

dSt = σ0dW0t

+ γ

∫Radνt(a)dt

I Inventory: action = trading speed vit

dXit = vitdt+ σdW i

t

I Wealth:dKi

t = −(vitSt + |vit|2

)dt

Payoff of player i:

J i() = E[V iT −

∫ T

0|Xi

t |2dt− |XiT |2]

where V it = Kit +Xi

tSt = portfolio value

14 / 44

Page 44: Mean Field Games: Numerical Methods and Applications in

Another Dynamic Example: Price Impact

N players (traders)

State of player i: (Si, Xi,Ki) ∈ R3

I Price process:

with ν = population’s distribution over actions = 1N

∑N

j=1 δvj ,

dSt = σ0dW0t

+ γ

∫Radνt(a)dt

I Inventory: action = trading speed vit

dXit = vitdt+ σdW i

t

I Wealth:dKi

t = −(vitSt + |vit|2

)dt

Payoff of player i:

J i(vi) = E[V iT −

∫ T

0|Xi

t |2dt− |XiT |2]

where V it = Kit +Xi

tSt = portfolio value

14 / 44

Page 45: Mean Field Games: Numerical Methods and Applications in

Another Dynamic Example: Price Impact

N players (traders)

State of player i: (Si, Xi,Ki) ∈ R3

I Price process: with ν = population’s distribution over actions = 1N

∑N

j=1 δvj ,

dSt = σ0dW0t + γ

∫Radνt(a)dt

I Inventory: action = trading speed vit

dXit = vitdt+ σdW i

t

I Wealth:dKi

t = −(vitSt + |vit|2

)dt

Payoff of player i:

J i(v1, . . . , vN ) = E[V iT −

∫ T

0|Xi

t |2dt− |XiT |2]

where V it = Kit +Xi

tSt = portfolio value

14 / 44

Page 46: Mean Field Games: Numerical Methods and Applications in

Another Dynamic Example: Price Impact

MFG version (see Carmona & Lacker [CL15], Carmona & Delarue [CD18], . . . ):

Infinitely many players (traders)

State of a typical player: (S,X,K) ∈ R3

I Price process: with ν = traders’ distribution of actions,

dSt = σ0dW0t + γ

∫Radνt(a)dt

I Inventory: Typical agent’s inventory:

dXvt = vtdt+ σdWt

I Wealth: Typical agent’s wealth:

dKvt = −

(vtSt + |vt|2

)dt

Payoff of a typical player:

J(v, ν) = E[V vT −

∫ T

0|Xv

t |2dt− |XvT |2]

where V vt = Kvt +Xv

t St = portfolio value

15 / 44

Page 47: Mean Field Games: Numerical Methods and Applications in

Another Dynamic Example: Price Impact

MFG version (see Carmona & Lacker [CL15], Carmona & Delarue [CD18], . . . ):

Infinitely many players (traders)

State of a typical player: (S,X,K) ∈ R3

I Price process: with ν = traders’ distribution of actions,

dSt = σ0dW0t + γ

∫Radνt(a)dt

I Inventory: Typical agent’s inventory:

dXvt = vtdt+ σdWt

I Wealth: Typical agent’s wealth:

dKvt = −

(vtSt + |vt|2

)dt

Payoff of a typical player:

J(v, ν) = E[V vT −

∫ T

0|Xv

t |2dt− |XvT |2]

where V vt = Kvt +Xv

t St = portfolio value

15 / 44

Page 48: Mean Field Games: Numerical Methods and Applications in

Another Dynamic Example: Price Impact

Simpler rewriting:I By the self-financing condition,

dV vt =[− |vt|2 + γXv

t

∫Radνt(a)

]dt+ σStdWt + σ0X

vt dW

0t

I Hence: maximize

J(v, ν) = E[∫ T

0

(γXv

t

∫Radνt(a)− |vt|2 − |Xv

t |2)dt+ |Xv

T |2]

subject to inventory dynamics:

dXvt = vtdt+ σdWt

Linear-Quadratic (LQ) structure

16 / 44

Page 49: Mean Field Games: Numerical Methods and Applications in

Another Dynamic Example: Price Impact

17 / 44

Page 50: Mean Field Games: Numerical Methods and Applications in

More Examples

18 / 44

Page 51: Mean Field Games: Numerical Methods and Applications in

Outline

1. Introduction

2. From N to infinity

3. Warm-up: LQMFGDefinition of the ProblemAlgorithmsMFC & Price of Anarchy

Page 52: Mean Field Games: Numerical Methods and Applications in

Outline

1. Introduction

2. From N to infinity

3. Warm-up: LQMFGDefinition of the ProblemAlgorithmsMFC & Price of Anarchy

Page 53: Mean Field Games: Numerical Methods and Applications in

Linear-Quadratic N-Player Game

N playersState space: S = Rd; action space: A = Rk

Dynamics for player i: initial position Xi0 ∼ N (x0, σ

20),

dXit = b(Xi

t , µNt , v

it)dt+ σdW i

t , t ≥ 0,with µNt = mean position at time t and

b(x,m, v) = Ax+ Am+Bv

where Xi0 and W i are i.i.d.

Cost for player i:

J i(v1, . . . , vN ) = E[∫ T

0f(Xi

t , µNt , v

it)dt+ g(Xi

T , µNT )]

with

f(x,m, v) = 12[Qx2 + Q (x− Sm)2 + Cv2]

g(x,m) = 12[QTx

2 + QT (x− STm)2]Nash equilibrium: v = (v1, . . . , vN ) s.t. for all i, for all vi

J i(v1, . . . , vi−1, vi, vi+1, . . . , vN ) ≤ J i(v1, . . . , vi−1, vi, vi+1, . . . , vN )

19 / 44

Page 54: Mean Field Games: Numerical Methods and Applications in

Linear-Quadratic N-Player Game

N playersState space: S = Rd; action space: A = Rk

Dynamics for player i: initial position Xi0 ∼ N (x0, σ

20),

dXit = b(Xi

t , µNt , v

it)dt+ σdW i

t , t ≥ 0,with µNt = mean position at time t and

b(x,m, v) = Ax+ Am+Bv

where Xi0 and W i are i.i.d.

Cost for player i:

J i(v1, . . . , vN ) = E[∫ T

0f(Xi

t , µNt , v

it)dt+ g(Xi

T , µNT )]

with

f(x,m, v) = 12[Qx2 + Q (x− Sm)2 + Cv2]

g(x,m) = 12[QTx

2 + QT (x− STm)2]

Nash equilibrium: v = (v1, . . . , vN ) s.t. for all i, for all vi

J i(v1, . . . , vi−1, vi, vi+1, . . . , vN ) ≤ J i(v1, . . . , vi−1, vi, vi+1, . . . , vN )

19 / 44

Page 55: Mean Field Games: Numerical Methods and Applications in

Linear-Quadratic N-Player Game

N playersState space: S = Rd; action space: A = Rk

Dynamics for player i: initial position Xi0 ∼ N (x0, σ

20),

dXit = b(Xi

t , µNt , v

it)dt+ σdW i

t , t ≥ 0,with µNt = mean position at time t and

b(x,m, v) = Ax+ Am+Bv

where Xi0 and W i are i.i.d.

Cost for player i:

J i(v1, . . . , vN ) = E[∫ T

0f(Xi

t , µNt , v

it)dt+ g(Xi

T , µNT )]

with

f(x,m, v) = 12[Qx2 + Q (x− Sm)2 + Cv2]

g(x,m) = 12[QTx

2 + QT (x− STm)2]Nash equilibrium: v = (v1, . . . , vN ) s.t. for all i, for all vi

J i(v1, . . . , vi−1, vi, vi+1, . . . , vN ) ≤ J i(v1, . . . , vi−1, vi, vi+1, . . . , vN )19 / 44

Page 56: Mean Field Games: Numerical Methods and Applications in

Linear-Quadratic Mean Field Game

Reminder: N player Nash equilibrium: v = (v1, . . . , vN ) s.t. for all i, for all vi

J i(v1, . . . , vi−1, vi, vi+1, . . . , vN ) ≤ J i(v1, . . . , vi−1, vi, vi+1, . . . , vN )

By symmetry & homogeneity, we can write J i(v1, . . . , vN ) = JMFNE(vi, µN )

Reformulation: v = v1, . . . , vN s.t. for all i, for all vi

JMFNE(vi, µN ) ≤ JMFNE(vi, µN )

where {µN = mean process with (v1, . . . , vi−1, vi, vi+1, . . . , vN )µN = mean process with (v1, . . . , vi−1, vi, vi+1, . . . , vN )

Mean Field Nash equilibrium: (v, µ) s.t. for all v

JMFNE(v, µ) ≤ JMFNE(v, µ)

whereµ = mean process if everybody uses v

20 / 44

Page 57: Mean Field Games: Numerical Methods and Applications in

Linear-Quadratic Mean Field Game

Reminder: N player Nash equilibrium: v = (v1, . . . , vN ) s.t. for all i, for all vi

J i(v1, . . . , vi−1, vi, vi+1, . . . , vN ) ≤ J i(v1, . . . , vi−1, vi, vi+1, . . . , vN )

By symmetry & homogeneity, we can write J i(v1, . . . , vN ) = JMFNE(vi, µN )Reformulation: v = v1, . . . , vN s.t. for all i, for all vi

JMFNE(vi, µN ) ≤ JMFNE(vi, µN )

where {µN = mean process with (v1, . . . , vi−1, vi, vi+1, . . . , vN )µN = mean process with (v1, . . . , vi−1, vi, vi+1, . . . , vN )

Mean Field Nash equilibrium: (v, µ) s.t. for all v

JMFNE(v, µ) ≤ JMFNE(v, µ)

whereµ = mean process if everybody uses v

20 / 44

Page 58: Mean Field Games: Numerical Methods and Applications in

Linear-Quadratic Mean Field Game

Reminder: N player Nash equilibrium: v = (v1, . . . , vN ) s.t. for all i, for all vi

J i(v1, . . . , vi−1, vi, vi+1, . . . , vN ) ≤ J i(v1, . . . , vi−1, vi, vi+1, . . . , vN )

By symmetry & homogeneity, we can write J i(v1, . . . , vN ) = JMFNE(vi, µN )Reformulation: v = v1, . . . , vN s.t. for all i, for all vi

JMFNE(vi, µN ) ≤ JMFNE(vi, µN )

where {µN = mean process with (v1, . . . , vi−1, vi, vi+1, . . . , vN )µN = mean process with (v1, . . . , vi−1, vi, vi+1, . . . , vN )

Mean Field Nash equilibrium: (v, µ) s.t. for all v

JMFNE(v, µ) ≤ JMFNE(v, µ)

whereµ = mean process if everybody uses v

20 / 44

Page 59: Mean Field Games: Numerical Methods and Applications in

Linear-Quadratic Mean Field Game

What does it mean to “solve” this MFG?

population behavior µ = (µt)t∈[0,T ]

individual behavior v = (vt)t∈[0,T ]

individual value function u

Value function:u(t, x) = optimal cost-to-go

for a player starting at x at time t while the population flow is at equilibrium

21 / 44

Page 60: Mean Field Games: Numerical Methods and Applications in

Explicit Solution

Taking d = 1 to alleviate notation, it can be shown:µt = zt,

v(t, x) = −B(ptx+ rt)/C,

u(t, x) = 12ptx

2 + rtx+ st,

where (z, p, r, s) solve the following system of ordinary differential equations (ODEs):

dz

dt= (A+ A−B2C−1pt)zt −B2C−1rt, z0 = µ0,

−dpdt

= 2Apt −B2C−1p2t +Q+ Q, pT = QT + QT ,

−drdt

= (A−B2C−1pt)rt + (ptA− QS)zt, rT = −QTST zT ,

−dsdt

= νpt −12B

2C−1r2t + rtAzt + 1

2S2Qz2

t , sT = 12 QTS

2T z

2T .

Key points:

coupling between z and rforward-backward structure

22 / 44

Page 61: Mean Field Games: Numerical Methods and Applications in

Explicit Solution

Taking d = 1 to alleviate notation, it can be shown:µt = zt,

v(t, x) = −B(ptx+ rt)/C,

u(t, x) = 12ptx

2 + rtx+ st,

where (z, p, r, s) solve the following system of ordinary differential equations (ODEs):

dz

dt= (A+ A−B2C−1pt)zt −B2C−1rt, z0 = µ0,

−dpdt

= 2Apt −B2C−1p2t +Q+ Q, pT = QT + QT ,

−drdt

= (A−B2C−1pt)rt + (ptA− QS)zt, rT = −QTST zT ,

−dsdt

= νpt −12B

2C−1r2t + rtAzt + 1

2S2Qz2

t , sT = 12 QTS

2T z

2T .

Key points:

coupling between z and rforward-backward structure

22 / 44

Page 62: Mean Field Games: Numerical Methods and Applications in

Explicit Solution

Taking d = 1 to alleviate notation, it can be shown:µt = zt,

v(t, x) = −B(ptx+ rt)/C,

u(t, x) = 12ptx

2 + rtx+ st,

where (z, p, r, s) solve the following system of ordinary differential equations (ODEs):

dz

dt= (A+ A−B2C−1pt)zt −B2C−1rt, z0 = µ0,

−dpdt

= 2Apt −B2C−1p2t +Q+ Q, pT = QT + QT ,

−drdt

= (A−B2C−1pt)rt + (ptA− QS)zt, rT = −QTST zT ,

−dsdt

= νpt −12B

2C−1r2t + rtAzt + 1

2S2Qz2

t , sT = 12 QTS

2T z

2T .

Key points:

coupling between z and rforward-backward structure

22 / 44

Page 63: Mean Field Games: Numerical Methods and Applications in

Outline

1. Introduction

2. From N to infinity

3. Warm-up: LQMFGDefinition of the ProblemAlgorithmsMFC & Price of Anarchy

Page 64: Mean Field Games: Numerical Methods and Applications in

Algorithm 1: Banach-Picard Iterations

Input: Initial guess (z, r); number of iterations KOutput: Approximation of (z, r)

1 Initialize z(0) = z, r(0) = r2 for k = 0, 1, 2, . . . , K− 1 do3 Let r(k+1) be the solution to:

−drdt

= (A− PtB2C−1)rt + (PtA− QS)z(k)t , rT = −QTST z(k)

T

4 Let z(k+1) be the solution to:

dz

dt= (A+ A−B2C−1)zt −B2C−1r

(k+1)t , z0 = x0

5 return (z(K), r(K))

23 / 44

Page 65: Mean Field Games: Numerical Methods and Applications in

Algorithm 1: Banach-Picard Iterations – Illustration 1

Test case 1 (see [Lau21]1 for more details on the experiments)

0 10 20 30 40 50iteration k

10 5

10 3

10 1 |z(k + 1) z(k)||r(k + 1) r(k)|

0.0 0.2 0.4 0.6 0.8 1.0time

0.5

0.0

0.5

1.0

zr

1Lauriere, M. (2021). Numerical Methods for Mean Field Games and Mean Field Type Control. arXiv preprint

arXiv:2106.06231.24 / 44

Page 66: Mean Field Games: Numerical Methods and Applications in

Algorithm 1: Banach-Picard Iterations – Illustration 2

Test case 2 (see [L., AMS notes’21])

0 50 100 150 200iteration k

101

102 |z(k + 1) z(k)||r(k + 1) r(k)|

0.0 0.2 0.4 0.6 0.8 1.0time

50

0

50zr

0.0 0.2 0.4 0.6 0.8 1.0time

50

0

50

zr

25 / 44

Page 67: Mean Field Games: Numerical Methods and Applications in

Note: Banach-Picard Iterations with Damping

Input: Initial guess (z, r); damping δ ∈ [0, 1); number of iterations KOutput: Approximation of (z, r)

1 Initialize z(0) = z(0) = z, r(0) = r2 for k = 0, 1, 2, . . . , K− 1 do3 Let r(k+1) be the solution to:

−drdt

= (A− PtB2C−1)rt + (PtA− QS)z(k)t , rT = −QTST z(k)

T

4 Let z(k+1) be the solution to:

dz

dt= (A+ A−B2C−1)zt −B2C−1r

(k+1)t , z0 = x0

5 Let z(k+1) = δz(k) + (1− δ)z(k+1)

6 return (z(K), r(K))

26 / 44

Page 68: Mean Field Games: Numerical Methods and Applications in

Algorithm 1’: Banach-Picard Iterations with Damping – Illustration 1

Test case 2Damping = 0.1

0 50 100 150 200iteration k

10 5

10 3

10 1|z(k + 1) z(k)||r(k + 1) r(k)|

0.0 0.2 0.4 0.6 0.8 1.0time

1

0

1

2

zr

27 / 44

Page 69: Mean Field Games: Numerical Methods and Applications in

Algorithm 1’: Banach-Picard Iterations with Damping – Illustration 2

Test case 2Damping = 0.01

0 50 100 150 200iteration k

1.8 × 100

1.9 × 100

2 × 100

2.1 × 100

2.2 × 100

2.3 × 100

|z(k + 1) z(k)||r(k + 1) r(k)|

0.0 0.2 0.4 0.6 0.8 1.0time

2

0

2zr

0.0 0.2 0.4 0.6 0.8 1.0time

0

1

2

zr

28 / 44

Page 70: Mean Field Games: Numerical Methods and Applications in

Algorithm 2: Fictitious Play

Input: Initial guess (z, r); number of iterations KOutput: Approximation of (z, r)

1 Initialize z(0) = z(0) = z, r(0) = r2 for k = 0, 1, 2, . . . , K− 1 do3 Let r(k+1) be the solution to:

−drdt

= (A− PtB2C−1)rt + (PtA− QS)z(k)t , rT = −QTST z(k)

T

4 Let z(k+1) be the solution to:

dz

dt= (A+ A−B2C−1)zt −B2C−1r

(k+1)t , z0 = x0

5 Let z(k+1) = kk+1 z

(k) + 1k+1z

(k+1)

6 return (z(K), r(K))

29 / 44

Page 71: Mean Field Games: Numerical Methods and Applications in

Algorithm 2: Fictitious Play – Illustration

Test case 2

0 50 100 150 200iteration k

10 5

10 3

10 1|z(k + 1) z(k)||r(k + 1) r(k)|

0.0 0.2 0.4 0.6 0.8 1.0time

1

0

1

2

zr

30 / 44

Page 72: Mean Field Games: Numerical Methods and Applications in

Algorithms 1, 1’ & 2: Common Framework

Input: Initial guess (z, r); damping δ(·); number of iterations KOutput: Approximation of (z, r)

1 Initialize z(0) = z(0) = z, r(0) = r2 for k = 0, 1, 2, . . . , K− 1 do3 Let r(k+1) be the solution to:

−drdt

= (A− PtB2C−1)rt + (PtA− QS)z(k)t , rT = −QTST z(k)

T

4 Let z(k+1) be the solution to:

dz

dt= (A+ A−B2C−1)zt −B2C−1r

(k+1)t , z0 = x0

5 Let z(k+1) = δ(k)z(k) + (1− δ(k))z(k+1)

6 return (z(K), r(K))

Remark: Could put the damping on r instead of z.

31 / 44

Page 73: Mean Field Games: Numerical Methods and Applications in

Algorithm 3: Shooting Method

Intuition: instead of solving a backward equation, choose a starting point and tryto shoot for the right terminal point

Concretely: replace the forward-backward systemdz

dt= (A+ A−B2C−1pt)zt −B2C−1rt, z0 = µ0,

−drdt

= (A−B2C−1pt)rt + (ptA− QS)zt, rT = −QTST zT

by the forward-forward systemdζ

dt= (A+ A−B2C−1pt)ζt −B2C−1ρt, z0 = µ0,

−dρdt

= (A−B2C−1pt)ρt + (ptA− QS)ζt, ρ0 = chosen

and try to ensure: ρT = −QTST ζT

32 / 44

Page 74: Mean Field Games: Numerical Methods and Applications in

Algorithm 4: Newton Method – Intuition

Look for x∗ such that: f(x∗) = 0

Start from initial guess x0

Repeat:

xk+1 = xk −f(xk)f′(xk)

33 / 44

Page 75: Mean Field Games: Numerical Methods and Applications in

Aside: (Time) Discretization

Uniform grid on [0, T ], step ∆t

Discrete ODE system:

Zn+1 − Zn

∆t = (A+ A−B2C−1Pn)Zn+1 −B2C−1Rn,

Z0 = x0,

− Rn+1 −Rn

∆t = (A−B2C−1Pn)Rn + (PnA− QS)Zn+1,

RNT = −QTSTZNT .

34 / 44

Page 76: Mean Field Games: Numerical Methods and Applications in

Algorithm 4: Newton Method – Implementation

Recast the problem:

(Z,R) solve forward-forward discrete system⇔ F(Z,R) = 0.

F takes into account the initial and terminal conditions.

DF = differential of this operator

Input: Initial guess (Z, R); number of iterations KOutput: Approximation of (z, r)

1 Initialize (Z(0), R(0)) = (Z, R)2 for k = 0, 1, 2, . . . , K− 1 do3 Let (Z(k+1), R(k+1)) solve

DF(Z(k), R(k))(Z(k+1), R(k+1)) = −F(Z(k), R(k))

4 Let (Z(k+1), R(k+1)) = (Z(k+1), R(k+1)) + (Z(k), R(k))5 return (Z(K), R(K))

35 / 44

Page 77: Mean Field Games: Numerical Methods and Applications in

Algorithm 4: Newton Method – Illustration

Test case 2

1 2iteration

10 13

10 10

10 7

10 4

10 1 |z(k + 1) z(k)||r(k + 1) r(k)|

0.0 0.2 0.4 0.6 0.8 1.0time

1

0

1

2

zr

36 / 44

Page 78: Mean Field Games: Numerical Methods and Applications in

Algorithm 4: Newton Method – Explanation

Reminder: Discrete ODE system:

Zn+1 − Zn

∆t = (A+ A−B2C−1Pn)Zn+1 −B2C−1Rn,

Z0 = x0,

− Rn+1 −Rn

∆t = (A−B2C−1Pn)Rn + (PnA− QS)Zn+1,

RNT = −QTSTZNT .

Can be rewritten as a linear system:

M(ZR

)+ B = 0

37 / 44

Page 79: Mean Field Games: Numerical Methods and Applications in

Algorithm 4: Newton Method – Explanation

Reminder: Discrete ODE system:

Zn+1 − Zn

∆t = (A+ A−B2C−1Pn)Zn+1 −B2C−1Rn,

Z0 = x0,

− Rn+1 −Rn

∆t = (A−B2C−1Pn)Rn + (PnA− QS)Zn+1,

RNT = −QTSTZNT .

Can be rewritten as a linear system:

M(ZR

)+ B = 0

37 / 44

Page 80: Mean Field Games: Numerical Methods and Applications in

Outline

1. Introduction

2. From N to infinity

3. Warm-up: LQMFGDefinition of the ProblemAlgorithmsMFC & Price of Anarchy

Page 81: Mean Field Games: Numerical Methods and Applications in

Linear-Quadratic N-Agent Control

N agentsState space: S = Rd; action space: A = Rk

Dynamics for player i: initial position Xi0 ∼ N (x0, σ

20),

dXit = b(Xi

t , µNt , v

it)dt+ σdW i

t , t ≥ 0,

with µNt = mean position at time t and same b(·, ·, ·) as in MFGwhere Xi

0 and W i are i.i.d.

Cost for player i:

J i(v1, . . . , vN ) = E[∫ T

0f(Xi

t , µNt , v

it)dt+ g(Xi

T , µNT )]

with same f(·, ·, ·) and g(·, ·) as in MFGSocial cost for the population:

JSoc(v) = 1N

N∑i=1

J i(v)

Social optimum: v∗ = (v∗,1, . . . , v∗,N ) s.t. for all i, all v = (v1, . . . , vN )

JSoc(v∗) ≤ JSoc(v)

38 / 44

Page 82: Mean Field Games: Numerical Methods and Applications in

Linear-Quadratic N-Agent Control

N agentsState space: S = Rd; action space: A = Rk

Dynamics for player i: initial position Xi0 ∼ N (x0, σ

20),

dXit = b(Xi

t , µNt , v

it)dt+ σdW i

t , t ≥ 0,

with µNt = mean position at time t and same b(·, ·, ·) as in MFGwhere Xi

0 and W i are i.i.d.Cost for player i:

J i(v1, . . . , vN ) = E[∫ T

0f(Xi

t , µNt , v

it)dt+ g(Xi

T , µNT )]

with same f(·, ·, ·) and g(·, ·) as in MFG

Social cost for the population:

JSoc(v) = 1N

N∑i=1

J i(v)

Social optimum: v∗ = (v∗,1, . . . , v∗,N ) s.t. for all i, all v = (v1, . . . , vN )

JSoc(v∗) ≤ JSoc(v)

38 / 44

Page 83: Mean Field Games: Numerical Methods and Applications in

Linear-Quadratic N-Agent Control

N agentsState space: S = Rd; action space: A = Rk

Dynamics for player i: initial position Xi0 ∼ N (x0, σ

20),

dXit = b(Xi

t , µNt , v

it)dt+ σdW i

t , t ≥ 0,

with µNt = mean position at time t and same b(·, ·, ·) as in MFGwhere Xi

0 and W i are i.i.d.Cost for player i:

J i(v1, . . . , vN ) = E[∫ T

0f(Xi

t , µNt , v

it)dt+ g(Xi

T , µNT )]

with same f(·, ·, ·) and g(·, ·) as in MFGSocial cost for the population:

JSoc(v) = 1N

N∑i=1

J i(v)

Social optimum: v∗ = (v∗,1, . . . , v∗,N ) s.t. for all i, all v = (v1, . . . , vN )

JSoc(v∗) ≤ JSoc(v)

38 / 44

Page 84: Mean Field Games: Numerical Methods and Applications in

Linear-Quadratic N-Agent Control

N agentsState space: S = Rd; action space: A = Rk

Dynamics for player i: initial position Xi0 ∼ N (x0, σ

20),

dXit = b(Xi

t , µNt , v

it)dt+ σdW i

t , t ≥ 0,

with µNt = mean position at time t and same b(·, ·, ·) as in MFGwhere Xi

0 and W i are i.i.d.Cost for player i:

J i(v1, . . . , vN ) = E[∫ T

0f(Xi

t , µNt , v

it)dt+ g(Xi

T , µNT )]

with same f(·, ·, ·) and g(·, ·) as in MFGSocial cost for the population:

JSoc(v) = 1N

N∑i=1

J i(v)

Social optimum: v∗ = (v∗,1, . . . , v∗,N ) s.t. for all i, all v = (v1, . . . , vN )

JSoc(v∗) ≤ JSoc(v)

38 / 44

Page 85: Mean Field Games: Numerical Methods and Applications in

Linear-Quadratic Mean Field Control

Infinitely many agents

Mean field social cost:

JMFSoc(v) = E[∫ T

0f(Xt, µt, vt)dt+ g(XT , µT )

]where

dXt = b(Xt, µt, vt)dt+ σdWt, t ≥ 0,and

µ = µv = mean process if everybody uses v

= E[Xt]

Mean field social optimum: v∗, s.t. for all v

JMFSoc(v∗) ≤ JMFSoc(v)

Key point: v changes⇒ µv changes

39 / 44

Page 86: Mean Field Games: Numerical Methods and Applications in

Linear-Quadratic Mean Field Control

Infinitely many agents

Mean field social cost:

JMFSoc(v) = E[∫ T

0f(Xt, µt, vt)dt+ g(XT , µT )

]where

dXt = b(Xt, µt, vt)dt+ σdWt, t ≥ 0,and

µ = µv = mean process if everybody uses v = E[Xt]

Mean field social optimum: v∗, s.t. for all v

JMFSoc(v∗) ≤ JMFSoc(v)

Key point: v changes⇒ µv changes

39 / 44

Page 87: Mean Field Games: Numerical Methods and Applications in

Linear-Quadratic Mean Field Control

Infinitely many agents

Mean field social cost:

JMFSoc(v) = E[∫ T

0f(Xt, µt, vt)dt+ g(XT , µT )

]where

dXt = b(Xt, µt, vt)dt+ σdWt, t ≥ 0,and

µ = µv = mean process if everybody uses v = E[Xt]

Mean field social optimum: v∗, s.t. for all v

JMFSoc(v∗) ≤ JMFSoc(v)

Key point: v changes⇒ µv changes

39 / 44

Page 88: Mean Field Games: Numerical Methods and Applications in

Linear-Quadratic Mean Field Control

Infinitely many agents

Mean field social cost:

JMFSoc(v) = E[∫ T

0f(Xt, µt, vt)dt+ g(XT , µT )

]where

dXt = b(Xt, µt, vt)dt+ σdWt, t ≥ 0,and

µ = µv = mean process if everybody uses v = E[Xt]

Mean field social optimum: v∗, s.t. for all v

JMFSoc(v∗) ≤ JMFSoc(v)

Key point: v changes⇒ µv changes

39 / 44

Page 89: Mean Field Games: Numerical Methods and Applications in

Price of Anarchy

MFG solution: mean field Nash equilibrium: v s.t. for all v

JMFNE(v, µv) ≤ JMFNE(v, µv)

MFC solution: mean field social optimum: v∗ s.t. for all v

JMFSoc(v∗) ≤ JMFSoc(v)

For any v,JMFSoc(v) = JMFNE(v, µv)

In general:

v 6= v∗

µv 6= µv∗

JMFNE(v, µv) 6= JMFSoc(v∗)

Price of Anarcy (PoA):

PoA = JMFNE(v, µv)JMFSoc(v∗)

40 / 44

Page 90: Mean Field Games: Numerical Methods and Applications in

Price of Anarchy

MFG solution: mean field Nash equilibrium: v s.t. for all v

JMFNE(v, µv) ≤ JMFNE(v, µv)

MFC solution: mean field social optimum: v∗ s.t. for all v

JMFSoc(v∗) ≤ JMFSoc(v)

For any v,JMFSoc(v) = JMFNE(v, µv)

In general:

v 6= v∗

µv 6= µv∗

JMFNE(v, µv) 6= JMFSoc(v∗)

Price of Anarcy (PoA):

PoA = JMFNE(v, µv)JMFSoc(v∗)

40 / 44

Page 91: Mean Field Games: Numerical Methods and Applications in

Price of Anarchy

MFG solution: mean field Nash equilibrium: v s.t. for all v

JMFNE(v, µv) ≤ JMFNE(v, µv)

MFC solution: mean field social optimum: v∗ s.t. for all v

JMFSoc(v∗) ≤ JMFSoc(v)

For any v,JMFSoc(v) = JMFNE(v, µv)

In general:

v 6= v∗

µv 6= µv∗

JMFNE(v, µv) 6= JMFSoc(v∗)

Price of Anarcy (PoA):

PoA = JMFNE(v, µv)JMFSoc(v∗)

40 / 44

Page 92: Mean Field Games: Numerical Methods and Applications in

Price of Anarchy

MFG solution: mean field Nash equilibrium: v s.t. for all v

JMFNE(v, µv) ≤ JMFNE(v, µv)

MFC solution: mean field social optimum: v∗ s.t. for all v

JMFSoc(v∗) ≤ JMFSoc(v)

For any v,JMFSoc(v) = JMFNE(v, µv)

In general:

v 6= v∗

µv 6= µv∗

JMFNE(v, µv) 6= JMFSoc(v∗)

Price of Anarcy (PoA):

PoA = JMFNE(v, µv)JMFSoc(v∗)

40 / 44

Page 93: Mean Field Games: Numerical Methods and Applications in

Explicit Solution

Mean field social optimum: {µv

t = zt,

v∗(t, x) = −B(ptx+ rt)/C,

where (z, p, r, s) solve the following system of ODEs:

dz

dt= (A+ A−B2C−1)zt −B2C−1rt, z0 = x0,

−dpdt

= 2Apt −B2C−1p2t +Q+ Q, pT = QT + QT ,

−drdt

= (A+ A− ptB2C−1)rt + (2ptA− 2QS + QS2)zt, rT = −QTST zT ,

−dsdt

= νpt −12B

2C−1r2t + rtAzt + 1

2S2Qz2

t , sT = 12 QTS

2T z

2T .

41 / 44

Page 94: Mean Field Games: Numerical Methods and Applications in

Price of Anarchy – Illustration

0 5 10 15 20A

1.00

1.01

1.02

1.03

PoA

0 5 10 15 20QT

1.0130

1.0135

1.0140

PoA

0 5 10 15 20QT

1.01

1.02

1.03

1.04

1.05

1.06

PoA

42 / 44

Page 95: Mean Field Games: Numerical Methods and Applications in

Preview of Next Lectures

43 / 44

Page 96: Mean Field Games: Numerical Methods and Applications in

References I

[CD18] René Carmona and François Delarue, Probabilistic theory of mean field games withapplications. I, Probability Theory and Stochastic Modelling, vol. 83, Springer, Cham,2018, Mean field FBSDEs, control, and games. MR 3752669

[CL15] René Carmona and Daniel Lacker, A probabilistic weak formulation of mean fieldgames and applications, Ann. Appl. Probab. 25 (2015), no. 3, 1189–1231. MR3325272

[CS07] Felipe Cucker and Steve Smale, Emergent behavior in flocks, IEEE Transactions onautomatic control 52 (2007), no. 5, 852–862.

[HMC06] Minyi Huang, Roland P. Malhamé, and Peter E. Caines, Large population stochasticdynamic games: closed-loop McKean-Vlasov systems and the Nash certaintyequivalence principle, Commun. Inf. Syst. 6 (2006), no. 3, 221–251. MR 2346927

[Lau21] Mathieu Laurière, Numerical methods for mean field games and mean field typecontrol, arXiv preprint arXiv:2106.06231 (2021).

[LL07] Jean-Michel Lasry and Pierre-Louis Lions, Mean field games, Jpn. J. Math. 2 (2007),no. 1, 229–260. MR 2295621

[NCM11] Mojtaba Nourian, Peter E Caines, and Roland P Malhamé, Mean field analysis ofcontrolled cucker-smale type flocking: Linear analysis and perturbation equations,IFAC Proceedings Volumes 44 (2011), no. 1, 4471–4476.

Unless otherwise specified, the images are from https://unsplash.com

44 / 44

Page 97: Mean Field Games: Numerical Methods and Applications in