1 / 44

Instructor: Shengyu Zhang

CSC3160: Design and Analysis of Algorithms. Week 9 : Algorithmic issues in games. Instructor: Shengyu Zhang. Starting from examples…. First example: Prisoner’s dilemma . Two prisoners are on trial for a crime, each can either confess or remain silent.

aysel
Download Presentation

Instructor: Shengyu Zhang

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSC3160: Design and Analysis of Algorithms Week 9: Algorithmic issues in games Instructor: Shengyu Zhang

  2. Starting from examples…

  3. First example: Prisoner’s dilemma • Two prisoners are on trial for a crime, each can either confess or remain silent. • If both silent: both serve 2 years. • If only one confesses: he serves 1 year and the other serves 5 years. • If both confess: both serve 4 years. • Matrix: loss function • What would you do if you are Prisoner Blue? Red?

  4. Example 1: Prisoner’s dilemma • By a case-by-case analysis, we found that both Prisoners would confess, regardless of what the other chooses. • Embarrassingly, they could have both chosen “Silent” to serve less years. • But people are selfish: They only care about their own payoff. • Resulting a dilemma: You pay two more years for being selfish.

  5. Example 2: ISP routing game • Two ISPs. • The two networks can exchange traffic via points and . • Two flows from to . • Each edge costs 1. • Each ISP has choice to going via C or S.

  6. Example 3: Pollution game • countries • Each country faces the choice of either controlling pollution or not. • Pollution control costs 3 for each country. • Each country that pollutes adds 1 to the cost of all countries. • What would you do if you are one of those countries? • Suppose countries don’t control. • For them: cost = • For others: cost =

  7. Example 4: Battle of the sexes • A boy and a girl want to decide whether to watch a action or romantic movie. • The boy prefers action and the girl prefers romantic. • But they both like to spend the time together rather than separately. • What would you do?

  8. Our Example: Coin guessing • Let’s play a game • I’ve a coin at my hand, $1 or $5. • You guess which is the case. • If you are right, you get it. • Otherwise you don’t get it.

  9. Our Example: Coin guessing • I want to lose less. • You want to gain more. • How should I do?

  10. A notion of being stable • In all previous games: • There are a number of players • Each has a set of strategies to choose from • Each aims to maximize his/her payoff, or minimize his/her loss. • Some combination of strategies is stable: No player wants to change his/her current strategy, provided that others don’t change. --- Nash Equilibrium.

  11. Prisoners’ dilemma • ISP routing

  12. Prisoners’ dilemma • ISP routing • Pollution game: All countries don’t control the pollution. • Battle of sexes: both are stable.

  13. Formally • A game has players. • Each player has a set of strategies. • Let • : a joint strategy • :strategies by players other than

  14. Each player has a payoff function • It depends on joint strategy , which includes all players’ strategies. • When (two players only), the 2 payoff functions are usually written in a matrix • Each entry has two numbers, giving the two payoff values for the joint strategy.

  15. (Pure) Nash Equilibrium: joint strategy s.t. • In other words, • If all other players don’t change their strategies , player has no incentive to change her strategy either. • achieves .

  16. Example 5: Penny matching. • Two players, each can exhibit one bit. • If the two bits match, then red player wins and gets payoff 1. • Otherwise, the blue player wins and gets payoff 1. • Find a pure NE? • Conclusion: There may not exist Nash Equilibrium in a game.

  17. Our Example: Coin guessing • I want to lose less. • You want to gain more. • Any pure NE?

  18. Mixed strategies • Consider the case that players pick their strategies randomly. • Player picks according to a distribution . • Then the joint strategy is distributed according to distribution . • . • Notation : draw from .

  19. Mixed strategies • Care about: the expected payoff • Mixed Nash Equilibrium: A distribution s.t., ∀ different from only at • and same at other distributions . • i.e. , .

  20. Existence of mixed NE: Penny Matching • A mixed NE: Both players take uniform distribution. • What’s the expected payoff for each player? • ½.

  21. Our Example: coin guessing • Suppose I put $1 w/p . • You guess $1 w/p . • My expected loss is • If I take and you take , then my loss . • Can I lose less? • Can you gain more?

  22. Existence of mixed NE • Nash, 1951: All games (with finite players and finite strategies for each player) have mixed NE.

  23. 3 strategies • How about Rock-Paper-Scissors? • Winner gets payoff and loser gets . • Both get in case of a tie. • Write down the payoff matrix? • Does it have a pure NE? • Find a mixed NE.

  24. Example 6: Traffic light • Two cars are at an interaction at the same time. • If both cross, then a bad traffic accident. So payoff for each. • If only one crosses, (s)he gets payoff ; the other gets . • If both stop, both get .

  25. Example 6: Traffic light • pure NE: one crosses and one stops. • Payoff or • Bad: not fair • (more) mixed NE: both cross w.p. . • Good: Fair • Bad: Low payoff: both • Worse: Positive chance of crash • Correlated equilibrium: randomly pick one and suggest to cross, the other one to stop.

  26. Correlated Equilibrium • Recall that a mixed NE is a probability distribution . • A general distribution may not be decomposed into such product form. • Example: a public coin. • In other words, random variables may be correlated. • About correlation vs. causality.

  27. Correlated Equilibrium • A general distribution on is a correlated equilibrium (CE) if drawn from , each player doesn’t want to change his/her strategy to any other . • You can also think of it as an extra partydrawing from and recommending player take strategy . Then player doesn’t want to change to take any other .

  28. Formally, • Conditional expectation: drawn from conditioned on . • Conditional distribution: . • Or equivalently,

  29. Example 6: Traffic light Correlated Equilibrium Payoff Matrix

  30. Why algorithmic issues? • What if we have a large number of strategies? • Or large number of players?

  31. Complexity of NE and CE • Given the utility functions, how hard is it to find one NE? • No polynomial time algorithm is known to find a NE. • But, there are polynomial-time algorithms for finding a correlated equilibrium.

  32. is given • are variables/unknowns. • Constraints: , • Observation: all constraints are linear! • So we just want to find a feasible solution to a set of linear constraints. • --- linear programming.

  33. We can actually find a solution to maximize a linear function of variables , such as the expected total payoff. • max s.t.,.

  34. One interesting example on fair division

  35. Cake cutting • Problem setting: • One cake, people(who want to split it). • Each person might value different portions of the cake differently. • Some like strawberries, some like chocolate, … • This valuation info is private. • Goal: divide the cake to make all people happy.

  36. Cake cutting • A cake cutting protocol is fair if each person gets fraction by her measure. • No matter how other people behave. • A cake cutting protocol is envy-freeif each person thinks that she gets the most by her measure. • Envy-free fair. (See why?)

  37. 1. Alice cuts the cake into two equal pieces • by her measure • 2. Bob chooses a larger piece • by his measure • 3. Alice takes the other piece

  38. envy-free • [Thm] The protocol is envy-free (and fair). • Proof. • Alice: gets exactly half, no matter which piece Bob chooses. • Bob: gets at least half, no matter how Alice cuts the cake.

  39. General ? • Recursion. • Suppose that the people are . • 1. Let divide the cake. • How? Recursively. • 2. Now comes. • Each of divides her share into equal pieces. • takes a largest piece from each of . • Let’s try on board.

  40. Fairness • [Thm] The protocol is fair. • Proof. • For : each gets . • : gets • ’s value of ’s share in Step 1. • Complexity? Let be the number of pieces. • recursion: • Try a few examples for small to convince yourself. • , and for general .

  41. Moving Knife protocol • Dubins-Spanier, 1961 • Continuously move a knife from left to right. • 1. A player yells out "STOP" as soon as knife has passed over of the cake • by her measure. • 2. The player that yelled out is assigned that piece. (And she is out of the game; .) • break tie arbitrarily • 3. The procedure continues until all get a piece.

  42. Fairness and complexity • [Thm] The protocol is fair. • Proof. • For the first who yells out: she gets . • For the rest: they have at least fraction to be divided among people. • Recursively: the next gets at least . • Complexity? • Only cuts into pieces.

  43. Summary • Game theory. • Nash equilibrium. • Correlated equilibrium. • Computational complexity of finding a • Nash equilibrium • Correlated equilibrium • Fair division • Fair and envy-free cake cutting. • Algorithms for players.

More Related