Skip to content

Commit 919e36b

Browse files
committed
Added: Myerson 2-card poker and Selten's Horse
1 parent 8299819 commit 919e36b

1 file changed

Lines changed: 103 additions & 2 deletions

File tree

tests/test_rsf.py

Lines changed: 103 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,110 @@
7676
],
7777
True,
7878
),
79+
# Selten's Horse: game with three players
80+
(
81+
games.read_from_file("e01.efg"),
82+
[["1", "2"], ["1", "2"], ["1", "2"]],
83+
[
84+
np.array(
85+
[
86+
[
87+
[
88+
Rational(1, 1),
89+
Rational(1, 1)
90+
],
91+
[
92+
Rational(4, 1),
93+
Rational(0, 1)
94+
]
95+
],
96+
[
97+
[
98+
Rational(3, 1),
99+
Rational(0, 1)
100+
],
101+
[
102+
Rational(3, 1),
103+
Rational(0, 1)
104+
]
105+
]
106+
]
107+
),
108+
np.array(
109+
[
110+
[
111+
[
112+
Rational(1, 1),
113+
Rational(1, 1)
114+
],
115+
[
116+
Rational(4, 1),
117+
Rational(0, 1)
118+
]
119+
],
120+
[
121+
[
122+
Rational(2, 1),
123+
Rational(0, 1)
124+
],
125+
[
126+
Rational(2, 1),
127+
Rational(0, 1)
128+
]
129+
]
130+
]
131+
),
132+
np.array(
133+
[
134+
[
135+
[
136+
Rational(1, 1),
137+
Rational(1, 1)
138+
],
139+
[
140+
Rational(0, 1),
141+
Rational(1, 1)
142+
]
143+
],
144+
[
145+
[
146+
Rational(2, 1),
147+
Rational(0, 1)
148+
],
149+
[
150+
Rational(2, 1),
151+
Rational(0, 1)
152+
]
153+
]
154+
]
155+
)
156+
],
157+
True,
158+
),
159+
# Myerson 2-card poker; game with chance node
160+
(
161+
games.read_from_file("myerson_2_card_poker.efg"),
162+
[["11", "12", "21", "22"], ["1", "2"]],
163+
[
164+
np.array(
165+
[
166+
[Rational(-1, 1), Rational(0, 1)],
167+
[Rational(-1, 2), Rational(-1, 1)],
168+
[Rational(-5, 2), Rational(-1, 1)],
169+
[Rational(-2, 1), Rational(-2, 1)]
170+
]
171+
),
172+
np.array(
173+
[
174+
[Rational(1, 1), Rational(0, 1)],
175+
[Rational(1, 2), Rational(1, 1)],
176+
[Rational(5, 2), Rational(1, 1)],
177+
[Rational(2, 1), Rational(2, 1)]]
178+
)
179+
],
180+
True,
181+
)
79182
],
80-
# games with chance nodes
81-
# games with more than two players
82183
)
83184
def test_reduced_strategic_form(
84185
game: gbt.Game, strategy_labels: list, np_arrays_of_rsf: list, rational_flag: bool

0 commit comments

Comments
 (0)