Skip to content

Commit 68016e2

Browse files
committed
icons and fixes
1 parent 7d7100d commit 68016e2

File tree

12 files changed

+57
-15
lines changed

12 files changed

+57
-15
lines changed

favicon-thrones.zip

476 KB
Binary file not shown.

frontend/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>Game Theory Workbench</title>
7+
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
8+
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
9+
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
10+
<link rel="manifest" href="/site.webmanifest">
711
</head>
812
<body>
913
<div id="root"></div>
52.5 KB
Loading
357 KB
Loading
47.1 KB
Loading

frontend/public/favicon-16x16.png

820 Bytes
Loading

frontend/public/favicon-32x32.png

2.41 KB
Loading

frontend/public/favicon.ico

15 KB
Binary file not shown.

frontend/public/site.webmanifest

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "Game Theory Workbench",
3+
"short_name": "GTW",
4+
"icons": [
5+
{"src": "/android-chrome-192x192.png", "sizes": "192x192", "type": "image/png"},
6+
{"src": "/android-chrome-512x512.png", "sizes": "512x512", "type": "image/png"}
7+
],
8+
"theme_color": "#ffffff",
9+
"background_color": "#ffffff",
10+
"display": "standalone"
11+
}

plugins/gambit/gambit_plugin/supports.py

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from typing import Any
1111

1212
import pygambit as gbt
13-
from pygambit.enumeration import SupportEnumeration
13+
from pygambit.nash import possible_nash_supports
1414

1515
from gambit_plugin.gambit_utils import extensive_to_gambit_table, normal_form_to_gambit
1616
from gambit_plugin.strategies import enumerate_strategies, resolve_payoffs
@@ -44,8 +44,7 @@ def run_support_enum(
4444
gambit_game = extensive_to_gambit_table(game, strategies, resolve_payoffs)
4545

4646
try:
47-
enumerator = SupportEnumeration()
48-
supports = list(enumerator.enumerate_supports(gambit_game))
47+
supports = possible_nash_supports(gambit_game)
4948

5049
# Convert to serializable format
5150
support_list = []
@@ -76,20 +75,14 @@ def run_support_enum(
7675
}
7776

7877

79-
def _support_to_dict(game: gbt.Game, support) -> dict[str, Any]:
80-
"""Convert a support profile to a serializable dict."""
78+
def _support_to_dict(game: gbt.Game, support: gbt.StrategySupportProfile) -> dict[str, Any]:
79+
"""Convert a StrategySupportProfile to a serializable dict."""
8180
result: dict[str, list[str]] = {}
8281

83-
# Support is indexed by player
8482
for player in game.players:
8583
player_support = []
8684
for strategy in player.strategies:
87-
# Check if strategy is in support
88-
try:
89-
if support[strategy]:
90-
player_support.append(strategy.label)
91-
except (KeyError, TypeError):
92-
# If we can't check, assume it's in support
85+
if strategy in support:
9386
player_support.append(strategy.label)
9487
result[player.label] = player_support
9588

0 commit comments

Comments
 (0)