Skip to content

Commit dc94170

Browse files
committed
fix pycid
1 parent 9e4f703 commit dc94170

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

docker/Dockerfile.pycid

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,16 @@ FROM thrones-base:latest
55

66
WORKDIR /app/plugins/pycid
77

8-
# Install build tools for pygambit compilation
9-
RUN apt-get update && apt-get install -y --no-install-recommends \
10-
g++ \
11-
&& rm -rf /var/lib/apt/lists/*
12-
138
# Install PyCID-specific dependencies
14-
# Note: Install pygambit first, then pycid with --no-deps to avoid version conflicts
15-
# pygambit 16.3.2 is required for pycid 0.8.2 compatibility (older API)
16-
RUN pip install --no-cache-dir pygambit==16.3.2
9+
# pycid 0.7.3 uses nashpy (not pygambit) and has get_all_pure_ne/get_all_pure_spe
10+
# pycid 0.8.x requires pygambit which has API incompatibilities
1711
RUN pip install --no-cache-dir \
1812
pgmpy==0.1.17 \
1913
matplotlib \
2014
networkx \
15+
nashpy \
2116
numpy
22-
RUN pip install --no-cache-dir --no-deps pycid
17+
RUN pip install --no-cache-dir --no-deps pycid==0.7.3
2318

2419
# Copy plugin code
2520
COPY plugins/pycid/pycid_plugin/ ./pycid_plugin/

plugins/pycid/pycid_plugin/nash.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ def run_maid_nash(
2525
try:
2626
macid = maid_game_to_pycid(game)
2727

28-
# get_ne(solver='enumpure') returns list of pure Nash equilibria
29-
ne_list = macid.get_ne(solver='enumpure')
28+
# get_all_pure_ne returns list of pure Nash equilibria (pycid 0.7.3)
29+
ne_list = macid.get_all_pure_ne()
3030

3131
equilibria = format_ne_result(ne_list, game)
3232

plugins/pycid/pycid_plugin/spe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ def run_maid_spe(
3030
try:
3131
macid = maid_game_to_pycid(game)
3232

33-
# get_spe(solver='enumpure') returns list of pure subgame perfect equilibria
34-
spe_list = macid.get_spe(solver='enumpure')
33+
# get_all_pure_spe returns list of pure subgame perfect equilibria (pycid 0.7.3)
34+
spe_list = macid.get_all_pure_spe()
3535

3636
equilibria = format_ne_result(spe_list, game)
3737

0 commit comments

Comments
 (0)