// LabGameTheorySeqSpecs.txt. 8/22/2020. import Foundation class LabGameTheorySeqSpecs { let strGameTheorySeqSpecs :String = """ `` Lab Specs 0 0 450 200 // 0: Graph specs `` Prob Specs ` Problem 0 Start <<<<<<<<<<<<<< Screen 1 - Sequential Battle of the Sexes // 0: Title True False // 1: Initialize, allow selections Wife Husband // 2: Player names 2 // 3: Number of levels // Node Layout: Strategies and Payoffs Ballet Boxing // 4: Node 1 Strategies _ _ // 5: Node 1 Payoffs Ballet Boxing Ballet Boxing // 6: Node 2 Strategies W:2_H:1 W:0_H:0 W:0_H:0 W:1_H:2 // 7: Node 2 Payoffs _ // 8: Illustrate branch path _ // 9: Illustrate decision node ` Text Start // 10: Dialogue `RED`BLDObjective:`BLD Introduce sequential games.`BLK `BLDSetting the scene:`BLD A sequential battle of the sexes game is depicted above. Two players and two events are involved: `0x2022 Players: Husband and wife. `0x2022 Events: A ballet performance and a boxing match. In the game, the wife moves first. The blue circle is her decision node where she decides which event to attend: the ballet performance or the boxing match. After the wife decides, it is the husband's turn. He has two decision nodes, the red circles. The left red node represents the case in which his wife chooses the ballet performance and the right red node when she chooses the boxing match. Now, consider their preferences. Their first priority is the same for both. Each want to be together, to attend the same event. Their second priority differs, however. The husband prefers boxing, the wife ballet. We represent their preferences with a payoff values of 0, 1, or 2. `0x2022 0 represents the worst possible outcome: `0x25E6 Wife's 0: Attend either event without her husband. Husband's 0: Attend either event without his wife. `0x2022 2 represents the best outcome: Wife's 2: Attend the ballet performance with her husband. Husband's 2: Attend the boxing match with his wife. `0x2022 1 represents the intermediate outcome: Wife's 1: Attend the boxing match with her husband. Husband's 1: Attend the ballet performance with his wife. ` Prob End >>>>>>>>>>>>>> ` Problem 1 Start <<<<<<<<<<<<<< Screen 2 - Battle of the Sexes: Illustrating the Scenarios // 0: Title True False // 1: Initialize, allow selections Wife Husband // 2: Player names 2 // 3: Number of levels // Node Layout: Strategies and Payoffs Ballet Boxing // 4: Node 1 Strategies _ _ // 5: Node 1 Payoffs Ballet Boxing Ballet Boxing // 6: Node 2 Strategies W:2_H:1 W:0_H:0 W:0_H:0 W:1_H:2 // 7: Node 2 Payoffs 0 // 8: Illustrate branch path _ // 9: Illustrate decision node ` Text Start // 10: Dialogue `RED`BLDObjective:`BLD Illustrate how one branch of the diagram illustrates one sequence of decisions made by the wife and husband.`BLK The diagram illustrates the game, beginning with the wife's decision at the top and the payoffs at the bottom. The colored branch represents the scenario in which the wife chooses ballet and then her husband ballet also. The wife's payoff would be 2, her best outcome. The husband's payoff 1, his intermediate outcome. ` Prob End >>>>>>>>>>>>>> ` Problem 2 Start <<<<<<<<<<<<<< Screen 3 - Battle of the Sexes: Illustrating the Scenarios Continued // 0: Title True False // 1: Initialize, allow selections Wife Husband // 2: Player names 2 // 3: Number of levels // Node Layout: Strategies and Payoffs Ballet Boxing // 4: Node 1 Strategies _ _ // 5: Node 1 Payoffs Ballet Boxing Ballet Boxing // 6: Node 2 Strategies W:2_H:1 W:0_H:0 W:0_H:0 W:1_H:2 // 7: Node 2 Payoffs 1 // 8: Illustrate branch path _ // 9: Illustrate decision node ` Text Start // 10: Dialogue `RED`BLDObjective:`BLD Illustrate how another branch of the diagram illustrates a different sequence of decisions made by the wife and husband.`BLK This colored branch represents the scenario in which the wife chooses ballet and then her husband boxing. The wife's payoff would be 0 and the husband's 0. The worst outcome for each. ` Prob End >>>>>>>>>>>>>> ` Problem 3 Start <<<<<<<<<<<<<< Screen 4 - Battle of the Sexes: Backwards Induction // 0: Title True True // 1: Initialize, allow selections Wife Husband // 2: Player names 2 // 3: Number of levels // Node Layout: Strategies and Payoffs Ballet Boxing // 4: Node 1 Strategies _ _ // 5: Node 1 Payoffs Ballet Boxing Ballet Boxing // 6: Node 2 Strategies W:2_H:1 W:0_H:0 W:0_H:0 W:1_H:2 // 7: Node 2 Payoffs _ // 8: Illustrate branch path 1 0 1 1 // 9: Illustrate decision node ` Text Start // 10: Dialogue `RED`BLDObjective:`BLD Introduce backwards induction.`BLK Backwards induction provides a systematic procedure to find the Nash equilibrium of a sequential game. At first glance it appears to be counter intuitive. Instead of first focusing on the player who makes the first decision, we focus on the player who makes the last decision. That is, instead of proceeding from the top down, we proceed from the bottom up. Begin by considering the red rectangle on the left. Here we presume that the wife has decided to attend the ballet. The husband must decide between the ballet with his wife, a payoff of 1 for him, or the boxing match without her, a payoff of 0 for him. He chooses to attend the ballet with his wife. Click on the husband's ballet branch to illustrate his decision. Now consider the red rectangle on the right. Here we presume that the wife has decided to attend the boxing match. The husband must decide between the ballet without his wife, a payoff of 0 for him, or the boxing match with her, a payoff of 2 for him. He chooses to attend the boxing match with his wife. Click on the husband's boxing branch to illustrate his decision. Next we turn to the wife's decision. ` Prob End >>>>>>>>>>>>>> ` Problem 4 Start <<<<<<<<<<<<<< Screen 5 - Battle of the Sexes: Backwards Induction Continued // 0: Title False True // 1: Initialize, allow selections Wife Husband // 2: Player names 2 // 3: Number of levels // Node Layout: Strategies and Payoffs Ballet Boxing // 4: Node 1 Strategies _ _ // 5: Node 1 Payoffs Ballet Boxing Ballet Boxing // 6: Node 2 Strategies W:2_H:1 W:0_H:0 W:0_H:0 W:1_H:2 // 7: Node 2 Payoffs _ // 8: Illustrate branch path 0 0 // 9: Illustrate decision node ` Text Start // 10: Dialogue `RED`BLDObjective:`BLD Illustrate how backwards induction allows us to find a Nash equilibrium.`BLK Focus on the blue rectangle. The wife has two alternatives, ballet or boxing. What does she know? She knows that if she chooses ballet, her husband will choose ballet. if she chooses boxing, her husband will choose boxing. She will choose the ballet. By choosing ballet her payoff will be 2, whereas it would only be 1 if she chooses boxing. Click on the wife's ballet branch to illustrate her decision. Explain why the colored path illustrates the Nash equilibrium. Is the colored path a subgame-perfect equilibrium? Explain. ` Prob End >>>>>>>>>>>>>> ` Problem 5 Start Screen 6 - Kodak and Polaroid // 0: Title True True // 1: Initialize Kodak Polaroid // 2: Player names 3 // 3: Number of levels // Node Layout: Strategies and Payoffs Do_Not_Enter Enter // 4: Node 1 Strategies K:0_P:20 _ // 5: Node 1 Payoffs ~ ~ Fight Coop // 6: Node 2 Strategies ~ ~ _ _ // 7: Node 2 Payoffs ~ ~ ~ ~ Fight Coop Fight Coop // 8: Node 3 Strategies ~ ~ ~ ~ K:-5_P:-5 K:5_P:15 K:15_P:5 K:10_P:10 // 9: Node 3 Payoffs _ // 10: Illustrate branch path _ // 11: Illustrate decision node ` Text Start // 12: Dialogue `RED`BLDObjective:`BLD Illustrate how backwards induction can provide insights into imperfect competition.`BLK Long before digital cameras, Polaroid enjoyed a monopoly in the instant picture market. After snapping the picture, the film would develop before your eyes producing the finished product in a minute. Polaroid cameras were profitable items. Initially, Kodak produced only film cameras. After snapping a Kodak picture, you had to take the film to a professional who developed it. This typically took days. Consequently, Kodak was contemplating entering the lucrative instant picture market with its own instant camera. Now, the payoffs. If Kodak does not enter, we have the status quo. Kodak's payoff will be 0. Polaroid retains its instant picture monopoly indicated by a payoff of 20. Next, suppose that Kodak does enter. We have four scenarios. Scenario 1: Polaroid could fight by conducting an ambitious advertising campaign and Kodak could respond by fighting also. Their cutthroat tactics would hurt both firms. Each firm would experience a payoff of -5. Scenario 2: Polaroid could fight, but Kodak could cooperate by agreeing to play "second fiddle." In this case, Polaroid would enjoy the bulk of the profits. Kodak's payoff would be 5 and Polaroid's 15. Scenario 3: Polaroid could cooperate, but Kodak could fight. Kodak would enjoy the bulk of the profits. Kodak's payoff would be 15 and Polaroid's 5. Scenario 4: Both Polaroid and Kodak could cooperate by colluding and divide the market equally between the two of them. Kodak's payoff would be 10 and Polaroid's 10. This sequential game is illustrated above. Apply backward induction to find the Nash equilibrium. ` Prob End ` Problem 6 Start <<<<<<<<<<<<<< Screen 7 - Sequential Games and Tennis // 0: Title True True // 1: Initialize, allow selections Serena's_Serve Venus's_Return // 2: Player names 2 // 3: Number of levels // Node Layout: Strategies and Payoffs Venus's_Left Venus's_Right // 4: Node 1 Strategies _ _ // 5: Node 1 Payoffs Down_Line Cross_Court Down_Line Cross_Court // 6: Node 2 Strategies S:60%_V:40% S:40%_V:60% S:45%_V:55% S:55%_V:45% // 7: Node 2 Payoffs _ // 8: Illustrate branch path _ // 9: Illustrate decision node ` Text Start // 10: Dialogue `RED`BLDObjective:`BLD Illustrate how backwards induction can be useful in an athletic context.`BLK We begin by setting the scene. Two sisters, Serena and Venus, are competing in a serious tennis match. Serena has the serve, but just sent her first serve wide. So, now Serena is strategizing about her second serve. She can either serve it to Venus's left or Venus's right. What should she do? Focus on the diagram. The blue circle at the top represents Serena's decision node. Serena's two choices are illustrated: serve to Venus's left or to Venus's right. After Serena strikes her serve, Venus must make a quick decision about her return of service. The red circles represent Venus's return of service decision nodes. Venus must decide to return the serve down the line or cross court. The payoffs represent the percent of times a player wins the point given the four possible scenarios: Serena serves to Venus's left - Venus returns down the line: Serena wins 60%, Venus 40%. Serena serves to Venus's left - Venus returns cross court: Serena wins 40%, Venus 60%. Serena serves to Venus's right - Venus returns down the line: Serena wins 45%, Venus 55%. Serena serves to Venus's right - Venus returns cross court: Serena wins 55%, Venus 45%. Find the Nash equilibrium using backward induction. ` Prob End >>>>>>>>>>>>>> """ } ` Problem 0 Start >>>>>>>>>> Sequential Game Test // 0: Title True True // 1: Initialize Wife Husband // 2: Player names 3 // 3: Number of levels Ballet Boxing _ _ Ballet Boxing Ballet Boxing _ _ _ _ French Chinese French Chinese French Chinese French Chinese 7_4 6_5 3_2 2_3 1_0 0_1 5_6 4_7 _ // 10: Illustrate branch path _ // 11: Illustrate decision node ` Text Start // 12: Dialogue Dialogue. ` Prob End <<<<<<<<<< ` Problem 0 Start >>>>>>>>>> Sequential Game // 0: Title True True // 1: Initialize Wife Husband // 2: Player names 3 // 3: Number of levels Ballet Boxing // 4: Strategies for 1st decision node _ _ // 5: Payoffs Ballet Boxing Ballet Boxing // 6: Strategies for 2nd decision node _ _ _ _ // 7: Payoffs French Chinese French Chinese French Chinese French Chinese // 7: Strategies for 3rd decision node 7_4 6_5 3_2 2_3 1_0 0_1 5_6 4_7 // 8: Payoffs True True // 9: Initialize _ // 10: Illustrate branch path _ // 11: Illustrate decision node ` Text Start // 12: Dialogue Dialogue. ` Prob End <<<<<<<<<< ` Problem 0 Start >>>>>>>>>> Sequential Game // 0: Title True True // 1: Initialize Wife Husband // 2: Player names 3 // 3: Number of levels Ballet Boxing // 4: Strategies for 1st decision node _ _ // 5: Payoffs Ballet Boxing Ballet Boxing // 6: Strategies for 2nd decision node _ _ _ _ // 7: Payoffs French Chinese French Chinese French Chinese French Chinese // 7: Strategies for 3rd decision node 7_4 6_5 3_2 2_3 1_0 0_1 5_6 4_7 // 8: Payoffs True True // 9: Initialize _ // 10: Illustrate branch path _ // 11: Illustrate decision node ` Text Start // 12: Dialogue Dialogue. ` Prob End <<<<<<<<<< ` Prob End ` Problem 2 Start Sequential Game // 0: Title True True // 1: Initialize Wife Husband // 2: Player names 2 // 3: Number of levels S0 S1 // 4: Strategies for 1st decision node P0_P1 _ // 5: Payoffs for 1st decision node ~ ~ S4 S5 // 6: Strategies for 2nd decision node ~ ~ P4_P5 P6_P7 // 7: Payoffs for 1st decision node _ // 8: Illustrate branch path _ // 9: Illustrate decision node ` Text Start // 10: Dialogue Dialogue. ` Prob End ` Problem 0 Start >>>>>>>>>> Sequential Game Test // 0: Title True True // 1: Initialize Wife Husband // 2: Player names 3 // 3: Number of levels Ballet Boxing _ _ Ballet Boxing Ballet Boxing _ _ _ _ French Chinese French Chinese French Chinese French Chinese 7_4 6_5 3_2 2_3 1_0 0_1 5_6 4_7 _ // 10: Illustrate branch path _ // 11: Illustrate decision node ` Text Start // 12: Dialogue Dialogue. ` Prob End <<<<<<<<<<