MultiAgentLearning / playground

PlayGround: AI Research into Multi-Agent Learning.
https://www.pommerman.com
Apache License 2.0
768 stars 216 forks source link

playground with missing attribute #200

Closed CreamyLong closed 5 years ago

CreamyLong commented 5 years ago

AttributeError: module 'gym.spaces' has no attribute 'prng‘

weseldridge commented 5 years ago

Did this happen when you were trying to install the project dependencies or when trying to run a battle? Anything to give more context, so we can try to reproduce the problem or help you more.

CreamyLong commented 5 years ago

thanks for the reply. This happens when I try to use the Playground.ipynb in the notebook

cinjon commented 5 years ago

Can you check your version of gym? Are you using our requirements.txt to install everything?

CreamyLong commented 5 years ago

absl-py 0.6.1 alabaster 0.7.12 asn1crypto 0.24.0 astor 0.7.1 astroid 2.1.0 atomicwrites 1.3.0 attrs 18.2.0 Babel 2.6.0 backcall 0.1.0 bleach 3.0.2 certifi 2018.11.29 cffi 1.11.5 chardet 3.0.4 Click 7.0 cloudpickle 0.7.0 colorama 0.4.1 commonmark 0.8.1 cryptography 2.5 cycler 0.10.0 dask 1.1.1 decorator 4.3.0 docker 3.7.0 docker-pycreds 0.4.0 docutils 0.14 entrypoints 0.2.3 Flask 0.12.4 future 0.17.1 gast 0.2.0 grpcio 1.16.0 gym 0.12.0 idna 2.8 imageio 2.5.0 imageio-ffmpeg 0.2.0 imagesize 1.1.0 ipykernel 5.1.0 ipython 7.2.0 ipython-genutils 0.2.0 ipywidgets 7.4.2 isort 4.3.4 itsdangerous 1.1.0 jedi 0.13.2 Jinja2 2.10 jsonmerge 1.5.2 jsonschema 2.6.0 jupyter 1.0.0 jupyter-client 5.2.4 jupyter-console 6.0.0 jupyter-core 4.4.0 keyring 17.1.1 kiwisolver 1.0.1 lazy-object-proxy 1.3.1 Markdown 2.6.11 MarkupSafe 1.1.0 matplotlib 3.0.2 mccabe 0.6.1 mistune 0.8.4 mkl-fft 1.0.0 mkl-random 1.0.1 more-itertools 6.0.0 moviepy 1.0.0 nbconvert 5.3.1 nbformat 4.4.0 networkx 2.2 notebook 5.7.4 numpy 1.14.2 numpydoc 0.8.0 packaging 19.0 pandas 0.24.1 pandocfilters 1.4.2 parso 0.3.1 pickleshare 0.7.5 Pillow 5.4.1 pip 18.1 pluggy 0.8.1 proglog 0.1.9 prometheus-client 0.5.0 prompt-toolkit 2.0.7 protobuf 3.6.0 psutil 5.5.0 py 1.7.0 pycodestyle 2.5.0 pycparser 2.19 pyflakes 2.1.0 pyglet 1.3.2 Pygments 2.3.1 pylint 2.2.2 pyOpenSSL 19.0.0 pyparsing 2.3.1 pypiwin32 223 pyrsistent 0.14.8 PySocks 1.6.8 pytest 4.3.0 python-cli-ui 0.7.4 python-dateutil 2.7.5 python-rapidjson 0.6.3 pytz 2018.9 PyWavelets 1.0.1 pywin32 224 pywin32-ctypes 0.2.0 pywinpty 0.5.5 pyzmq 17.1.2 QtAwesome 0.5.6 qtconsole 4.4.3 QtPy 1.6.0 rapidjson 1.0.0 recommonmark 0.3.0 requests 2.21.0 rope 0.10.7 ruamel.yaml 0.15.88 scikit-image 0.14.2 scikit-learn 0.20.2 scipy 1.2.0 Send2Trash 1.5.0 setuptools 40.6.3 six 1.12.0 sklearn 0.0 snowballstemmer 1.2.1 Sphinx 1.8.4 sphinxcontrib-websupport 1.1.0 spyder 3.3.2 spyder-kernels 0.4.1 tabulate 0.8.3 tensorboard 1.12.0 tensorflow 1.8.0 tensorforce 0.4.3 termcolor 1.1.0 terminado 0.8.1 testpath 0.4.2 toolz 0.9.0 tornado 5.1.1 tqdm 4.31.1 traitlets 4.3.2 typed-ast 1.3.0 Unidecode 1.0.23 urllib3 1.24.1 utils 0.9.0 wcwidth 0.1.7 webencodings 0.5.1 websocket-client 0.53.0 websockets 6.0 Werkzeug 0.14.1 wheel 0.32.3 widgetsnbextension 3.4.2 win-inet-pton 1.0.1 wincertstore 0.2 wrapt 1.11.1

AttributeError Traceback (most recent call last)

in 1 # Seed and reset the environment ----> 2 env.seed(0) 3 obs = env.reset() 4 5 # Run the random agents until we're done ~\playground\pommerman\envs\v0.py in seed(self, seed) 180 181 def seed(self, seed=None): --> 182 gym.spaces.prng.seed(seed) 183 self.np_random, seed = seeding.np_random(seed) 184 return [seed] AttributeError: module 'gym.spaces' has no attribute 'prng'
jault commented 5 years ago

OpenAI gym removed prng on Jan 30th. I'm also on 0.12.0 and encountered this error when attempting to use env.seed()

https://github.com/openai/gym/commit/6497c9f1c6e43066c8945f02ed3ed4d234f45dc1#diff-b6bcac3b96f9b9aa1c6be76eaa754d20

cinjon commented 5 years ago

I think we can just get rid of this then as they are relying on gym.utils's seeding. Adjusted in 95c728b.