@@ -100,7 +100,7 @@ def create_coord_4x4_nfg(outcome_version: bool = False) -> gbt.Game:
100100# Extensive-form games (efg)
101101
102102
103- def create_2x2_zero_sum_efg (missing_term_outcome = False ) -> gbt .Game :
103+ def create_2x2_zero_sum_efg (missing_term_outcome : bool = False ) -> gbt .Game :
104104 """
105105 EFG corresponding to 2x2 zero-sum game (I,-I).
106106 If missing_term_outcome, the terminal node after "T" then "r" does not have an outcome.
@@ -123,7 +123,7 @@ def create_2x2_zero_sum_efg(missing_term_outcome=False) -> gbt.Game:
123123 return g
124124
125125
126- def create_matching_pennies_efg (with_neutral_outcome = False ) -> gbt .Game :
126+ def create_matching_pennies_efg (with_neutral_outcome : bool = False ) -> gbt .Game :
127127 """
128128 The version with_neutral_outcome adds a (0,0) payoff outcomes at a non-terminal node.
129129 """
@@ -156,7 +156,7 @@ def create_mixed_behav_game_efg() -> gbt.Game:
156156 return read_from_file ("mixed_behavior_game.efg" )
157157
158158
159- def create_stripped_down_poker_efg (nonterm_outcomes = False ) -> gbt .Game :
159+ def create_stripped_down_poker_efg (nonterm_outcomes : bool = False ) -> gbt .Game :
160160 """
161161 Returns
162162 -------
@@ -404,7 +404,7 @@ def get_path(node):
404404 return g
405405
406406
407- def create_kuhn_poker_efg (nonterm_outcomes = False ) -> gbt .Game :
407+ def create_kuhn_poker_efg (nonterm_outcomes : bool = False ) -> gbt .Game :
408408 """
409409 Returns
410410 -------
@@ -458,12 +458,15 @@ def kuhn_poker_lcp_first_mixed_strategy_prof():
458458 return [alice , bob ]
459459
460460
461- def create_one_shot_trust_efg () -> gbt .Game :
461+ def create_one_shot_trust_efg (unique_NE_variant : bool = False ) -> gbt .Game :
462462 """
463- Returns
464- -------
465- Game
466- One-shot trust game, after Kreps (1990)
463+ One-shot trust game, after Kreps (1990)
464+
465+ The unique_NE_variant makes Trust a dominant strategy, replacing the
466+ non-singleton equilibrium component from the standard version of the game
467+ where the Buyer plays "Not Trust" and the seller can play any mixture with
468+ < 0.5 probability on Honor with a unique NE where the Buyer plays Trust and
469+ the Seller plays Abuse.
467470 """
468471 g = gbt .Game .new_tree (
469472 players = ["Buyer" , "Seller" ], title = "One-shot trust game, after Kreps (1990)"
@@ -473,9 +476,14 @@ def create_one_shot_trust_efg() -> gbt.Game:
473476 g .set_outcome (
474477 g .root .children [0 ].children [0 ], g .add_outcome ([1 , 1 ], label = "Trustworthy" )
475478 )
476- g .set_outcome (
477- g .root .children [0 ].children [1 ], g .add_outcome ([- 1 , 2 ], label = "Untrustworthy" )
478- )
479+ if unique_NE_variant :
480+ g .set_outcome (
481+ g .root .children [0 ].children [1 ], g .add_outcome (["1/2" , 2 ], label = "Untrustworthy" )
482+ )
483+ else :
484+ g .set_outcome (
485+ g .root .children [0 ].children [1 ], g .add_outcome ([- 1 , 2 ], label = "Untrustworthy" )
486+ )
479487 g .set_outcome (g .root .children [1 ], g .add_outcome ([0 , 0 ], label = "Opt-out" ))
480488 return g
481489
0 commit comments