Networks and Games Brighten Godfrey Discover Engineering CS Camp July 24, 2012 slides 2010-2012 by Brighten Godfrey unless otherwise noted
Demo
I 14 0E N A 15 E 0E U C [Huffaker, claffy, Hyun, Luckie, Lyu, CAIDA] I o k, TH,A A A E, SG A CN ey g, U dn S R,R JP W K ok Sy i, T l, st o, a, ID iji n ip e ou vo di ky E 0 13 E po r e kart Be Ta la Se V To 0 12 11 0 100E
I P v 4 & I P v 6 I N T E R N E T T O P O L O G Y M A P J A N U A RY 2 0 0 9, IN b ay AE i, 80E 1 0E 70 E ab CN I 60 E,R R S u 0E Dh A Ab W K ok U JP 1 B om g, i, T l, st A E 50 E A I 14 0E o, 90E 100E D elh iji n ip e ou vo di ky 0 13 i, I N o k, TH Bangk e, SG ap o r Sing, ID art a Ja k Be Ta la Se V To 12 AS-level INTERNET GRAPH,A U 1 ey 5 E 0E dn A N E 40 Sy I O 8395(COMSTAR) C P 16 0E 10026(Asia Netcom) 2516(KDDI) 20E 7575(AARNET) R R 4755(TATACOMM) 9304 (Hutchison) 3904 38809(NXGNET) 170E FU O C E 30 A E RU, w IL co v, R os i v T M l A r a, T e nka A A v, U, ZA e a i K to r i e FI r P k i, n i s G l He fia, B PL So s a w, r, SE Wa h o lm T k c Sto nn a, A Vie n, DE B erl i NO Oslo, urt, DE k n Fra f A 10 E 20485(JSC) 180E/W E W 160 Alges, 20 W 577(Bell Canada) 0W 15 n 7843(Road Runner) S Dublin, IE 10W Ho ol u U lu, 3320(Deutsche Telekom) 8928(Interoute) 1299(TeliaNet) 702(MCI) 1273(CW) 5459(London IX) 3356(Level 3) 3549(Global Crossing) 701(UUNET) 1239(Sprint) 12989(HWNG) 2914(NTT) 2828(XOXO) 6677(ICENET) 3561(Savvis) 4320(Embratel) 0 170 W 7714(TelstraClear) 0W 14 30 W S O U 13 0W H 12 0W T 80W H A 90W US A R M E 100W I 11 0W S C S s, re,u 70W R S C I O,U Ai e go R N,U E S A se A W M 60 os Jo W 50 T en to an 40 W Bu B os Otta Wa C To [Huffaker, claffy, Hyun, Luckie, Lyu, CAIDA] R io de Brussels, BE Paris, FR London, UK Ja ne ir o, B R PT
Games & networks: a natural fit
Games & networks: a natural fit Game theory Studies interaction between selfish agents
Games & networks: a natural fit Game theory Studies interaction between selfish agents Networking Enables interaction between agents
Games & networks: a natural fit Game theory Studies interaction between selfish agents Networking Enables interaction between agents Networks make games happen!
Game theory basics
Game theory Two or more players For each player, a set of strategies For each combination of played strategies, a payoff or utility for each player
Game theory Two or more players For each player, a set of strategies Blue player strategies For each combination of played strategies, a payoff or utility for each player Red player strategies
Game theory Two or more players For each player, a set of strategies Blue player strategies Rock For each combination of played strategies, a payoff or utility for each player Red player strategies
Game theory Two or more players For each player, a set of strategies Blue player strategies Rock Paper For each combination of played strategies, a payoff or utility for each player Red player strategies
Game theory Two or more players For each player, a set of strategies Blue player strategies Rock Paper Scissors For each combination of played strategies, a payoff or utility for each player Red player strategies
Game theory Two or more players For each player, a set of strategies Blue player strategies For each combination of played strategies, a payoff or utility for each player Red player strategies Rock Paper Scissors Rock $0, $0 $0, $1 $1, $0
Game theory Two or more players For each player, a set of strategies Blue player strategies For each combination of played strategies, a payoff or utility for each player Red player strategies Rock Paper Scissors Rock $0, $0 $0, $1 $1, $0
Game theory Two or more players For each player, a set of strategies Blue player strategies For each combination of played strategies, a payoff or utility for each player Red player strategies Rock Paper Scissors Rock $0, $0 $0, $1 $1, $0
Game theory Two or more players For each player, a set of strategies Blue player strategies For each combination of played strategies, a payoff or utility for each player Red player strategies Rock Paper Scissors Rock $0, $0 $0, $1 $1, $0
Game theory Two or more players For each player, a set of strategies Blue player strategies For each combination of played strategies, a payoff or utility for each player Red player strategies Rock Paper Scissors Rock $0, $0 $0, $1 $1, $0 Paper $1, $0 $0, $0 $0, $1
Game theory Two or more players For each player, a set of strategies Blue player strategies For each combination of played strategies, a payoff or utility for each player Red player strategies Rock Paper Scissors Rock $0, $0 $0, $1 $1, $0 Paper $1, $0 $0, $0 $0, $1
Game theory Two or more players For each player, a set of strategies Blue player strategies For each combination of played strategies, a payoff or utility for each player Red player strategies Rock Paper Scissors Rock $0, $0 $0, $1 $1, $0 Paper $1, $0 $0, $0 $0, $1
Game theory Two or more players For each player, a set of strategies Blue player strategies For each combination of played strategies, a payoff or utility for each player Red player strategies Rock Paper Scissors Rock $0, $0 $0, $1 $1, $0 Paper $1, $0 $0, $0 $0, $1
Game theory Two or more players For each player, a set of strategies Blue player strategies For each combination of played strategies, a payoff or utility for each player Red player strategies Rock Paper Scissors Rock $0, $0 $0, $1 $1, $0 Paper $1, $0 $0, $0 $0, $1 Scissors $0, $1 $1, $0 $0, $0
Game theory Two or more players For each player, a set of strategies Blue player strategies For each combination of played strategies, a payoff or utility for each player Red player strategies Rock Paper Scissors Rock $0, $0 $0, $1 $1, $0 Paper $1, $0 $0, $0 $0, $1 Scissors $0, $1 $1, $0 $0, $0
Game theory Two or more players For each player, a set of strategies Blue player strategies For each combination of played strategies, a payoff or utility for each player Red player strategies Rock Paper Scissors Rock $0, $0 $0, $1 $1, $0 Paper $1, $0 $0, $0 $0, $1 Scissors $0, $1 $1, $0 $0, $0
Game theory Two or more players For each player, a set of strategies Blue player strategies For each combination of played strategies, a payoff or utility for each player Red player strategies Rock Paper Scissors Rock $0, $0 $0, $1 $1, $0 Paper $1, $0 $0, $0 $0, $1 Scissors $0, $1 $1, $0 $0, $0
(Pure) Nash equilibrium A chosen strategy for each player such that no player Can you find a Nash equilibrium in R-P-S? can improve its utility by changing its strategy
(Pure) Nash equilibrium A chosen strategy for each player such that no player can improve its utility by changing its strategy Can you find a Nash equilibrium in R-P-S? Blue player strategies Rock Paper Scissors Red player strategies Rock $0, $0 $0, $1 $1, $0 Paper $1, $0 $0, $0 $0, $1 Scissors $0, $1 $1, $0 $0, $0
(Pure) Nash equilibrium A chosen strategy for each player such that no player can improve its utility by changing its strategy Can you find a Nash equilibrium in R-P-S? Blue player strategies Rock Paper Scissors Red player strategies Rock $0, $0 $0, $1 $1, $0 Paper $1, $0 $0, $0 $0, $1 Scissors $0, $1 $1, $0 $0, $0
(Pure) Nash equilibrium A chosen strategy for each player such that no player can improve its utility by changing its strategy Can you find a Nash equilibrium in R-P-S? Blue player strategies Rock Paper Scissors Red player strategies Rock $0, $0 $0, $1 $1, $0 Paper $1, $0 $0, $0 $0, $1 Scissors $0, $1 $1, $0 $0, $0
(Pure) Nash equilibrium A chosen strategy for each player such that no player can improve its utility by changing its strategy Can you find a Nash equilibrium in R-P-S? Blue player strategies Rock Paper Scissors Red player strategies Rock $0, $0 $0, $1 $1, $0 Paper $1, $0 $0, $0 $0, $1 Scissors $0, $1 $1, $0 $0, $0
(Pure) Nash equilibrium A chosen strategy for each player such that no player can improve its utility by changing its strategy Can you find a Nash equilibrium in R-P-S? Blue player strategies Rock Paper Scissors Red player strategies Rock $0, $0 $0, $1 $1, $0 Paper $1, $0 $0, $0 $0, $1 Scissors $0, $1 $1, $0 $0, $0
(Pure) Nash equilibrium A chosen strategy for each player such that no player can improve its utility by changing its strategy Can you find a Nash equilibrium in R-P-S? Blue player strategies Rock Paper Scissors Red player strategies Rock $0, $0 $0, $1 $1, $0 Paper $1, $0 $0, $0 $0, $1 Scissors $0, $1 $1, $0 $0, $0 No pure Nash equilibrium!
Prisoner s dilemma Blue prisoner Red prisoner Cooperate Defect
Prisoner s dilemma Blue prisoner Red prisoner Cooperate Defect Cooperate -1, -1-12, 0
Prisoner s dilemma Blue prisoner Red prisoner Cooperate Defect Cooperate -1, -1-12, 0
Prisoner s dilemma Blue prisoner Red prisoner Cooperate Defect Cooperate -1, -1-12, 0
Prisoner s dilemma Blue prisoner Red prisoner Cooperate Defect Cooperate -1, -1-12, 0 Defect 0, -12-5, -5
Prisoner s dilemma Blue prisoner Red prisoner Cooperate Defect Cooperate -1, -1-12, 0 Defect 0, -12-5, -5
Prisoner s dilemma Blue prisoner Red prisoner Cooperate Defect Cooperate -1, -1-12, 0 Defect 0, -12-5, -5
Prisoner s dilemma Blue prisoner Red prisoner Cooperate Defect Cooperate -1, -1-12, 0 Defect 0, -12-5, -5
Prisoner s dilemma Blue prisoner Red prisoner Cooperate Defect Cooperate -1, -1-12, 0 Defect 0, -12-5, -5
Prisoner s dilemma Blue prisoner Red prisoner Cooperate Defect Cooperate -1, -1-12, 0 Defect 0, -12-5, -5
Prisoner s dilemma Blue prisoner Red prisoner Cooperate Defect Cooperate -1, -1-12, 0 Defect 0, -12-5, -5
Prisoner s dilemma Blue prisoner Red prisoner Cooperate Defect Cooperate -1, -1-12, 0 Defect 0, -12-5, -5 Nash equilibrium
Price of Anarchy [C. Papadimitriou, Algorithms, games and the Internet, STOC 2001]
Price of Anarchy [C. Papadimitriou, Algorithms, games and the Internet, STOC 2001] Price of anarchy = worst Nash equilibrium s total cost optimal total cost
Price of Anarchy [C. Papadimitriou, Algorithms, games and the Internet, STOC 2001] Price of anarchy = worst Nash equilibrium s total cost optimal total cost Blue prisoner Red prisoner Cooperate Defect Cooperate -1, -1-12, 0 Defect 0, -12-5, -5
Price of Anarchy [C. Papadimitriou, Algorithms, games and the Internet, STOC 2001] Price of anarchy = worst Nash equilibrium s total cost optimal total cost Blue prisoner Red prisoner Cooperate Defect Cooperate -1, -1-12, 0 Defect 0, -12-5, -5
Price of Anarchy [C. Papadimitriou, Algorithms, games and the Internet, STOC 2001] Price of anarchy = worst Nash equilibrium s total cost optimal total cost Blue prisoner Red prisoner Cooperate Defect Cooperate -1, -1-12, 0 Defect 0, -12-5, -5
Price of Anarchy [C. Papadimitriou, Algorithms, games and the Internet, STOC 2001] Price of anarchy = worst Nash equilibrium s total cost optimal total cost Red prisoner Blue prisoner Cooperate Defect Cooperate -1, -1-12, 0 Defect 0, -12-5, -5 Here, PoA = 10/2 = 5.
How bad is selfish routing in a network?
The selfish routing game
The selfish routing game Given graph, latency function on each edge specifying latency as function of total flow x on a link
The selfish routing game Given graph, latency function on each edge specifying latency as function of total flow x on a link Path latency = sum of link latencies
The selfish routing game Given graph, latency function on each edge specifying latency as function of total flow x on a link Path latency = sum of link latencies Player strategy: pick a path on which to route
The selfish routing game Given graph, latency function on each edge specifying latency as function of total flow x on a link Path latency = sum of link latencies Player strategy: pick a path on which to route Players selfishly pick paths with lowest latency
The selfish routing game Given graph, latency function on each edge specifying latency as function of total flow x on a link Path latency = sum of link latencies Player strategy: pick a path on which to route 1 x Players selfishly pick paths with lowest latency For now assume many users, each with negligible load; total 1 x 1
The selfish routing game Given graph, latency function on each edge specifying latency as function of total flow x on a link Path latency = sum of link latencies Player strategy: pick a path on which to route 1 x Players selfishly pick paths with lowest latency For now assume many users, each with negligible load; total 1 x 1
The selfish routing game Given graph, latency function on each edge specifying latency as function of total flow x on a link Path latency = sum of link latencies Player strategy: pick a path on which to route 1 x Players selfishly pick paths with lowest latency x 1 For now assume many users, each with negligible load; total 1 Flow x = 0.5 on each path; Total latency = 1.5
Example: Braess s paradox [Dietrich Braess, 1968] Fig 1a: D. Braess.
Example: Braess s paradox [Dietrich Braess, 1968] Fig 1b: N. Dynamite. Fig 1a: D. Braess.
Example: Braess s paradox [Dietrich Braess, 1968] Fig 1b: N. Dynamite. Fig 1a: D. Braess.
Example: Braess s paradox [Dietrich Braess, 1968] Fig 1a: D. Braess.
Example: Braess s paradox [Dietrich Braess, 1968] 1 x x 1 Fig 1a: D. Braess.
Example: Braess s paradox [Dietrich Braess, 1968] 1 x x 1 Fig 1a: D. Braess.
Example: Braess s paradox [Dietrich Braess, 1968] 1 x x 1 Fig 1a: D. Braess. Initially: 0.5 flow along each path; latency 1+0.5 = 1.5
Example: Braess s paradox [Dietrich Braess, 1968] 1 x 0 x 1 Fig 1a: D. Braess. Initially: 0.5 flow along each path; latency 1+0.5 = 1.5
Example: Braess s paradox [Dietrich Braess, 1968] 1 x 0 1 x 1 Fig 1a: D. Braess. Initially: 0.5 flow along each path; latency 1+0.5 = 1.5
Example: Braess s paradox [Dietrich Braess, 1968] 1 x 0 1 x 1 Green path is better. Everyone switches to it! Fig 1a: D. Braess. Initially: 0.5 flow along each path; latency 1+0.5 = 1.5
Example: Braess s paradox [Dietrich Braess, 1968] 1 x 0 1 x 1 Green path is better. Everyone switches to it! Fig 1a: D. Braess. Initially: 0.5 flow along each path; latency 1+0.5 = 1.5 With new link: all flow along new path; latency = 2
Example: Braess s paradox 1 x 0 Optimal latency = 1.5 x 1
Example: Braess s paradox 1 x 0 Optimal latency = 1.5 x 1 1 x 0 2 1 Nash equilibrium latency = 2 x
Example: Braess s paradox 1 x 0 Optimal latency = 1.5 x 1 1 x 0 2 1 Nash equilibrium latency = 2 x Thus, price of anarchy = 4/3
From links to springs x 1 0 1 x
From links to springs x 1 Spring 0 1 x Rope
From links to springs x 1 Spring 0 1 x Rope
From links to springs x 1 Spring 0 1 x Rope
From links to springs x 1 Spring 0 1 x Rope
From links to springs x 1 Spring 0 1 x Rope cut
Going deeper
Going deeper How bad are equilibria in real-world networks?
Going deeper How bad are equilibria in real-world networks? Can you design a mechanism (a game) so that selfishness is not so bad?
Going broader
Going broader Game theory used in networking to model
Going broader Game theory used in networking to model Equilibria of distributed algorithms
Going broader Game theory used in networking to model Equilibria of distributed algorithms ISPs competing with each other
Going broader Game theory used in networking to model Equilibria of distributed algorithms ISPs competing with each other Spread of new technology in social networks
Going broader Game theory used in networking to model Equilibria of distributed algorithms ISPs competing with each other Spread of new technology in social networks...
Going broader Game theory used in networking to model Equilibria of distributed algorithms ISPs competing with each other Spread of new technology in social networks... Many more applications of game theory to CS (and CS to game theory).
Going broader Game theory used in networking to model Equilibria of distributed algorithms ISPs competing with each other Spread of new technology in social networks... Many more applications of game theory to CS (and CS to game theory). See Nisan, Roughgarden, Tardos, Vazirani s book Algorithmic Game Theory, available free online