@@ -46,10 +46,10 @@ def _set_action_probs(profile: gbt.MixedStrategyProfile, probs: list, rational_f
4646 ),
4747 ###############################################################################
4848 # centipede with chance efg
49- (games .create_centipede_game_with_chance_efg ( ), [[0 , 0 , 0 , 0 ], [1 , 0 , 0 , 0 ]], True ),
50- (games .create_centipede_game_with_chance_efg ( ), [[1 , 0 , 0 , 0 ], [0 , 0 , 0 , 0 ]], True ),
51- (games .create_centipede_game_with_chance_efg ( ), [[0 , 0 , 0 , 0 ], [1 , 0 , 0 , 0 ]], False ),
52- (games .create_centipede_game_with_chance_efg ( ), [[1 , 0 , 0 , 0 ], [0 , 0 , 0 , 0 ]], False ),
49+ (games .read_from_file ( "cent3.efg" ), [[0 , 0 , 0 , 0 ], [1 , 0 , 0 , 0 ]], True ),
50+ (games .read_from_file ( "cent3.efg" ), [[1 , 0 , 0 , 0 ], [0 , 0 , 0 , 0 ]], True ),
51+ (games .read_from_file ( "cent3.efg" ), [[0 , 0 , 0 , 0 ], [1 , 0 , 0 , 0 ]], False ),
52+ (games .read_from_file ( "cent3.efg" ), [[1 , 0 , 0 , 0 ], [0 , 0 , 0 , 0 ]], False ),
5353 ],
5454)
5555def test_normalize_zero_value_error (game , profile_data , rational_flag ):
@@ -83,10 +83,10 @@ def test_normalize_zero_value_error(game, profile_data, rational_flag):
8383 ),
8484 ###############################################################################
8585 # centipede with chance efg
86- (games .create_centipede_game_with_chance_efg ( ), [[- 1 , 0 , 0 , 0 ], [1 , 0 , 0 , 0 ]], True ),
87- (games .create_centipede_game_with_chance_efg ( ), [[1 , 0 , 0 , 0 ], [- 1 , 0 , 0 , 0 ]], True ),
88- (games .create_centipede_game_with_chance_efg ( ), [[- 1 , 0 , 0 , 0 ], [1 , 0 , 0 , 0 ]], False ),
89- (games .create_centipede_game_with_chance_efg ( ), [[1 , 0 , 0 , 0 ], [- 1 , 0 , 0 , 0 ]], False ),
86+ (games .read_from_file ( "cent3.efg" ), [[- 1 , 0 , 0 , 0 ], [1 , 0 , 0 , 0 ]], True ),
87+ (games .read_from_file ( "cent3.efg" ), [[1 , 0 , 0 , 0 ], [- 1 , 0 , 0 , 0 ]], True ),
88+ (games .read_from_file ( "cent3.efg" ), [[- 1 , 0 , 0 , 0 ], [1 , 0 , 0 , 0 ]], False ),
89+ (games .read_from_file ( "cent3.efg" ), [[1 , 0 , 0 , 0 ], [- 1 , 0 , 0 , 0 ]], False ),
9090 ],
9191)
9292def test_normalize_neg_entry_value_error (game , profile_data , rational_flag ):
@@ -115,13 +115,13 @@ def test_normalize_neg_entry_value_error(game, profile_data, rational_flag):
115115 ###############################################################################
116116 # centipede with chance efg
117117 (
118- games .create_centipede_game_with_chance_efg ( ),
118+ games .read_from_file ( "cent3.efg" ),
119119 [[1 , 2 , 3 , 14 ], [1 , 1 , 1 , 1 ]],
120120 [["1/20" , "2/20" , "3/20" , "14/20" ], ["1/4" , "1/4" , "1/4" , "1/4" ]],
121121 True ,
122122 ),
123123 (
124- games .create_centipede_game_with_chance_efg ( ),
124+ games .read_from_file ( "cent3.efg" ),
125125 [[1.0 , 2.0 , 3.0 , 14.0 ], [1 , 1 , 1 , 1 ]],
126126 [[1 / 20 , 2 / 20 , 3 / 20 , 14 / 20 ], [0.25 , 0.25 , 0.25 , 0.25 ]],
127127 False ,
@@ -544,8 +544,8 @@ def test_strategy_value_by_label_reference(
544544 [
545545 (games .read_from_file ("mixed_behavior_game.efg" ), False ),
546546 (games .read_from_file ("mixed_behavior_game.efg" ), True ),
547- (games .create_centipede_game_with_chance_efg ( ), False ),
548- (games .create_centipede_game_with_chance_efg ( ), True ),
547+ (games .read_from_file ( "cent3.efg" ), False ),
548+ (games .read_from_file ( "cent3.efg" ), True ),
549549 ],
550550)
551551def test_as_behavior_roundtrip (game : gbt .Game , rational_flag : bool ):
@@ -774,14 +774,14 @@ def test_strategy_value_reference(
774774 ##############################################################################
775775 # El Farol bar game efg
776776 (
777- games .create_el_farol_bar_game_efg ( ),
777+ games .read_from_file ( "el_farol_bar.efg" ),
778778 [["1/2" , "1/2" ], ["1/2" , "1/2" ], ["1/2" , "1/2" ], ["1/2" , "1/2" ], ["1/2" , "1/2" ]],
779779 0 ,
780780 ZERO ,
781781 True ,
782782 ),
783783 (
784- games .create_el_farol_bar_game_efg ( ),
784+ games .read_from_file ( "el_farol_bar.efg" ),
785785 [[1 , 0 ], [1 , 0 ], [0 , 1 ], [0 , 1 ], [0 , 1 ]],
786786 0 ,
787787 ZERO ,
@@ -972,14 +972,14 @@ def test_liap_value_reference(
972972 ##############################################################################
973973 # El Farol bar game efg
974974 (
975- games .create_el_farol_bar_game_efg ( ),
975+ games .read_from_file ( "el_farol_bar.efg" ),
976976 [["1/2" , "1/2" ], ["1/2" , "1/2" ], ["1/2" , "1/2" ], ["1/2" , "1/2" ], ["1/2" , "1/2" ]],
977977 [0 ] * 5 ,
978978 ZERO ,
979979 True ,
980980 ),
981981 (
982- games .create_el_farol_bar_game_efg ( ),
982+ games .read_from_file ( "el_farol_bar.efg" ),
983983 [[1 , 0 ], [1 , 0 ], [0 , 1 ], [0 , 1 ], [0 , 1 ]],
984984 [0 ] * 5 ,
985985 ZERO ,
@@ -1104,12 +1104,12 @@ def test_player_regret_max_regret_reference(
11041104 (games .read_from_file ("2x2_bimatrix_all_zero_payoffs.nfg" ), True ),
11051105 #################################################################################
11061106 # El Farol bar game efg
1107- (games .create_el_farol_bar_game_efg ( ), False ),
1108- (games .create_el_farol_bar_game_efg ( ), True ),
1107+ (games .read_from_file ( "el_farol_bar.efg" ), False ),
1108+ (games .read_from_file ( "el_farol_bar.efg" ), True ),
11091109 #################################################################################
11101110 # Centipede with chance efg
1111- (games .create_centipede_game_with_chance_efg ( ), False ),
1112- (games .create_centipede_game_with_chance_efg ( ), True ),
1111+ (games .read_from_file ( "cent3.efg" ), False ),
1112+ (games .read_from_file ( "cent3.efg" ), True ),
11131113 #################################################################################
11141114 # 2x2x2 nfg
11151115 (games .read_from_file ("2x2x2_nfg_from_local_max_cut_2_pure_1_mixed_eq.nfg" ), False ),
@@ -1146,27 +1146,27 @@ def test_strategy_regret_consistency(game: gbt.Game, rational_flag: bool):
11461146 #################################################################################
11471147 # Centipede with chance efg
11481148 (
1149- games .create_centipede_game_with_chance_efg ( ),
1149+ games .read_from_file ( "cent3.efg" ),
11501150 [["1/3" , "1/3" , "1/3" , "0/1" ], ["1/10" , "3/5" , "3/10" , 0 ]],
11511151 ZERO ,
11521152 True ,
11531153 ),
11541154 (
1155- games .create_centipede_game_with_chance_efg ( ),
1155+ games .read_from_file ( "cent3.efg" ),
11561156 [[1 / 3 , 1 / 3 , 1 / 3 , 0 ], [0.10 , 3 / 5 , 0.3 , 0 ]],
11571157 TOL ,
11581158 False ,
11591159 ),
11601160 #################################################################################
11611161 # El Farol bar game efg
11621162 (
1163- games .create_el_farol_bar_game_efg ( ),
1163+ games .read_from_file ( "el_farol_bar.efg" ),
11641164 [[1 , 0 ], ["1/2" , "1/2" ], ["1/3" , "2/3" ], ["1/5" , "4/5" ], ["1/8" , "7/8" ]],
11651165 ZERO ,
11661166 True ,
11671167 ),
11681168 (
1169- games .create_el_farol_bar_game_efg ( ),
1169+ games .read_from_file ( "el_farol_bar.efg" ),
11701170 [[1 , 0 ], [1 / 2 , 1 / 2 ], [1 / 3 , 2 / 3 ], [1 / 5 , 4 / 5 ], [1 / 8 , 7 / 8 ]],
11711171 TOL ,
11721172 False ,
@@ -1239,27 +1239,27 @@ def test_liap_value_consistency(
12391239 #################################################################################
12401240 # Centipede with chance efg
12411241 (
1242- games .create_centipede_game_with_chance_efg ( ),
1242+ games .read_from_file ( "cent3.efg" ),
12431243 [["1/3" , "1/3" , "1/3" , "0/1" ], ["1/10" , "3/5" , "3/10" , 0 ]],
12441244 ZERO ,
12451245 True ,
12461246 ),
12471247 (
1248- games .create_centipede_game_with_chance_efg ( ),
1248+ games .read_from_file ( "cent3.efg" ),
12491249 [[1 / 3 , 1 / 3 , 1 / 3 , 0 ], [0.10 , 3 / 5 , 0.3 , 0 ]],
12501250 TOL ,
12511251 False ,
12521252 ),
12531253 #################################################################################
12541254 # El Farol bar game efg
12551255 (
1256- games .create_el_farol_bar_game_efg ( ),
1256+ games .read_from_file ( "el_farol_bar.efg" ),
12571257 [[1 , 0 ], ["1/2" , "1/2" ], ["1/3" , "2/3" ], ["1/5" , "4/5" ], ["1/8" , "7/8" ]],
12581258 ZERO ,
12591259 True ,
12601260 ),
12611261 (
1262- games .create_el_farol_bar_game_efg ( ),
1262+ games .read_from_file ( "el_farol_bar.efg" ),
12631263 [[1 , 0 ], [1 / 2 , 1 / 2 ], [1 / 3 , 2 / 3 ], [1 / 5 , 4 / 5 ], [1 / 8 , 7 / 8 ]],
12641264 TOL ,
12651265 False ,
@@ -1343,15 +1343,15 @@ def test_player_regret_max_regret_consistency(
13431343 #################################################################################
13441344 # Centipede game with chance
13451345 (
1346- games .create_centipede_game_with_chance_efg ( ),
1346+ games .read_from_file ( "cent3.efg" ),
13471347 [["1/3" , "1/3" , "1/3" , "0/1" ], ["1/10" , "3/5" , "3/10" , "0/1" ]],
13481348 [["1/3" , "1/3" , "1/3" , "0/1" ], ["1/5" , "2/5" , "1/5" , "1/5" ]],
13491349 gbt .Rational ("1/12" ),
13501350 ZERO ,
13511351 True ,
13521352 ),
13531353 (
1354- games .create_centipede_game_with_chance_efg ( ),
1354+ games .read_from_file ( "cent3.efg" ),
13551355 [[1 / 3 , 1 / 3 , 1 / 3 , 0 / 1 ], [1 / 10 , 3 / 5 , 3 / 10 , 0 / 1 ]],
13561356 [[1 / 3 , 1 / 3 , 1 / 3 , 0 / 1 ], [1 / 5 , 2 / 5 , 1 / 5 , 1 / 5 ]],
13571357 1 / 12 ,
@@ -1371,7 +1371,7 @@ def test_player_regret_max_regret_consistency(
13711371 #################################################################################
13721372 # El Farol bar game
13731373 (
1374- games .create_el_farol_bar_game_efg ( ),
1374+ games .read_from_file ( "el_farol_bar.efg" ),
13751375 [["4/9" , "5/9" ], ["1/3" , "2/3" ], ["1/2" , "1/2" ], ["11/12" , "1/12" ], ["1/2" , "1/2" ]],
13761376 [["4/9" , "5/9" ], ["1/3" , "2/3" ], ["1/2" , "1/2" ], ["1/12" , "11/12" ], ["1/2" , "1/2" ]],
13771377 gbt .Rational ("1/2" ),
@@ -1445,13 +1445,13 @@ def test_linearity_payoff_property(
14451445 #################################################################################
14461446 # Centipede game with chance
14471447 (
1448- games .create_centipede_game_with_chance_efg ( ),
1448+ games .read_from_file ( "cent3.efg" ),
14491449 [["1/5" , "2/5" , "1/5" , "1/5" ], ["1/10" , "3/5" , "3/10" , "0/1" ]],
14501450 ZERO ,
14511451 True ,
14521452 ),
14531453 (
1454- games .create_centipede_game_with_chance_efg ( ),
1454+ games .read_from_file ( "cent3.efg" ),
14551455 [[1 / 3 , 1 / 3 , 1 / 3 , 0 / 1 ], [1 / 10 , 3 / 5 , 3 / 10 , 0 / 1 ]],
14561456 TOL ,
14571457 False ,
@@ -1473,7 +1473,7 @@ def test_linearity_payoff_property(
14731473 #################################################################################
14741474 # El Farol bar game
14751475 (
1476- games .create_el_farol_bar_game_efg ( ),
1476+ games .read_from_file ( "el_farol_bar.efg" ),
14771477 [["4/9" , "5/9" ], ["1/3" , "2/3" ], ["0/1" , "1/1" ], ["11/12" , "1/12" ], ["1/3" , "2/3" ]],
14781478 ZERO ,
14791479 True ,
@@ -1523,15 +1523,15 @@ def test_payoff_and_strategy_value_consistency(
15231523 #################################################################################
15241524 # centipede game with chance
15251525 (
1526- games .create_centipede_game_with_chance_efg ( ),
1526+ games .read_from_file ( "cent3.efg" ),
15271527 [["1/3" , "1/3" , "1/3" , "0" ], ["1/10" , "3/5" , "3/10" , "0" ]],
15281528 [["1/3" , "1/3" , "1/3" , "0" ], ["1/10" , "3/5" , "3/10" , "0" ]],
15291529 "82943/62500" ,
15301530 True ,
15311531 ZERO ,
15321532 ),
15331533 (
1534- games .create_centipede_game_with_chance_efg ( ),
1534+ games .read_from_file ( "cent3.efg" ),
15351535 [[1 / 3 , 1 / 3 , 1 / 3 , 0 ], [1 / 10 , 3 / 5 , 3 / 10 , 0 ]],
15361536 [[1 / 3 , 1 / 3 , 1 / 3 , 0 ], [1 / 10 , 3 / 5 , 3 / 10 , 0 ]],
15371537 82943 / 62500 ,
0 commit comments