CSC304 Lecture 4 Game Theory

30
CSC304 Lecture 4 Game Theory (Cost sharing & congestion games, Potential function, Braess’ paradox) CSC304 - Nisarg Shah 1

Transcript of CSC304 Lecture 4 Game Theory

Page 1: CSC304 Lecture 4 Game Theory

CSC304 Lecture 4

Game Theory (Cost sharing & congestion games,

Potential function, Braess’ paradox)

CSC304 - Nisarg Shah 1

Page 2: CSC304 Lecture 4 Game Theory

Recap

CSC304 - Nisarg Shah 2

β€’ Nash equilibria (NE)

➒ No agent wants to change their strategy

➒ Guaranteed to exist if mixed strategies are allowed

➒ Could be multiple

β€’ Pure NE through best-response diagrams

β€’ Mixed NE through the indifference principle

Page 3: CSC304 Lecture 4 Game Theory

Worst and Best Nash Equilibria

CSC304 - Nisarg Shah 3

β€’ What can we say after we identify all Nash equilibria?

➒ Compute how β€œgood” they are in the best/worst case

β€’ How do we measure β€œsocial good”?

➒ Game with only rewards?Higher total reward of players = more social good

➒ Game with only penalties?Lower total penalty to players = more social good

➒ Game with rewards and penalties?No clear consensus…

Page 4: CSC304 Lecture 4 Game Theory

Price of Anarchy and Stability

CSC304 - Nisarg Shah 4

β€’ Price of Anarchy (PoA)

β€œWorst NE vs optimum”

Max total reward

Min total reward in any NE

or

Max total cost in any NE

Min total cost

β€’ Price of Stability (PoS)

β€œBest NE vs optimum”

Max total reward

Max total reward in any NE

or

Min total cost in any NE

Min total cost

PoA β‰₯ PoS β‰₯ 1

Page 5: CSC304 Lecture 4 Game Theory

Revisiting Stag-Hunt

CSC304 - Nisarg Shah 5

β€’ Max total reward = 4 + 4 = 8

β€’ Three equilibria

➒ (Stag, Stag) : Total reward = 8

➒ (Hare, Hare) : Total reward = 2

➒ ( Ξ€13 Stag – Ξ€2

3 Hare, Ξ€13 Stag – Ξ€2

3 Hare)

o Total reward = 1

3βˆ—

1

3βˆ— 8 + 1 βˆ’

1

3βˆ—

1

3βˆ— 2 ∈ (2,8)

β€’ Price of stability? Price of anarchy?

Hunter 1Hunter 2 Stag Hare

Stag (4 , 4) (0 , 2)

Hare (2 , 0) (1 , 1)

Page 6: CSC304 Lecture 4 Game Theory

Revisiting Prisoner’s Dilemma

CSC304 - Nisarg Shah 6

β€’ Min total cost = 1 + 1 = 2

β€’ Only equilibrium:

➒ (Betray, Betray) : Total cost = 2 + 2 = 4

β€’ Price of stability? Price of anarchy?

SamJohn Stay Silent Betray

Stay Silent (-1 , -1) (-3 , 0)

Betray (0 , -3) (-2 , -2)

Page 7: CSC304 Lecture 4 Game Theory

Cost Sharing Game

CSC304 - Nisarg Shah 7

β€’ 𝑛 players on directed weighted graph 𝐺

β€’ Player 𝑖

➒ Wants to go from 𝑠𝑖 to 𝑑𝑖

➒ Strategy set 𝑆𝑖 = {directed 𝑠𝑖 β†’ 𝑑𝑖 paths}

➒ Denote his chosen path by 𝑃𝑖 ∈ 𝑆𝑖

β€’ Each edge 𝑒 has cost 𝑐𝑒 (weight)

➒ Cost is split among all players taking edge 𝑒

➒ That is, among all players 𝑖 with 𝑒 ∈ 𝑃𝑖

1

1 1

1𝑠1

𝑑1

10

𝑠2

𝑑2

1010

Page 8: CSC304 Lecture 4 Game Theory

Cost Sharing Game

CSC304 - Nisarg Shah 8

β€’ Given strategy profile 𝑃, cost 𝑐𝑖 𝑃 to

player 𝑖 is sum of his costs for edges 𝑒 ∈ 𝑃𝑖

β€’ Social cost 𝐢 𝑃 = σ𝑖 𝑐𝑖 𝑃

β€’ Note: 𝐢 𝑃 = Οƒπ‘’βˆˆπΈ 𝑃

𝑐𝑒, where…

➒ 𝐸(𝑃)={edges taken in 𝑃 by at least one player}

➒ Why?

1

1 1

1𝑠1

𝑑1

10

𝑠2

𝑑2

1010

Page 9: CSC304 Lecture 4 Game Theory

Cost Sharing Game

CSC304 - Nisarg Shah 9

β€’ In the example on the right:

➒ What if both players take direct paths?

➒ What if both take middle paths?

➒ What if one player takes direct path and the other takes middle path?

β€’ Pure Nash equilibria?

1

1 1

1𝑠1

𝑑1

10

𝑠2

𝑑2

1010

Page 10: CSC304 Lecture 4 Game Theory

Cost Sharing: Simple Example

CSC304 - Nisarg Shah 10

β€’ Example on the right: 𝑛 players

β€’ Two pure NE

➒ All taking the n-edge: social cost = 𝑛

➒ All taking the 1-edge: social cost = 1o Also the social optimum

β€’ Price of stability: 1

β€’ Price of anarchy: 𝑛

➒ We can show that price of anarchy ≀ 𝑛 in every cost-sharing game!

s

t

𝑛 1

Page 11: CSC304 Lecture 4 Game Theory

Cost Sharing: PoA

CSC304 - Nisarg Shah 11

β€’ Theorem: The price of anarchy of a cost sharing game is at most 𝑛.

β€’ Proof:

➒ Suppose the social optimum is (𝑃1βˆ—, 𝑃2

βˆ—, … , π‘ƒπ‘›βˆ—), in which

the cost to player 𝑖 is π‘π‘–βˆ—.

➒ Take any NE with cost 𝑐𝑖 to player 𝑖.

➒ Let 𝑐𝑖′ be his cost if he switches to 𝑃𝑖

βˆ—.

➒ NE β‡’ 𝑐𝑖′ β‰₯ 𝑐𝑖 (Why?)

➒ But : 𝑐𝑖′ ≀ 𝑛 β‹… 𝑐𝑖

βˆ— (Why?)

➒ 𝑐𝑖 ≀ 𝑛 β‹… π‘π‘–βˆ— for each 𝑖 β‡’ no worse than 𝑛 Γ— optimum

∎

Page 12: CSC304 Lecture 4 Game Theory

Cost Sharing

CSC304 - Nisarg Shah 12

β€’ Price of anarchy

➒ Every cost-sharing game: PoA ≀ 𝑛

➒ Example game with PoA = 𝑛

➒ Bound of 𝑛 is tight.

β€’ Price of stability?

➒ In the previous game, it was 1.

➒ In general, it can be higher. How high?

➒ We’ll answer this after a short detour.

Page 13: CSC304 Lecture 4 Game Theory

Cost Sharing

CSC304 - Nisarg Shah 13

β€’ Nash’s theorem shows existence of a mixed NE.

➒ Pure NE may not always exist in general.

β€’ But in both cost-sharing games we saw, there was a PNE.

➒ What about a more complex game like the one on the right?

10 players: 𝐸 β†’ 𝐢27 players: 𝐡 β†’ 𝐷19 players: 𝐢 β†’ 𝐷

ED

A

7

B

C60

12

32

10

20

Page 14: CSC304 Lecture 4 Game Theory

Good News

CSC304 - Nisarg Shah 14

β€’ Theorem: Every cost-sharing game have a pure Nash equilibrium.

β€’ Proof:

➒ Via β€œpotential function” argument

Page 15: CSC304 Lecture 4 Game Theory

Step 1: Define Potential Fn

CSC304 - Nisarg Shah 15

β€’ Potential function: Ξ¦ ∢ ς𝑖 𝑆𝑖 β†’ ℝ+

➒ This is a function such that for every pure strategy profile 𝑃 = 𝑃1, … , 𝑃𝑛 , player 𝑖, and strategy 𝑃𝑖

β€² of 𝑖,

𝑐𝑖 𝑃𝑖′, π‘ƒβˆ’π‘– βˆ’ 𝑐𝑖 𝑃 = Ξ¦ 𝑃𝑖

β€², π‘ƒβˆ’π‘– βˆ’ Ξ¦ 𝑃

➒ When a single player 𝑖 changes her strategy, the change in potential function equals the change in cost to 𝑖!

➒ In contrast, the change in the social cost 𝐢 equals the total change in cost to all players.o Hence, the social cost will often not be a valid potential function.

Page 16: CSC304 Lecture 4 Game Theory

Step 2: Potential Fn β†’ pure Nash Eq

CSC304 - Nisarg Shah 16

β€’ A potential function exists β‡’ a pure NE exists.

➒ Consider a 𝑃 that minimizes the potential function.

➒ Deviation by any single player 𝑖 can only (weakly) increase the potential function.

➒ But change in potential function = change in cost to 𝑖.

➒ Hence, there is no beneficial deviation for any player.

β€’ Hence, every pure strategy profile minimizing the potential function is a pure Nash equilibrium.

Page 17: CSC304 Lecture 4 Game Theory

Step 3: Potential Fn for Cost-Sharing

CSC304 - Nisarg Shah 17

β€’ Recall: 𝐸(𝑃) = {edges taken in 𝑃 by at least one player}

β€’ Let 𝑛𝑒 (𝑃) be the number of players taking 𝑒 in 𝑃

Ξ¦ 𝑃 =

π‘’βˆˆπΈ(𝑃)

π‘˜=1

𝑛𝑒(𝑃)𝑐𝑒

π‘˜

β€’ Note: The cost of edge 𝑒 to each player taking 𝑒 is

𝑐𝑒/𝑛𝑒(𝑃). But the potential function includes all

fractions: 𝑐𝑒/1, 𝑐𝑒/2, …, 𝑐𝑒/𝑛𝑒 𝑃 .

Page 18: CSC304 Lecture 4 Game Theory

CSC304 - Nisarg Shah 18

Ξ¦ 𝑃 =

π‘’βˆˆπΈ(𝑃)

π‘˜=1

𝑛𝑒(𝑃)𝑐𝑒

π‘˜

β€’ Why is this a potential function?

➒ If a player changes path, he pays 𝑐𝑒

𝑛𝑒 𝑃 +1for each new

edge 𝑒, gets back 𝑐𝑓

𝑛𝑓 𝑃for each old edge 𝑓.

➒ This is precisely the change in the potential function too.

➒ So Δ𝑐𝑖 = ΔΦ.

∎

Step 3: Potential Fn for Cost-Sharing

Page 19: CSC304 Lecture 4 Game Theory

Potential Minimizing Eq.

CSC304 - Nisarg Shah 19

β€’ Minimizing the potential function gives some pure Nash equilibrium

➒ Is this equilibrium special? Yes!

β€’ Recall that the price of anarchy can be up to 𝑛.

➒ That is, the worst Nash equilibrium can be up to 𝑛 times worse than the social optimum.

β€’ A potential-minimizing pure Nash equilibrium is better!

Page 20: CSC304 Lecture 4 Game Theory

Potential Minimizing Eq.

CSC304 - Nisarg Shah 20

π‘’βˆˆπΈ(𝑃)

𝑐𝑒 ≀ Ξ¦ 𝑃 =

π‘’βˆˆπΈ(𝑃)

π‘˜=1

𝑛𝑒(𝑃)𝑐𝑒

π‘˜β‰€

π‘’βˆˆπΈ(𝑃)

𝑐𝑒 βˆ—

π‘˜=1

𝑛1

π‘˜

Social cost

βˆ€π‘ƒ, 𝐢 𝑃 ≀ Ξ¦ 𝑃 ≀ 𝐢 𝑃 βˆ— 𝐻 𝑛

𝐢 π‘ƒβˆ— ≀ Ξ¦ π‘ƒβˆ— ≀ Ξ¦ 𝑂𝑃𝑇 ≀ 𝐢 𝑂𝑃𝑇 βˆ— 𝐻(𝑛)

Harmonic function 𝐻(𝑛)= Οƒπ‘˜=1

𝑛 1/𝑛 = 𝑂(log 𝑛)

Potential minimizing eq. Social optimum

Page 21: CSC304 Lecture 4 Game Theory

Potential Minimizing Eq.

CSC304 - Nisarg Shah 21

β€’ Potential-minimizing PNE is 𝑂(log 𝑛)-approximation to the

social optimum.

β€’ Thus, in every cost-sharing game, the price of stability is

𝑂 log 𝑛 .

➒ Compare to the price of anarchy, which can be 𝑛

Page 22: CSC304 Lecture 4 Game Theory

Congestion Games

CSC304 - Nisarg Shah 22

β€’ Generalize cost sharing games

β€’ 𝑛 players, π‘š resources (e.g., edges)

β€’ Each player 𝑖 chooses a set of resources 𝑃𝑖 (e.g., 𝑠𝑖 β†’ 𝑑𝑖

paths)

β€’ When 𝑛𝑗 player use resource 𝑗, each of them get a cost

𝑓𝑗(𝑛𝑗)

β€’ Cost to player is the sum of costs of resources used

Page 23: CSC304 Lecture 4 Game Theory

Congestion Games

CSC304 - Nisarg Shah 23

β€’ Theorem [Rosenthal 1973]: Every congestion game is a potential game.

β€’ Potential function:

Ξ¦ 𝑃 =

π‘—βˆˆπΈ(𝑃)

π‘˜=1

𝑛𝑗 𝑃

𝑓𝑗 π‘˜

β€’ Theorem [Monderer and Shapley 1996]: Every potential game is equivalent to a congestion game.

Page 24: CSC304 Lecture 4 Game Theory

Potential Functions

CSC304 - Nisarg Shah 24

β€’ Potential functions are useful for deriving various results

➒ E.g., used for analyzing amortized complexity of algorithms

β€’ Bad news: Finding a potential function that works may be hard.

Page 25: CSC304 Lecture 4 Game Theory

The Braess’ Paradox

CSC304 - Nisarg Shah 25

β€’ In cost sharing, 𝑓𝑗 is decreasing

➒ The more people use a resource, the less the cost to each.

β€’ 𝑓𝑗 can also be increasing

➒ Road network, each player going from home to work

➒ Uses a sequence of roads

➒ The more people on a road, the greater the congestion, the greater the delay (cost)

β€’ Can lead to unintuitive phenomena

Page 26: CSC304 Lecture 4 Game Theory

The Braess’ Paradox

CSC304 - Nisarg Shah 26

β€’ Parkes-Seuken Example:

➒ 2000 players want to go from 1 to 4

➒ 1 β†’ 2 and 3 β†’ 4 are β€œcongestible” roads

➒ 1 β†’ 3 and 2 β†’ 4 are β€œconstant delay” roads

1 4

2

3

Page 27: CSC304 Lecture 4 Game Theory

The Braess’ Paradox

CSC304 - Nisarg Shah 27

β€’ Pure Nash equilibrium?➒ 1000 take 1 β†’ 2 β†’ 4, 1000 take 1 β†’ 3 β†’ 4➒ Each player has cost 10 + 25 = 35➒ Anyone switching to the other creates a greater

congestion on it, and faces a higher cost

1 4

2

3

Page 28: CSC304 Lecture 4 Game Theory

The Braess’ Paradox

CSC304 - Nisarg Shah 28

β€’ What if we add a zero-cost connection 2 β†’ 3?

➒ Intuitively, adding more roads should only be helpful

➒ In reality, it leads to a greater delay for everyone in the unique equilibrium!

1 4

2

3

𝑐23 𝑛23 = 0

Page 29: CSC304 Lecture 4 Game Theory

The Braess’ Paradox

CSC304 - Nisarg Shah 29

β€’ Nobody chooses 1 β†’ 3 as 1 β†’ 2 β†’ 3 is better irrespective of how many other players take it

β€’ Similarly, nobody chooses 2 β†’ 4

β€’ Everyone takes 1 β†’ 2 β†’ 3 β†’ 4, faces delay = 40!

1 4

2

3

𝑐23 𝑛23 = 0

Page 30: CSC304 Lecture 4 Game Theory

The Braess’ Paradox

CSC304 - Nisarg Shah 30

β€’ In fact, what we showed is:

➒ In the new game, 1 β†’ 2 β†’ 3 β†’ 4 is a strictly dominant strategy for each player!

1 4

2

3

𝑐23 𝑛23 = 0