Skip to content

Commit a8148c8

Browse files
revoke need to import catalog separately
1 parent 8a4c26b commit a8148c8

3 files changed

Lines changed: 42 additions & 26 deletions

File tree

doc/tutorials/01_quickstart.ipynb

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@
431431
},
432432
{
433433
"cell_type": "code",
434-
"execution_count": 14,
434+
"execution_count": 13,
435435
"id": "701aa52a",
436436
"metadata": {},
437437
"outputs": [
@@ -441,15 +441,34 @@
441441
"['PrisonersDilemma']"
442442
]
443443
},
444+
"execution_count": 13,
445+
"metadata": {},
446+
"output_type": "execute_result"
447+
}
448+
],
449+
"source": [
450+
"gbt.catalog.games(game_type=\"nfg\", num_players=2)"
451+
]
452+
},
453+
{
454+
"cell_type": "code",
455+
"execution_count": 14,
456+
"id": "d89eff93-d9f3-4de0-ab61-6a2b8d2397b3",
457+
"metadata": {},
458+
"outputs": [
459+
{
460+
"data": {
461+
"text/plain": [
462+
"\"Prisoner's Dilemma game.\""
463+
]
464+
},
444465
"execution_count": 14,
445466
"metadata": {},
446467
"output_type": "execute_result"
447468
}
448469
],
449470
"source": [
450-
"from pygambit import catalog\n",
451-
"\n",
452-
"catalog.games(game_type=\"nfg\", num_players=2)"
471+
"gbt.catalog.PrisonersDilemma.description"
453472
]
454473
},
455474
{
@@ -482,7 +501,7 @@
482501
}
483502
],
484503
"source": [
485-
"g = catalog.PrisonersDilemma()\n",
504+
"g = gbt.catalog.PrisonersDilemma()\n",
486505
"g"
487506
]
488507
},
@@ -502,7 +521,7 @@
502521
},
503522
{
504523
"cell_type": "code",
505-
"execution_count": null,
524+
"execution_count": 16,
506525
"id": "f58eaa77",
507526
"metadata": {},
508527
"outputs": [],
@@ -520,7 +539,7 @@
520539
},
521540
{
522541
"cell_type": "code",
523-
"execution_count": null,
542+
"execution_count": 17,
524543
"id": "4119a2ac",
525544
"metadata": {},
526545
"outputs": [],

doc/tutorials/02_extensive_form.ipynb

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,9 +1123,7 @@
11231123
}
11241124
],
11251125
"source": [
1126-
"from pygambit import catalog\n",
1127-
"\n",
1128-
"catalog.games(game_type=\"efg\", num_players=2)"
1126+
"gbt.catalog.games(game_type=\"efg\", num_players=2)"
11291127
]
11301128
},
11311129
{
@@ -1139,31 +1137,29 @@
11391137
},
11401138
{
11411139
"cell_type": "code",
1142-
"execution_count": 21,
1140+
"execution_count": 15,
11431141
"id": "2933061a-a2eb-4ca7-8ce3-f350bc0678ce",
11441142
"metadata": {},
11451143
"outputs": [
11461144
{
11471145
"name": "stdout",
11481146
"output_type": "stream",
11491147
"text": [
1150-
"\n",
1151-
" The unique_NE_variant makes Trust a dominant strategy, replacing the\n",
1152-
" non-singleton equilibrium component from the standard version of the game\n",
1153-
" where the Buyer plays \"Not Trust\" and the seller can play any mixture with\n",
1154-
" < 0.5 probability on Honor with a unique NE where the Buyer plays Trust and\n",
1155-
" the Seller plays Abuse.\n",
1156-
" \n"
1148+
"The unique_NE_variant makes Trust a dominant strategy, replacing the\n",
1149+
"non-singleton equilibrium component from the standard version of the game\n",
1150+
"where the Buyer plays \"Not Trust\" and the seller can play any mixture with\n",
1151+
"< 0.5 probability on Honor with a unique NE where the Buyer plays Trust and\n",
1152+
"the Seller plays Abuse.\n"
11571153
]
11581154
}
11591155
],
11601156
"source": [
1161-
"print(catalog.OneShotTrust.description)"
1157+
"print(gbt.catalog.OneShotTrust.description)"
11621158
]
11631159
},
11641160
{
11651161
"cell_type": "code",
1166-
"execution_count": 15,
1162+
"execution_count": 16,
11671163
"id": "4556c0bf",
11681164
"metadata": {},
11691165
"outputs": [
@@ -1342,13 +1338,13 @@
13421338
"<IPython.core.display.SVG object>"
13431339
]
13441340
},
1345-
"execution_count": 15,
1341+
"execution_count": 16,
13461342
"metadata": {},
13471343
"output_type": "execute_result"
13481344
}
13491345
],
13501346
"source": [
1351-
"draw_tree(catalog.OneShotTrust(unique_NE_variant=True))"
1347+
"draw_tree(gbt.catalog.OneShotTrust(unique_NE_variant=True))"
13521348
]
13531349
},
13541350
{
@@ -1368,7 +1364,7 @@
13681364
},
13691365
{
13701366
"cell_type": "code",
1371-
"execution_count": 16,
1367+
"execution_count": 17,
13721368
"id": "37c51152",
13731369
"metadata": {},
13741370
"outputs": [],
@@ -1386,7 +1382,7 @@
13861382
},
13871383
{
13881384
"cell_type": "code",
1389-
"execution_count": 17,
1385+
"execution_count": 18,
13901386
"id": "0d86a750",
13911387
"metadata": {},
13921388
"outputs": [],
@@ -1405,7 +1401,7 @@
14051401
},
14061402
{
14071403
"cell_type": "code",
1408-
"execution_count": 18,
1404+
"execution_count": 19,
14091405
"id": "1bab777f-8a0b-4f1e-9c0c-270690288243",
14101406
"metadata": {},
14111407
"outputs": [],
@@ -1417,7 +1413,7 @@
14171413
},
14181414
{
14191415
"cell_type": "code",
1420-
"execution_count": 19,
1416+
"execution_count": 20,
14211417
"id": "2b715221-e427-4092-ad2f-9f4f2b548fa4",
14221418
"metadata": {},
14231419
"outputs": [],

src/pygambit/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
nash, # noqa: F401
2727
qre, # noqa: F401
2828
supports, # noqa: F401
29+
catalog, # noqa: F401
2930
)
3031

3132
import importlib.metadata

0 commit comments

Comments
 (0)