Skip to content

Commit 451b313

Browse files
remove family games
1 parent 35ba3a6 commit 451b313

File tree

1 file changed

+0
-58
lines changed

1 file changed

+0
-58
lines changed

catalog/__init__.py

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -175,61 +175,3 @@ def append_record(
175175
records, columns=["Game", "Title", "Description", "Download", "Format"]
176176
)
177177
return pd.DataFrame.from_records(records, columns=["Game", "Title"])
178-
179-
180-
def family_games() -> dict[str, gbt.Game]:
181-
"""
182-
Generate a dict of games for inclusion in the catalog,
183-
using the game families in this module.
184-
185-
Returns
186-
-------
187-
dict[str, gbt.Game]
188-
A dictionary mapping slugs to game objects for family games.
189-
"""
190-
return {
191-
"one_shot_trust": one_shot_trust(),
192-
"oneshot_trust_unique_NE": one_shot_trust(unique_NE_variant=True),
193-
}
194-
195-
196-
################################################################################################
197-
# Families
198-
199-
200-
def one_shot_trust(unique_NE_variant: bool = False) -> gbt.Game:
201-
"""
202-
The unique_NE_variant makes Trust a dominant strategy, replacing the
203-
non-singleton equilibrium component from the standard version of the game
204-
where the Buyer plays "Not Trust" and the seller can play any mixture with
205-
< 0.5 probability on Honor with a unique NE where the Buyer plays Trust and
206-
the Seller plays Abuse.
207-
208-
Parameters
209-
----------
210-
unique_NE_variant : bool, optional
211-
Whether to modify the game so that it has a unique Nash equilibrium.
212-
Defaults to False.
213-
214-
Returns
215-
-------
216-
gbt.Game
217-
The constructed extensive-form game.
218-
"""
219-
g = gbt.Game.new_tree(players=["Buyer", "Seller"])
220-
g.description = "One-shot trust game with binary actions, originally from [Kre90]_."
221-
g.append_move(g.root, "Buyer", ["Trust", "Not trust"])
222-
g.append_move(g.root.children[0], "Seller", ["Honor", "Abuse"])
223-
g.set_outcome(g.root.children[0].children[0], g.add_outcome([1, 1], label="Trustworthy"))
224-
if unique_NE_variant:
225-
g.title = "One-shot trust game with unique NE"
226-
g.set_outcome(
227-
g.root.children[0].children[1], g.add_outcome(["1/2", 2], label="Untrustworthy")
228-
)
229-
else:
230-
g.title = "One-shot trust game"
231-
g.set_outcome(
232-
g.root.children[0].children[1], g.add_outcome([-1, 2], label="Untrustworthy")
233-
)
234-
g.set_outcome(g.root.children[1], g.add_outcome([0, 0], label="Opt-out"))
235-
return g

0 commit comments

Comments
 (0)