Top Banner
Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated versions of my lecture slides, go to http://www.cs.umd.edu/users/nau/game-theory
38

Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Jan 31, 2018

Download

Documents

trandang
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 1

Introduction to Game Theory

1. Introduction

Dana Nau University of Maryland

For updated versions of my lecture slides, go to http://www.cs.umd.edu/users/nau/game-theory

Page 2: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 2

What is Game Theory?   Game theory is about interactions among agents that are self-interested

  I’ll use “agent” and “player” synonymously

  Self-interested:   Each agent has its own description of what states are desirable   Generally model this using utility theory   Utility function: maps each state of the world to a real number

•  how much an agent likes that state

Page 3: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 3

Example: TCP Users   Internet traffic is governed by the TCP protocol   TCP’s backoff mechanism

  If the rate at which you’re sending packets causes congestion, reduce the rate until congestion subsides

  Suppose that   You’re trying to finish an important project

•  It’s extremely important for you to have a fast connection   Only one other person is using the Internet

•  That person wants a fast connection just as much as you do

  You each have 2 possible actions:   C (use a correct implementation)   D (use a defective implementation that won’t back off)

Page 4: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 4

Action Profiles and their Payoffs   An action profile is a choice of action for each agent

  You both use C => average packet delay is 1 ms   You both use D => average delay is 3 ms (router overhead)

  One of you uses D, the other uses C: •  D user’s delay is 0

•  C user’s delay is 4 ms

  Payoff matrix:   Your options are the rows

  The other agent’s options are the columns   Each cell = an action profile

•  1st number in the cell is your payoff or utility (I’ll use those terms synonymously) ›  In this case, the negative of your delay

•  2nd number in each cell is the other agent’s payoff

0,–4 –3,–3

–1, –1 –4, 0

Page 5: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 5

Some questions   Examples of the kinds of questions game theory attempts to answer:

  Which action should you use: C or D?

  Does it depend on what you think the other person will do?

  What kind of behavior can the network operator expect?

  Would any two users behave the same?

  Will this change if users can communicate with each other beforehand?

  Under what changes to the delays would the users’ decisions still be the same?

  How would you behave if you knew you would face this situation repeatedly with the same person?

0,–4 –3,–3

–1, –1 –4, 0

Page 6: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 6

0,–4 –3,–3

–1, –1 –4, 0

Some game-theoretic answers   Suppose the only consequences are the ones in the payoff matrix

  No other kinds of interactions between the two agents   No trouble from the network operator

  Suppose each user cares only about maximizing his/her own payoff   No guilt feelings, don’t care about the other agent’s utility

  Suppose each user knows the other feels the same way

  Then they’ll both use D

  Allowing them to communicate beforehand won’t change the outcome

  Repeat any fixed number of times => same outcome   If the number of times is unbounded, they might use C instead

Page 7: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 7

Let’s Play a Game   Choose a number in the range from 0 to 100

  Write it on a piece of paper   Also write your name (this is optional)   Fold your paper in half, so nobody else can see your number   Pass your paper to the front of the room

  The winner(s) will be whoever chose a number that’s closest to 2/3 of the average   I’ll announce the results in a subsequent class session

Page 8: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 8

Let’s Play a Game   Choose a number in the range from 0 to 100

  Write it on a piece of paper   Also write your name (this is optional)   Fold your paper in half, so nobody else can see your number   Pass your paper to the front of the room

  The winner(s) will be whoever chose a number that’s closest to 2/3 of the average   I’ll announce the results in a subsequent class session

  This game is famous among economists and game theorists   It’s called the p-Beauty Contest   I’ll say more about it when I announce the results

Page 9: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 9

Some Fields where Game Theory is Used   Economics

  Auctions   Markets   Bargaining   Fair division   Social networks   …

Page 10: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 10

Some Fields where Game Theory is Used   Government and Politics

  Voting systems   Negotiations   International relations   War   Human rights

A trench in World War 1:

Page 11: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 11

Some Fields where Game Theory is Used   Evolutionary Biology

  Communication   Population ratios   Territoriality   Altruism   Parasitism, symbiosis   Social behavior

Page 12: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 12

Some Fields where Game Theory is Used   Computer Science

  Artificial Intelligence   Multi-agent systems   Computer networks   Robotics

Page 13: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 13

Some Fields where Game Theory is Used   Engineering

  Communication networks   Control systems   Road networks

Page 14: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 14

  A (finite, n-person) normal-form game includes the following:   A set N = {1, 2, …, n} of agents or players:

•  Agent 1, agent 2, …, agent n   For each agent i, a finite set Ai of possible actions

•  Each vector (a1, . . . , an ) ∈ A1 ×· · ·× An is called an action profile   For each agent i, a real-valued utility (or payoff) function

ui : A1 ×· · ·× An → ℜ   Most other game representations

can be reduced to normal form   A natural way to represent a normal-form

game is with an n-dimensional payoff (or utility) matrix that shows every agent’s utility for every action profile

Games in Normal Form

0,–4 –3,–3

–1, –1 –4, 0

Page 15: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 15

The Prisoner’s Dilemma   The TCP user’s game is more commonly called

the Prisoner’s Dilemma   Scenario: two prisoners are in separate rooms

  For each prisoner, the police have enough evidence for a 1 year prison sentence   They want to get enough evidence for a 4 year prison sentence

  They tell each prisoner,

•  “If you testify against the other prisoner, we’ll reduce your prison sentence by 1 year”

  C = Cooperate (with the other prisoner): refuse to testify

  D = Defect: testify against the other prisoner

  Both prisoners cooperate => both stay in prison for 1 year   Both prisoners defect => both stay in prison for 4 – 1 = 3 years

  One defects, other cooperates => cooperator stays in prison for 4 years; defector goes free

0,–4 –3,–3

–1, –1 –4, 0

Page 16: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 16

5, 0 1, 1

3, 3 0, 5

Prisoner’s Dilemma

The payoff The payoff matrix that matrix that’s we used: usually used:

  The exact numbers aren’t important, as long as the following conditions hold:

c > a > d > b a > (b+c)/2

0,–4 –3,–3

–1, –1 –4, 0

Page 17: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 17

More generally   Under standard utility theory, games

are insensitive to any positive affine transformation of the payoffs

  Replace each payoff xi by cxi + d , where

•  c, d are constants and c > 0

  The reason why:

  Every positive affine transformation of the payoffs corresponds to the same set of rational preferences

x5, x6 x7, x8

x1, x2 x3, x4 a1

a2

b1 b2

Page 18: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 18

Preferences   Game-theoretic utilities are based on preferences   Suppose an agent can chooses among

  prizes (A, B, etc.), and   lotteries (situations with uncertain prizes)

  Lottery L = [p, A; 1−p, B]   Probability p of getting prize A,   Probability 1 − p of getting prize B

  Notation:   A ≻ B A preferred to B   A ~ B indifference between A and B   A ≻ B A ≻ B or A ~ B

Lp

1!p

A

B

Page 19: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 19

Rational Preferences   Idea: the preferences of a rational agent must obey some constraints

  Agent’s choices are based on rational preferences ⇒ agent’s behavior is describable as maximization of expected utility

  Constraints: Orderability (sometimes called Completeness):

(A ≻ B) ∨ (B ≻ A) ∨ (A ~ B)

Transitivity: (A ≻ B) ∧ (B ≻ C) ⇒ (A ≻ C)

Continuity: A ≻ B ≻ C ⇒ ∃p [p, A; 1−p, C] ~ B

Substitutability (sometimes called Independence):

A ~ B ⇒ [p, A; 1−p, C] ~ [p, B; 1−p, C] Monotonicity:

A ≻ B ⇒ (p ≥ q ⇔ [p, A; 1−p, B] ~ [q, A; 1−q, B])

Page 20: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 20

Rational Preferences   What happens if the constraints are violated?   Example: intransitive preferences

  If B ≻ C, then an agent who has C would trade C plus some money to get B

  If A ≻ B, then an agent who has B would trade B plus some money to get A

  If C ≻ A, then an agent who has A would trade A plus some money to get C

Page 21: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 21

Rational Preferences   What happens if the constraints are violated?   Example: intransitive preferences

  If B ≻ C, then an agent who has C would trade C plus some money to get B

  If A ≻ B, then an agent who has B would trade B plus some money to get A

  If C ≻ A, then an agent who has A would trade A plus some money to get C

  Such an agent can be induced to give away all its money

  Violating the constraints leads to self-evident irrationality

A

B C

1c 1c

1c

money money

money

Page 22: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 22

Utility Functions   Theorem (Ramsey, 1931; von Neumann and Morgenstern, 1944).   Given preferences satisfying the constraints, there exists a real-valued

function u such that u(A) ≥ u(B) ⇔ A ≻ B

u([p1, S1; …; pn, Sn]) = Σi pi u(Si)

  u is called a utility function

  MEU principle:   If an agent’s choices are based on rational preferences, then the agent’s

behavior is describable as maximization of expected utility

  An agent can maximize the expected utility without ever representing or manipulating utilities and probabilities   E.g., a lookup table to play tic-tac-toe perfectly

Page 23: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 23

Utility Scales   Preferences are invariant with respect to positive affine transformation   Let

u′(x) = k1u(x) + k2 where k1 > 0 Then u′ models the same set of preferences that u does

  Normalized utilities:   define u such that umax = 1 and umin = 0

Page 24: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 24

Human Utilities   Standard approach to assessing human utilities:

  Compare a given state A to a standard lottery Lp that has •  “best possible prize” umax with probability p

•  “worst possible catastrophe” umin with probability 1 − p   Adjust lottery probability p until A ~ Lp

How much would you pay to avoid a

1/1,000,000 chance of death? L

0.999999

0.000001

continue as before

instant death

pay $30 ~

Page 25: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 25

Human Utilities   Standard approach to assessing human utilities:

  Compare a given state A to a standard lottery Lp that has •  “best possible prize” umax with probability p

•  “worst possible catastrophe” umin with probability 1 − p   Adjust lottery probability p until A ~ Lp

How much would you pay to avoid a

1/1,000,000 chance of death?

One micromort

≈ P(accidental death in 370 km of car travel) ≈ P(accidental death in 9700 km of train travel)

  Judging from people’s actions, they will pay about € 20 to avoid it

L

0.999999

0.000001

continue as before

instant death

pay $30 ~

Page 26: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 26

win !10,000

win nothing

p

1–pOption 2: lottery LOption 1: you win x euros.

The Utility of Money   Utility curve: for what probability p am I indifferent between a prize x and

a lottery L = [p, M; (1−p), 0] for large M ?   For each amount x, adjust p until half the class votes for each option:

0 1K 2K 3K 4K 5K 6K 7K 8K 9K 10K x

p

1.0

0.8

0.6

0.4

0.2

0.0 •

p

Page 27: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 27

The Utility of Money   Money is not a utility function

  Given a lottery L with expected monetary value EMV(L),   Usually U(L) < U(EMV(L)), i.e., people are risk-averse

  Utility curve: for what probability p am I indifferent between a prize x and a lottery L = [p, M; (1−p), 0] for large M ?

  Typical empirical data, extrapolated with risk-prone behavior for very bad utilities:

+U

+$−150,000 800,000

oooo

oo

o o o o o o o o

o

Page 28: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 28

Common-payoff Games   A common-payoff game is one in which

  For every action profile, all agents have the same payoff   Also called a pure coordination game or a team game   Need to coordinate on an action that

is maximally beneficial to all

  Which Side of the Road   2 people driving in a country with no traffic rules   Coming at each other   Independently decide to stay left or right

  Need to coordinate your action with the action of the other driver   How to accomplish this?

Page 29: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 29

Mechanism Design   Change the rules of the game to give each agent an incentive to choose a

desired outcome   E.g., Sweden in 1967

Page 30: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 30

Zero-sum Games   These games are purely competitive

  Constant-sum game:   For every action profile, the sum of the payoffs is the same, i.e.,   there is a constant c such for every action profile (a1, …, an),

u1(a1, …, an) + … + un(a1, …, an) = c

  Any constant-sum game can be transformed into an equivalent game in which the sum of the payoffs is always 0   Just subtract c/n from every payoff

  Thus constant-sum games are usually called zero-sum games

Page 31: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 31

Examples   Matching Pennies

  Two agents, each has a penny   Each independently chooses

to display Heads or Tails •  If same, agent 1 gets both pennies •  Otherwise agent 2 gets both pennies

  Rock, Paper, Scissors (Roshambo)   3-action generalization

of matching pennies •  If both choose same, no winner •  Otherwise,

paper beats rock, rock beats scissors, scissors beats paper

–1, 1 1, –1

1, –1 –1, 1

Heads Tails

Heads

Tails

Page 32: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 32

  A game is nonzero-sum if u1(a1, …, an) + … + un(a1, …, an) is different for different action profiles   e.g., the Prisoner’s Dilemma

  Nonzero-sum games include aspects of both coordination and competition

  Battle of the Sexes

  Two agents need to coordinate their actions, but they have different preferences

  Original scenario: •  husband prefers football

•  wife prefers opera

  Another scenario: •  Two nations must act together to

deal with an international crisis •  They prefer different solutions

Nonzero-Sum Games

Husband Wife

Opera Football

Opera 2, 1 0, 0

Football 0, 0 1, 2

5, 0 1, 1

3, 3 0, 5

Page 33: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 33

Symmetric Games

5, 0 1, 1

3, 3 0, 5

  A game is symmetric if

  Both agents have the same set of actions   A action’s payoff is independent of

which agent uses it   For a 2x2 symmetric game, the payoff matrix looks like this:

  Most of the games I’ve shown you are symmetric, e.g.,

Prisoner’s dilemma Which Side of the Road Roshambo

Page 34: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 34

Symmetric Games

r'

r

r' r

a

c

b

d

r'

r

r' r   A game is symmetric if

  Both agents have the same set of actions   A action’s payoff is independent of

which agent uses it   For a 2x2 symmetric game, the payoff matrix looks like this:

  In the matrix, we only need to show u1   u1(r,r) = u2(r,r) = a = the payoff r gets against itself

  u1(r,r') = u2(r',r) = b = the payoff r gets against r'   u1(r',r) = u2(r,r') = c = the payoff r' gets against r

  u1(r',r') = u2(r',r') = d = the payoff r' gets against itself

Page 35: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 35

Symmetric Games

  As originally stated, the Battle of the Sexes is not symmetric:

  Most games can’t be transformed like that   Example:

Husband Wife

Opera Football

Opera 2, 1 0, 0

Football 0, 0 1, 2

Agent 2 Agent 1

Give (G) Take (T)

Take (T) 2, 1 0, 0

Give (G) 0, 0 1, 2

7, 3 5, 5

5, 5 6, 4

s1'

s1

s2 s2'

But by renaming the strategies, we can transform it into an equivalent game that is symmetric:

Page 36: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 36

Strategies in Normal-Form Games   Pure strategy: select a single action and play it

  Each row or column of a payoff matrix represents both an action and a pure strategy

  Pure-strategy profile: a choice of pure strategy for each agent   Mixed strategy: randomize over the set of available actions according to

some probability distribution   si (ai ) = probability that action ai will be played under mixed strategy si

  The support of si = {actions in Ai that have probability > 0 under si}

  A pure strategy is a special case of a mixed strategy

  support consists of a single action

  Fully mixed strategy: every action has probability > 0

Page 37: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 37

Expected Utility   A payoff matrix only gives payoffs for pure-strategy profiles   Generalization to mixed strategies uses expected utility

  First calculate probability of each outcome, given the strategy profile (involves all agents)

  Then calculate average payoff for agent i, weighted by the probabilities   For a strategy profile (s1, …, sn), the expected utility is

uis1,…,sn( ) = ui a1,…,an( )

(a1 ,…,an )∈A∑

j=1

n

Πs j a j( )

Page 38: Introduction to Game Theory - University Of Maryland Introduction.pdf · Nau: Game Theory 1 Introduction to Game Theory 1. Introduction Dana Nau University of Maryland For updated

Nau: Game Theory 38

Summary   Basic concepts:

  normal form, utilities/payoffs, pure strategies, mixed strategies   How utilities relate to rational preferences   Some classifications of games based on their payoffs

  Zero-sum •  Roshambo, Matching Pennies

  Non-zero-sum •  Prisoner’s Dilemma, Battle of the Sexes, Which Side of the Road

  Common-payoff •  Which Side of the Road

  Symmetric •  all of the above except Battle of the Sexes