Sei sulla pagina 1di 45

Interactions among Networking Components - The Games

Introduction to Game Theory

Sandip Chakraborty
Department of Computer Science and Engineering,
INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR
October 5, 2016

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

0 / 18

What is Game Theory?


Traditionally, a topics from Economics - study of strategic decision
making
the study of mathematical models of conflict and cooperation
between intelligent rational decision-makers Myerson, Roger B.
(1991). Game Theory: Analysis of Conflict, Harvard University Press

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

1 / 18

Self-interested Agents
Agents are the players of the game!
What you think to be a self-interested agent?

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

2 / 18

Self-interested Agents
Agents are the players of the game!
What you think to be a self-interested agent?
they want to harm other agents! NO

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

2 / 18

Self-interested Agents
Agents are the players of the game!
What you think to be a self-interested agent?
they want to harm other agents! NO
they only care about things that benefit them! NO

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

2 / 18

Self-interested Agents
Agents are the players of the game!
What you think to be a self-interested agent?
they want to harm other agents! NO
they only care about things that benefit them! NO
the agent has its own description of states of the world that it likes,
and that its actions are motivated by this description...

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

2 / 18

Self-interested Agents
Agents are the players of the game!
What you think to be a self-interested agent?
they want to harm other agents! NO
they only care about things that benefit them! NO
the agent has its own description of states of the world that it likes,
and that its actions are motivated by this description...

We capture this by saying that each agent has a Utility function: a


mapping from states of the world to the real numbers indicating the
level of happiness with that state of the world!

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

2 / 18

Self-interested Agents
Agents are the players of the game!
What you think to be a self-interested agent?
they want to harm other agents! NO
they only care about things that benefit them! NO
the agent has its own description of states of the world that it likes,
and that its actions are motivated by this description...

We capture this by saying that each agent has a Utility function: a


mapping from states of the world to the real numbers indicating the
level of happiness with that state of the world!
quantifies degree of preference among possible alternatives

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

2 / 18

Self-interested Agents
Agents are the players of the game!
What you think to be a self-interested agent?
they want to harm other agents! NO
they only care about things that benefit them! NO
the agent has its own description of states of the world that it likes,
and that its actions are motivated by this description...

We capture this by saying that each agent has a Utility function: a


mapping from states of the world to the real numbers indicating the
level of happiness with that state of the world!
quantifies degree of preference among possible alternatives
allows us to understand the impact of uncertainty on these preferences

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

2 / 18

Self-interested Agents
Agents are the players of the game!
What you think to be a self-interested agent?
they want to harm other agents! NO
they only care about things that benefit them! NO
the agent has its own description of states of the world that it likes,
and that its actions are motivated by this description...

We capture this by saying that each agent has a Utility function: a


mapping from states of the world to the real numbers indicating the
level of happiness with that state of the world!
quantifies degree of preference among possible alternatives
allows us to understand the impact of uncertainty on these preferences
Decision theoretic rationality: takes action to maximize expected
utility...
Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

2 / 18

Non-Cooperative Game Theory

Mathematical study of interaction between rational, self-interested


agents

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

3 / 18

Non-Cooperative Game Theory

Mathematical study of interaction between rational, self-interested


agents
Why non-cooperative?
the individual is the basic modeling unit, and that individuals pursue
their own interests the strategy profile for every agent is different and
they do not share this information among each other
The action of every agent is determined individually, without having
the knowledge of others

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

3 / 18

Non-Cooperative Game Theory

Mathematical study of interaction between rational, self-interested


agents
Why non-cooperative?
the individual is the basic modeling unit, and that individuals pursue
their own interests the strategy profile for every agent is different and
they do not share this information among each other
The action of every agent is determined individually, without having
the knowledge of others
looks like distributed? a major key point why game theory became
popular in computer networks!

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

3 / 18

TCP Back-off Game

Have you ever used such tools?

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

4 / 18

TCP Back-off Game

Should you send your data packets using a correctly implemented


TCP (which has a proper back-off mechanism) or a defective
implementation (that does not have a back-off)?

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

5 / 18

TCP Back-off Game

Should you send your data packets using a correctly implemented


TCP (which has a proper back-off mechanism) or a defective
implementation (that does not have a back-off)?
Consider this situation as a two-player game
both use a correct implementation both get 2 ms delay
one correct, one defective 4 ms delay for correct, 1 for defective
both use the defective implementation both get a 3 ms delay

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

5 / 18

TCP Back-off Game

Should you send your data packets using a correctly implemented


TCP (which has a proper back-off mechanism) or a defective
implementation (that does not have a back-off)?
Consider this situation as a two-player game
both use a correct implementation both get 2 ms delay
one correct, one defective 4 ms delay for correct, 1 for defective
both use the defective implementation both get a 3 ms delay

Which implementation will you choose?

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

5 / 18

TCP back-off Game


Two-player game
Strategy set: {Correct implementation; defective implementation}
both use a correct implementation both get 2 ms delay
one correct, one defective 4 ms delay for correct, 1 for defective
both use the defective implementation both get a 3 ms delay

Questions:
What action should a player of the game take?
Would all players behave the same in this scenario?
What global patterns of behaviour should the system designer
expect?
Under what changes to the delay numbers, would the behavior be
same for both the players?

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

6 / 18

Modeling a Game: Formal Definition


Finite, n person game: <N, A, u

>

N is a finite set of n players, indexed by i


A = A1 A2 ... An , where Ai is the action set for player i; a Ai
is an action from the action set
u = <u1 , u2 , ..., un >, ui is the utility function for player i, ui : Ai R

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

7 / 18

Modeling a Game: Formal Definition


Finite, n person game: <N, A, u

>

N is a finite set of n players, indexed by i


A = A1 A2 ... An , where Ai is the action set for player i; a Ai
is an action from the action set
u = <u1 , u2 , ..., un >, ui is the utility function for player i, ui : Ai R

Matrix representation of a two player game:


row player is player 1, column player is player 2
rows are actions a A1 , columns are a0 A2
cells are outcomes, written as a tuple of utility values for each player

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

7 / 18

Modeling a Game: Formal Definition


Finite, n person game: <N, A, u

>

N is a finite set of n players, indexed by i


A = A1 A2 ... An , where Ai is the action set for player i; a Ai
is an action from the action set
u = <u1 , u2 , ..., un >, ui is the utility function for player i, ui : Ai R

Matrix representation of a two player game:


row player is player 1, column player is player 2
rows are actions a A1 , columns are a0 A2
cells are outcomes, written as a tuple of utility values for each player

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

7 / 18

Games of Pure Competition


Players have exactly opposite interests:
There must be precisely two players
For all action profiles a A; u1 (a) + u2 (a) = c for some constant c
Example: Zero Sum Game

One player wants a match, another player wants a mismatch

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

8 / 18

Games of Cooperation
Players have exactly the same interests;
No conflicts; all players want the same things
a A; i, j; ui (a) = uj (a)

both the players want a match

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

9 / 18

Prisoners Dilemma
Two individuals are arrested for allegedly committing a crime and are
lodged in separate prisons
The magistrate interrogates them separately in two different rooms
Strategy: The magistrate tells the prisoner that:
if he is the only one to confess, he will get a light sentence of 1 year in
jail while the other would be sentenced to 10 years in jail
if both prisoners confess, they would get 5 years each in jail
if neither confesses, then each would get 2 years in jail

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

10 / 18

Prisoners Dilemma

What should be the prisoners strategy in this case?

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

11 / 18

Prisoners Dilemma

What should be the prisoners strategy in this case?


play a strategy that is the best response to a (best) response
strategy that the other player may adopt

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

11 / 18

Prisoners Dilemma

What should be the prisoners strategy in this case?


play a strategy that is the best response to a (best) response
strategy that the other player may adopt
Observe that;
u1 (C , C ) > u1 (NC , C );

u1 (C , NC ) > u1 (NC , NC )

u2 (C , C ) > u2 (C , NC );

u2 (NC , C ) > u2 (NC , NC )

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

11 / 18

Prisoners Dilemma

What should be the prisoners strategy in this case?


play a strategy that is the best response to a (best) response
strategy that the other player may adopt
Observe that;
u1 (C , C ) > u1 (NC , C );

u1 (C , NC ) > u1 (NC , NC )

u2 (C , C ) > u2 (C , NC );

u2 (NC , C ) > u2 (NC , NC )

C is each players best strategy regardless of what the other player plays
(C , C ) is a natural prediction for this game.

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

11 / 18

Prisoners Dilemma

What should be the prisoners strategy in this case?


play a strategy that is the best response to a (best) response
strategy that the other player may adopt
Observe that;
u1 (C , C ) > u1 (NC , C );

u1 (C , NC ) > u1 (NC , NC )

u2 (C , C ) > u2 (C , NC );

u2 (NC , C ) > u2 (NC , NC )

C is each players best strategy regardless of what the other player plays
(C , C ) is a natural prediction for this game.
the outcome (NC , NC ) is the best outcome jointly for the players!
Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

11 / 18

Prisoners Dilemma

Classic example of a game where rational, intelligent behavior does


not lead to a socially optimal result

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

12 / 18

Analyzing Games
How can you measure the performance of a game?

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

13 / 18

Analyzing Games
How can you measure the performance of a game?
Equilibrium assume the game of bargaining the equilibrium is when
both the parties converge to a common price.

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

13 / 18

Analyzing Games
How can you measure the performance of a game?
Equilibrium assume the game of bargaining the equilibrium is when
both the parties converge to a common price.
Optimality the game converges to the optimal solution How can
you guarantee that?

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

13 / 18

Analyzing Games
How can you measure the performance of a game?
Equilibrium assume the game of bargaining the equilibrium is when
both the parties converge to a common price.
Optimality the game converges to the optimal solution How can
you guarantee that?
Price of Anarchy (PoA) measures how the efficiency of a system
degrades due to selfish behavior of its agents
Consider the shortest path game every agents need to reach the
destination at minimum time
Centralized solution find the minimum weight (here time) path
between source to destination
Distributed solution every agent independently chooses its own path
that maximizes its utility
PoA defines the ratio of total time required for the distributed solution
and the centralized solution

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

13 / 18

Dominant Strategy Equilibria


Given a game = <N, (Si ), (ui ) >, a strategy si Si is said to be
strongly dominated if there exists another strategy si0 Si such that;
ui (si0 , si ) > ui (si , si )

Sandip Chakraborty (IIT Kharagpur)

CS 60019

si Si

October 5, 2016

14 / 18

Dominant Strategy Equilibria


Given a game = <N, (Si ), (ui ) >, a strategy si Si is said to be
strongly dominated if there exists another strategy si0 Si such that;
ui (si0 , si ) > ui (si , si )

si Si

Given a game = <N, (Si ), (ui ) >, a strategy si Si is said to be


strongly dominant if si 6= si Si ;
ui (si , si ) > ui (si , si )

Sandip Chakraborty (IIT Kharagpur)

CS 60019

si Si

October 5, 2016

14 / 18

Dominant Strategy Equilibria


Given a game = <N, (Si ), (ui ) >, a strategy si Si is said to be
strongly dominated if there exists another strategy si0 Si such that;
ui (si0 , si ) > ui (si , si )

si Si

Given a game = <N, (Si ), (ui ) >, a strategy si Si is said to be


strongly dominant if si 6= si Si ;
ui (si , si ) > ui (si , si )

si Si

A profile of strategies (s1 , s2 , ..., sn ) is called a strongly dominant


strategy equilibrium of the game = <N, (Si ), (ui ) >, if
i = 1, 2, ..., n; the strategy si is a strongly dominant strategy for
player i.

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

14 / 18

Dominant Strategy Equilibria


Given a game = <N, (Si ), (ui ) >, a strategy si Si is said to be
strongly dominated if there exists another strategy si0 Si such that;
ui (si0 , si ) > ui (si , si )

si Si

Given a game = <N, (Si ), (ui ) >, a strategy si Si is said to be


strongly dominant if si 6= si Si ;
ui (si , si ) > ui (si , si )

si Si

A profile of strategies (s1 , s2 , ..., sn ) is called a strongly dominant


strategy equilibrium of the game = <N, (Si ), (ui ) >, if
i = 1, 2, ..., n; the strategy si is a strongly dominant strategy for
player i.
(C , C ) is a strongly dominant strategy equilibrium for the Prisoners
Dilemma game.
Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

14 / 18

Weak Dominance
Given a game = <N, (Si ), (ui ) >, a strategy si Si is said to be
weakly dominated by a strategy si0 Si for player i; if si Si ,
ui (si0 , si ) ui (si , si )

si Si

and
ui (si0 , si ) > ui (si , si )

Sandip Chakraborty (IIT Kharagpur)

CS 60019

for some si Si

October 5, 2016

15 / 18

Weak Dominance
Given a game = <N, (Si ), (ui ) >, a strategy si Si is said to be
weakly dominated by a strategy si0 Si for player i; if si Si ,
ui (si0 , si ) ui (si , si )

si Si

and
ui (si0 , si ) > ui (si , si )

for some si Si

A strategy si is said to be a weakly dominant strategy for player i


if it weakly dominates every other strategy si Si .

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

15 / 18

Weak Dominance
Given a game = <N, (Si ), (ui ) >, a strategy si Si is said to be
weakly dominated by a strategy si0 Si for player i; if si Si ,
ui (si0 , si ) ui (si , si )

si Si

and
ui (si0 , si ) > ui (si , si )

for some si Si

A strategy si is said to be a weakly dominant strategy for player i


if it weakly dominates every other strategy si Si .
A profile of strategies (s1 , s2 , ..., sn ) is called a weakly dominant
strategy equilibrium of the game = <N, (Si ), (ui ) >, if
i = 1, 2, ..., n; the strategy si is a weakly dominant strategy for
player i.
Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

15 / 18

Weak Dominance: Modified Prisoners Dilemma

u1 (C , C ) > u1 (NC , C );

u1 (C , NC ) u1 (NC , NC )

u2 (C , C ) > u2 (C , NC );

u2 (NC , C ) u2 (NC , NC )

(C , C ) is a weakly dominant strategy equilibrium.

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

16 / 18

Tragedy of the Commons A Social Paradox


A village has n farmers {1, 2, ..., n} each farmer has option of
keeping a sheep or not
S1 = S2 = ... = Sn = {0, 1}
Keeping a sheep gives a benefit of 1 unit
The village has a limited grassland, and when a sheep grazes on this
there is a damage to the environment equal to 5 units
The damage for every sheep is borne by every farmer equally.
si be the strategy for each farmer, then si = (0, 1)
The payoff for farmer i is given by;


5(s1 + s2 + ... + sn )
ui = s i
n
Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

17 / 18

Tragedy of the Commons




n
5(s1 + s2 + ... + sn )
5X
n5
5X
ui = si
= si
sj =
si
sj
n
n
n
n


j=1

i6=j

What can be the strongly dominant or weakly dominant strategy


equilibria for this game?

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

18 / 18

Thank You

Sandip Chakraborty (IIT Kharagpur)

CS 60019

October 5, 2016

18 / 18

Potrebbero piacerti anche