Download - 1 Issues on the border of economics and computation נושאים בגבול כלכלה וחישוב INTRODUCTION
1
Issues on the border of economics and computation
וחישוב כלכלה בגבול נושאים
INTRODUCTION
Instructors
• Dr. Liad Blumrosen "בלומרוזן ליעד ר ד– Department of economics, huji.
• Dr. Michael Schapira "שפירא מיכאל ר ד– School of computer science and engineering, huji.
• Office hours: by appointment.
Course requirements
• Attend (essentially all) classes.
• Solve 3-4 problem sets.– The final problem set might be slightly bigger.
• Problem sets grade is 100% of the final grade.– No exam, no home exam.
Computer science and economics ?!?
Today:– Introduction and examples– Game theory 1.0.1.
Classic computer science
What a single computer can compute?
Classic Economics
Analyzing the interaction between humans, firms, etc.
New computational environments
• Properties:– Large-scale systems, belong to various economic
entities.– Participants are individuals/firms with different goals.– Participants have private information.– Rapid changes in users behavior.
Electronic markets Information providers
Social networks P2P networks
Internet
Mobile and apps
Algorithmic game theory
• Which tools can we use for analyzing such environments?
• Interactions between computers, owned by different economic entities and different goals.
• New tools should be developed: algorithmic game theory
• The theory borrows a lot from each field.
What tools should we use?
“Classic” CS
Not handling, eg:
Incentives
Asymmetric information
Participation constraints
Economics / Game theory
Not handling, eg:
Tractability
Approximation
Various objectives
Algorithmic Game Theory:+ Design & evaluate systems with selfish agents.+ Real need from the industry.
Few examples
Example 1: Single-Item Auctions
2nd-price auction• Buyers submit bids• Highest bid wins• Winner pays the 2nd-
highest bid
In which auction would you bid higher?How do people behave in such auctions?Which one earns greater revenue for the seller?
1st-price auction• Buyers submit bids• Highest bid wins• Winner pays his own bid
Say that you need to sell a single (indivisible) item to a set of bidders.
How can you do that?
Example 1: Single-Item Auctions
• Auctions are part of the mechanism design literature.
• Mechanism design: economists as engineers.Design markets with selfish agent to achieve some desired goals.– Relation to computer science is straightforward.– Once a niche field in economics, now mainstream.
See this year’s Nobel prize (+ 2007, 1994)
Example 2: Sponsored-search auctions
Bla
Search results Advertisements
Example 2: Sponsored-search auctions
A real system: A simple interface short response time robustness
Selfish parties: Google vs. Yahoo vs. MSN Users Advertisers
Economic challenges, eg:
Which auction to use? Private info – how much advertisers will pay? Click Fraud Attract new advertisers payments per impression/click/action
Example 3: FCC spectrum auctions
• Multi-billion dollar auctions.
• Preferences for bundles of frequencies (Combinatorial auctions): Consecutive geographic areas. Overlaps, already owned spectrum.
• Sophisticated bidders– At&t, Verizon, Google.– Again, asymmetric information.
• Bottleneck: communication.
Example 4: selfish routing
16
• Many cars try to minimize driving time.• All know the traffic congestion (גלגלצ, WAZE)
Externalities and equilibria
17
• Negative externalities: my driving time increases as more drivers take the same route.
• In “equilibrium”: no driver wants to change his chosen route.
• Or alternatively:– Equilibrium: for each driver, all routes have the same
driving time.• (Otherwise the driver will switch to another route…)
Efficiency, equilibrium.
18
• Our question: are equilibria socially efficient?– Would it be better for the society if someone told each
driver how to drive?
• We would like to compare:– The socially-efficient outcome.
• What would happen if a benevolent planner controlled traffic.
– The equilibrium outcome.• What happens in real life.
Network 1
19
• Socially efficient outcome: splitting traffic equally– expected driving time: ½*1+½*1/2=3/4 – Exercise: prove this is efficient.
• The only equilibrium: everyone use lower edge.– Otherwise, if someone chooses upper link, the cost in
the lower link is less than 1.– Expected cost: 1*1=1
C(n)=n
C(n)=1 (million)• c(n) – the cost (driving time) to
users when n users are using this road.
• Assume that a flow of 1 (million) users use this network.
S T
Network 1
20
• Conclusion:– Letting people choose paths incurs a cost– “price of anarchy”
• The immediate question: if we have a ratio of 75% for this small network, can it be much higher in more complex networks? Which networks?
C(n)=n
C(n)=1 (million)
S T
Network 2
21
• In equilibrium: half of the traffic uses upper routehalf uses lower route.
• Expected cost: ½*(1/2+1)+1/2*(1+1/2)=1.5
c(n)=n
c(n)=1
S T
c(n)=n
c(n)=1
Network 3
22
• The only equilibrium in this graph:everyone uses the svwt route.– Expected cost: 1+1=2
• Building new highways reduces social welfare!?
c(n)=n
c(n)=1
S T
v
W
c(n)=n
c(n)=1
c(n)=0
Now a new highway
was constructed!
Braess’s Paradox
23
• This example is known as the Braess’s Paradox:
sometimes destroying roads can be beneficial for society.
• The immediate question: how can we choose which roads to build or destroy?
c(n)=n
c(n)=1
S T
v
W
c(n)=n
c(n)=1
c(n)=0
Now a new highway
was constructed!
Example 5: Internet Routing
Establish routes between the smaller networks that make up the Internet
Currently handled by the Border Gateway Protocol (BGP).
AT&T
Qwest
Comcast
Level3
Why is Internet Routing Hard?
Not shortest-paths routing!!!
AT&T
Qwest
Comcast
Level3
My link to UUNET is for backup purposes only.
Load-balance myoutgoing traffic.
Always chooseshortest paths.
Avoid routes through AT&T if at all possible.
BGP Dynamics
1 2
d
2, I’m available
1, my routeis 2d
1, I’m available
Prefer routes
through 2
Prefer routes
through 1
Two Important Desiderata
• BGP safety
– Guaranteeing convergence to a stable routing state.
• Compliant behaviour.– Guaranteeing that nodes (ASes)
adhere to the protocol.
• We saw examples for modern systems that raise many interesting questions in algorithmic game theory.
• Next:a quick introduction to game theory
• Outline:– What is a game?– Dominant strategy equilibrium– Nash equilibrium (pure and mixed)
29
Game Theory• Game theory involves the study of strategic
situations
• Portrays complex strategic situations in a highly simplified and stylized setting– Strategic situations: my outcome depends not only
on my action, but also on the actions of the others.
• A central concept: rationality– A complex concept. Many definitions.– One possible definition:
Agents act to maximize their own utility subject to the information the have and the actions they can take.
Applications• Economics
– Essentially everywhere• Business
– Pricing strategies, advertising, financial markets…• Computer science
– Analysis and design of large systems, internet, e-commerce.• Biology
– Evolution, signaling, …• Political Science
– Voting, social choice, fair division…• Law
– Resolutions of disputes, regulation, bargaining…• …
31
Game Theory: Elements• All games have three elements
– players– strategies– payoffs
• Games may be cooperative or noncooperative– In this course, noncooperative games.
32
• Let’s see some examples….
Example 1: “chicken”Chicken!!!
Swerve Straight
Swerve 0, 0 -1, 1Straight 1, -1 -10,-10
Example 2: Prisoner’s Dilemma• Two suspects for a crime can:
– Cooperate (stay silent, deny crime).• If both cooperate, 1 year in jail.
– Defect (confess).• If both defect, 3 years (reduced since they confessed).
– If A defects (blames the other), and B cooperate (silent) then A is free, and B serves a long sentence.
Cooperate Defect
Cooperate -1, -1 -5, 0Defect 0, -5 -3,-3
35
Lecture Outline• What is a game?
– Few examples.
Best responses
• Dominant strategies
• Nash Equilibrium– Pure– Mixed
• Existence and computation
36
Notation• We will denote a game G between two
players (A and B) by
G[ SA, SB, UA(a,b), UB(a,b)]
whereSA = set of strategies for player A (a SA)
SB = set of strategies for player B (b SB)
UA : SA x SB R (utility function for player A)
UB : SA x SB R utility function for player B
Normal-form game: Example
• Example:– Actions:
SA = {“C”,”D”}SB = {“C”,”D}
– Payoffs:uA(C,C) = -1, uA(C,D) = -5, uA(D,C) = 0, uA(D,D) = -3
Cooperate Defect
Cooperate-1, -1 -5, 0
Defect0, -5 -3,-3
A best response: intuition
• Can we predict how players behave in a game?
First step, what will players do when they know the strategy of the other players?
• Intuitively: players will best-respond to the strategies of their opponents.
39
A best response: Definition
• When player B plays b. A strategy a* is a best response to b if
UA(a*,b) UA(a’,b) for all a’ SA
(given that B plays b, no strategy gains A a higher payoff than a*)
A best response: example
Example:When row player plays Up,what is the best response of the column player?
Left Right
Up 1,1 0,0Bottom 0,0 1,1
Left Right
Up 1,1 0,0Bottom 0,0 1,1
Dominant Strategies ( / דומיננטיות שולטות (אסטרטגיות
• Definition: action a* is a dominant strategy for player A if it is a best response to every action b of B.
Namely, for every strategy b of B we have:
UA(a*,b) UA(a’,b) for all a’ SA
Dominant Strategies: in the prisoner’s dilemma
Cooperate Defect
Cooperate -1, -1 -5, 0
Defect 0, -5 -3,-3
• For each player: “Defect” is a best response to both “Cooperate” and “Defect.
• Here, “Defect” is a dominant strategy for both players…
• In the prisoner’s dilemma: (Defect, Defect) is a dominant-strategy equilibrium.
Dominant Strategy equilibriumשולטות באסטרטגיות משקל שווי
• Definition: (a,b) is a dominant-strategy equilibrium if a is dominant for A and b is dominant for B.– (similar definition for more players)
Cooperate Defect
Cooperate -1, -1 -5, 0
Defect 0, -5 -3,-3
Dominant strategies: another example
• Who has a dominant strategy in this game?
• Dominant-strategy equilibrium?
Left middle Right
Up 7,2 2,2 0,0Bottom 3,4 5,2 0,4
We allowed ≥ in the
definition. “Weakly
dominant”
Dominant strategies: pros and cons
• Plus: Strong solution. – Why should I play anything else if I have a
dominant strategy?
• Main problem:Does not exist in many games….
Left Right
Up 1,1 0,0Bottom 0,0 1,1
46
Lecture Outline• What is a game?
– Few examples.
• Best responses
• Dominant strategies (golden balls)
Nash Equilibrium– Pure– Mixed
• Existence and computation
47
Nash Equilibrium• How will players play when dominant-strategy
equilibrium does not exist?– We will define a weaker equilibrium concept: Nash
equilibrium
• A pair of strategies (a*,b*) is defined to be a Nash equilibrium if:a* is player A’s best response to b*, and b* is player B’s best response to a*.
48
Nash Equilibrium: Definition
• A direct definition:A pair of strategies (a*,b*) is defined to be a Nash equilibrium if
UA(a*,b*) UA(a’,b*) for all a’ SA
UB(a*,b*) Ub(a*,b’) for all b’ SB
49
Nash Eq.: Interpretation• No regret: Even if one player reveals his strategy,
the other player cannot benefit.– this is not the case with non-equilibrium strategies
• Stability: Once we reach a Nash equilibrium, players have no incentive to alter their strategies.– Even after observing the strategies of the other players
• Necessary condition for an outcome chosen by rational players.– If players think that there is obvious outcome to the
game, it must be a Nash equilibrium
(Pure) Nash Equilibrium
• Examples:
Left Right
Up 1,1 0,0Bottom 0,0 1,1
Swerve Straight
Swerve 0, 0 -1, 1Straight 1, -1 -10,-10
Note: when column player plays “straight”, then “straight” is no longer a best response to the row player.
Here, communication between players help.
51
Nash vs. Dominant Strategies• Every dominant strategy equilibrium is a Nash
equilibrium.– If a strategy is a best response to all strategies of
the other players, it is of course a best response to the dominant strategy of the other.
• The opposite is not true.
Nash equilibrium: existence
• Does a Nash equilibrium always exist?
– Note:we already saw that multiple equilibria are possible.
Example 4:
• No (pure) Nash equilibrium.
• But how do people play this game?
-1,1 1,-1
1,-1 -1,1
Tail Heads
Tail
Heads
Matching Pennies ( פרט או (זוגIs this an
equilibrium?
“Pure” Nash: pros and cons
• Good:– Describes “stable” outcomes.– May exist when dominant-strategy equilibria
does not exist.– Simple and intuitive (especially when unique).
• Bad:– Not unique.
• What happens when multiple equilibria exist?
– Does not always exist!
55
Mixed strategies
• Consider the following strategy:“I will toss a coin. With probability ½ I will choose bottom.With probability ½ I will choose up.”
• If lottery is allowed, now each player has an infinite number of strategies…
Left Right
Up 1,1 0,0Bottom 0,0 1,1
Mixed strategies: Definition• Definition: a “mixed strategy” is a probability
distribution over actions.– If {a1,a2,…,am} are the pure strategies of A,
then {p1,…,pm} is a mixed strategy for A if
-1,1 1,-1
1,-1 -1,1
Tail Heads
Tail
Heads
m
iip
1
1
1/2
1/2
1/3
2/3
9/10
1/10
0
1
1/4
1/2
0ip
(1)
(2) For all i
57
Pure and Mixed strategies• Clearly, every pure strategy is a mixed strategy
as well.– That gives probability 1 to one of the pure strategies.
• We will simply use the term “strategies”.
Expected payoff• When the two players play mixed strategies, the
payoff is the expected payoff. (הממוצע)
L R
T 3, -1 4, 2
D 6, -5 1,9
2/3
1/3
3/41/4
• What is the payoff of the row player? when the players play sA=(2/3, 1/3) and sB=(1/4,3/4)
uA(sA,sB) = 2/3 * ¼ * 3 + 1/3 * ¼ * 6 + 2/3 * ¾ * 4 + 1/3 * ¾ * 1 = 3.25
Best response (w. mixed strategies)• Definition:
Consider a mixed strategy sB of player B.
A strategy s* for player A is a best response to sB if no other pure strategy gains A higher expected payoff.
Namely,
– Note: we will later see that this implies that no mixed strategy is better for A than s*.
UA(s*,sB) UA(a’,sB) for all a’ in SA
Best response (w. mixed strategies)
-1,1 1,-1
1,-1 -1,1
זוג פרט
זוג
פרט
3/41/4What is a best response to (1/4,3/4)?
What would you do if you knew that your opponent plays one strategy more frequently?
Will you play pure or mixed?
1
0
Mixed strategies are realistic?• Do people randomize?
– Computers? Evolution? Stock markets? Teacher choosing questions in exams.
• Model long term behavior…• Model uncertainty about the other players.
• פרט או זוג• Basketball• Soccer
– How would you define strategy in penalty kicks?
– “the player that kicks more often to the left”
Nash eq. with mixed strategies• Main idea: given a fixed behavior of the others, I
will not change my strategy.
• Definition: (SA,SB) are in Nash Equilibrium, if each strategy is a best response to the other.
-1,1 1,-1
1,-1 -1,1
זוג פרט
זוג
פרט
1/21/2
1/2
1/2
Example: Battle of the SexesEquilibria in “battle
of the sexes”:
– Two pure equilibria.
– One mixed (2/3,1/3),(1/3,2/3)
2,1 0,0
0,0 1,2
64
Lecture Outline• What is a game?
– Few examples.
• Best responses
• Dominant strategies
• Nash Equilibrium– Pure– Mixed
Existence and computation
65
Existence of equilibria• Dominant strategies equilibria do not exist
in every game.– Same goes for Pure Nash equilibria.
• What about Nash equilibria (with mixed strategies)?
Good news: always exist.
Nash’s Theorem• Theorem (Nash, 1950):
every game has at least one Nash equilibrium!– With some technical details about the set of strategies.– Proof uses fix-point theorems.
• Nash was awarded the Nobel prize for this work in 1994.
Nash equilibrium (with mixed strategies):– Good: always exists. Models long term stability.– Bad: Less simple and intuitive. Multiple equilibria
exist.
67
Computing Equilibria• Dominant strategy: for each player, check if she
has a dominant strategy.
• Pure Nash: for each combination of actions, check if a player has a beneficial deviation.
• How can we find Nash equilibria in general?– This is a real problem in large games.
• Area of extensive research.
– Easy in “small” games.
68
Summary• We learned about simultaneous-action games,
represented by a matrix of payoffs. (Games in their “normal form”)– Next topic: sequential games.
• We wanted to predict the steady/stable state behavior on the games, and defined concepts of equilibria.
69
Finding mixed equilibria• We will use the following lemma:
Lemma: let sA be a best response to sB.If sA chooses the pure strategies a, a’ with positive probability, then
uA(a,sB)=uA(a’,sB)
Namely, if we sometime choose a and sometime choose a’, they gain us the same expected payoff (given a fixed behavior of the others).
70
Proof of Lemma• Assume that in best response:
a is chosen with probability pa
a’ is chosen with probability pa’
– pa ,pa’ >0
• Now if uA(a,sB) > uA(a’,sB), then this is not a best response:– The same strategy that chooses
a with probability pa+pa’ and a’ with probability 0 gains A higher payoff.
pa’
pa
0
pa + pa’
sB
71
Finding mixed equilibria
M S
M 2,1 0,0
S 0,0 1,2
1/43/4• What is the best response to sB=(3/4,1/4)?
• Can it be sA=(½, ½)?
uA(M,sB) = ¾*2 + 1/4*0 = 1.5
uA(S,sB) = ¾*0 + 1/4*1 = ¼Expected payoff: ½*1.5 +
½*1/4(1/2,1/2) cannot be a best response, niether (0.99,0.01)
• adding more mass to M will increase expected payoff of A. • Again, here the best response is a pure strategy (“M”),
72
Finding mixed equilibria• So how can we find (strictly) mixed-strategy
equilibria?
• We will use the lemma that we proved: if in equilibrium a player plays two pure strategies with positive probability, then the expected payoff from both strategies should be the same.
73
Finding mixed equilibria
M S
M 2,1 0,0
S 0,0 1,2
1-qq
• Consider an equilibrium sA=(p,1-p), sB=(q,1-q) (q,p>0)
then: uA(“M”,sB) = uA(“S”,sB) =
• If sA is a best response, we must have:
uA(“M”,sB)=uA(“S”,sB)
that is : 2q = (1-q) q=1/3
• Similarly, if sB is a best response then p=2/3.
1-p
p
q*2 + 0*(1-q)q*0 + (1-q)*1
74
Finding mixed equilibria
M S
M 2,1 0,0
S 0,0 1,2
2/31/3
• Note that since all mixed strategies are best response to sB=(1/3,2/3).
But only sA=(2/3,1/3) ensures that sB=(1/3,2/3) is also a best response to sA.
1/3
2/3
uA(“M”,sB)=uA(“S”,sB)
Equilibria• All we said extends to more players:
• (s1,…,sn) is a Nash equilibrium, if for every i, s i is a best-response to the other strategies.
• (s1,…,sn) is a dominant-strategy equilibrium, if for every i, si is the best response to any other set of strategies.
EquilibriaTake home message:
• Dominant-strategy equilibrium:
my strategy is the best no matter what the others do.
Exists in some games.
• Nash equilibrium:
my strategy is the best given what the others are currently doing.
Always exists.
Example 1: coordination games
Left Right
Left 1,1 0,0
Right 0,0 1,1
Row playerהשורות שחקן
Column Playerהעמודות שחקן
Right number: utility for
Row Player
Left number: utility for Column Player
Without laws, when this game is repeated, what will happen?