openai / maddpg

Code for the MADDPG algorithm from the paper "Multi-Agent Actor-Critic for Mixed Cooperative-Competitive Environments"
https://arxiv.org/pdf/1706.02275.pdf
MIT License
1.59k stars 484 forks source link

ImportError: cannot import name 'prng' when run train.py #50

Closed silkyrose closed 3 years ago

silkyrose commented 3 years ago

When I run train.py I got an import error:

python train.py --scenario simple Traceback (most recent call last): File "train.py", line 8, in from maddpg.trainer.maddpg import MADDPGAgentTrainer File "e:\dpl\ma\maddpg-master\maddpg-master\maddpg\trainer\maddpg.py", line 6, in from maddpg.common.distributions import make_pdtype File "e:\dpl\ma\maddpg-master\maddpg-master\maddpg\common\distributions.py", l ine 5, in from multiagent.multi_discrete import MultiDiscrete File "e:\dpl\ma\multiagent-particle-envs-master\multiagent-particle-envs-maste r\multiagent\multi_discrete.py", line 7, in from gym.spaces import prng ImportError: cannot import name 'prng'

How to address it? Thanks.

nuts-bottles commented 3 years ago

My solution is find the file in the history record of this github, then put the file in the corresponding directory. It works.

silkyrose commented 3 years ago

Thanks a lot!