Skip to content

Commit eba5da5

Browse files
committed
myerson_2_card_poker.efg -> stripped_down_poker.efg
1 parent 9e399c4 commit eba5da5

File tree

9 files changed

+378
-409
lines changed

9 files changed

+378
-409
lines changed

tests/games.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,17 +113,20 @@ def create_mixed_behav_game_efg() -> gbt.Game:
113113
return read_from_file("mixed_behavior_game.efg")
114114

115115

116-
def create_myerson_2_card_poker_efg() -> gbt.Game:
116+
def create_stripped_down_poker_efg() -> gbt.Game:
117117
"""
118118
Returns
119119
-------
120120
Game
121-
Simplied "stripped down" version of Myerson 2-card poker:
122-
Two-player extensive poker game with a chance move with two moves,
123-
then player 1 can raise or fold; after raising player 2 is in an infoset with two nodes
124-
and can choose to meet or pass
121+
Stripped-Down Poker: A Classroom Game with Signaling and Bluffing
122+
Reiley et al (2008)
123+
124+
Two-player extensive-form poker game between Fred and Alice
125+
Chance deals King or Queen to Fred
126+
Fred can then Bet or Fold; after raising Alice is in an infoset with two nodes
127+
and can choose to Call or Fold
125128
"""
126-
return read_from_file("myerson_2_card_poker.efg")
129+
return read_from_file("stripped_down_poker.efg")
127130

128131

129132
def create_kuhn_poker_efg() -> gbt.Game:

tests/test_actions.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
@pytest.mark.parametrize(
99
"game,label",
10-
[(games.create_myerson_2_card_poker_efg(), "random label")]
10+
[(games.create_stripped_down_poker_efg(), "random label")]
1111
)
1212
def test_set_action_label(game: gbt.Game, label: str):
1313
game.root.infoset.actions[0].label = label
@@ -16,9 +16,9 @@ def test_set_action_label(game: gbt.Game, label: str):
1616

1717
@pytest.mark.parametrize(
1818
"game,inprobs,outprobs",
19-
[(games.create_myerson_2_card_poker_efg(),
19+
[(games.create_stripped_down_poker_efg(),
2020
[0.75, 0.25], [0.75, 0.25]),
21-
(games.create_myerson_2_card_poker_efg(),
21+
(games.create_stripped_down_poker_efg(),
2222
["16/17", "1/17"], [gbt.Rational("16/17"), gbt.Rational("1/17")])]
2323
)
2424
def test_set_chance_valid_probability(game: gbt.Game, inprobs: list, outprobs: list):
@@ -29,9 +29,9 @@ def test_set_chance_valid_probability(game: gbt.Game, inprobs: list, outprobs: l
2929

3030
@pytest.mark.parametrize(
3131
"game,inprobs",
32-
[(games.create_myerson_2_card_poker_efg(), [0.75, -0.10]),
33-
(games.create_myerson_2_card_poker_efg(), [0.75, 0.40]),
34-
(games.create_myerson_2_card_poker_efg(), ["foo", "bar"])]
32+
[(games.create_stripped_down_poker_efg(), [0.75, -0.10]),
33+
(games.create_stripped_down_poker_efg(), [0.75, 0.40]),
34+
(games.create_stripped_down_poker_efg(), ["foo", "bar"])]
3535
)
3636
def test_set_chance_improper_probability(game: gbt.Game, inprobs: list):
3737
with pytest.raises(ValueError):
@@ -40,8 +40,8 @@ def test_set_chance_improper_probability(game: gbt.Game, inprobs: list):
4040

4141
@pytest.mark.parametrize(
4242
"game,inprobs",
43-
[(games.create_myerson_2_card_poker_efg(), [0.25, 0.75, 0.25]),
44-
(games.create_myerson_2_card_poker_efg(), [1.00])]
43+
[(games.create_stripped_down_poker_efg(), [0.25, 0.75, 0.25]),
44+
(games.create_stripped_down_poker_efg(), [1.00])]
4545
)
4646
def test_set_chance_bad_dimension(game: gbt.Game, inprobs: list):
4747
with pytest.raises(IndexError):
@@ -50,7 +50,7 @@ def test_set_chance_bad_dimension(game: gbt.Game, inprobs: list):
5050

5151
@pytest.mark.parametrize(
5252
"game",
53-
[games.create_myerson_2_card_poker_efg()]
53+
[games.create_stripped_down_poker_efg()]
5454
)
5555
def test_set_chance_personal(game: gbt.Game):
5656
with pytest.raises(gbt.UndefinedOperationError):
@@ -59,7 +59,7 @@ def test_set_chance_personal(game: gbt.Game):
5959

6060
@pytest.mark.parametrize(
6161
"game",
62-
[games.create_myerson_2_card_poker_efg()]
62+
[games.create_stripped_down_poker_efg()]
6363
)
6464
def test_action_precedes(game: gbt.Game):
6565
child = game.root.children[0]
@@ -69,7 +69,7 @@ def test_action_precedes(game: gbt.Game):
6969

7070
@pytest.mark.parametrize(
7171
"game",
72-
[games.create_myerson_2_card_poker_efg()]
72+
[games.create_stripped_down_poker_efg()]
7373
)
7474
def test_action_precedes_nonnode(game: gbt.Game):
7575
with pytest.raises(TypeError):
@@ -78,7 +78,7 @@ def test_action_precedes_nonnode(game: gbt.Game):
7878

7979
@pytest.mark.parametrize(
8080
"game",
81-
[games.create_myerson_2_card_poker_efg()]
81+
[games.create_stripped_down_poker_efg()]
8282
)
8383
def test_action_delete_personal(game: gbt.Game):
8484
node = game.players[0].infosets[0].members[0]
@@ -90,7 +90,7 @@ def test_action_delete_personal(game: gbt.Game):
9090

9191
@pytest.mark.parametrize(
9292
"game",
93-
[games.create_myerson_2_card_poker_efg()]
93+
[games.create_stripped_down_poker_efg()]
9494
)
9595
def test_action_delete_last(game: gbt.Game):
9696
node = game.players[0].infosets[0].members[0]
@@ -103,7 +103,7 @@ def test_action_delete_last(game: gbt.Game):
103103
@pytest.mark.parametrize(
104104
"game",
105105
[games.read_from_file("chance_root_3_moves_only_one_nonzero_prob.efg"),
106-
games.create_myerson_2_card_poker_efg(),
106+
games.create_stripped_down_poker_efg(),
107107
games.read_from_file("chance_root_5_moves_no_nonterm_player_nodes.efg")]
108108
)
109109
def test_action_delete_chance(game: gbt.Game):

0 commit comments

Comments
 (0)