indylab / tabular_xdo

MIT License
9 stars 1 forks source link

Unknown game 'leduc_poker_dummy' #2

Closed xiaohangt closed 3 years ago

xiaohangt commented 3 years ago

Hi! Thanks for sharing and I am working on xdo recently. When I tried to start an algorithm on leduc_poker_dummy, it reported that "pyspiel.SpielError: Unknown game 'leduc_poker_dummy'" and showed me the available games list. Would you mind give me some suggestion on this error? Thanks a lot!

JBLanier commented 3 years ago

Hey @txhtxhtxh! Thanks for finding this. Looks like leduc_poker_dummy mistakenly got left out of a CMakeLists.txt in our OpenSpiel fork.

I've updated the OpenSpiel submodule to the latest commit containing the fix.

You should be able to pull the changes with

# in tabular_xdo repo root
git pull
git submodule update

Then compile/recompile openspiel (with the updated CMakeLists.txt) using

cd dependencies/open_spiel
export BUILD_WITH_ACPC=ON # to compile with the optional universal poker game variant
./install.sh
pip install -e . # This will start a compilation process. Will take a few minutes.

Let me know if there's anything else I can help with!

xiaohangt commented 3 years ago

Thanks for your reply! But after doing those commands, I met a new error. And this time algorithms cannot start even in leduc and kuhn. The error is:

Traceback (most recent call last):
  File "main_experiments.py", line 11, in <module>
    import pyspiel
ImportError: /home/txh/tabular_xdo/dependencies/open_spiel/pyspiel.so: undefined symbol: PyThread_tss_set
JBLanier commented 3 years ago

Hi, that's similar to this issue in the main OpenSpiel repo: https://github.com/deepmind/open_spiel/issues/90

I've dealt with that error before, and it seems to do with OpenSpiel not compiling against the exact python version in your conda env.

When running the openspiel compilation & install, check that your conda env is active.

If that doesn't work, an alternative way to compile/recompile openspiel while directly pointing it to the right python binary is in the "Advanced Installation Notes" in the README These cmake arguments tell it to compile against python 3.6 and to look for this copy of python first in the currently active virtual env:

-DPython_TARGET_VERSION=3.6 -DPython3_FIND_VIRTUALENV=FIRST -DPython3_FIND_STRATEGY=LOCATION
xiaohangt commented 3 years ago

Hi John, problem is solved by re-doing compilation and install with conda env active. Thank you so much!