multiagent-particle-envs icon indicating copy to clipboard operation
multiagent-particle-envs copied to clipboard

Fix: ImportError: cannot import name 'prng'

Open zhaolongkzz opened this issue 5 years ago • 6 comments

https://github.com/openai/multiagent-particle-envs/issues/53

Change a random function to the new gym, and delete prng function.

zhaolongkzz avatar Sep 26 '19 03:09 zhaolongkzz

@zhaolongkzz why has this PR not been merged yet? I encountered the same problem. Are there any other changes that need to be made?

veds12 avatar Jul 09 '20 05:07 veds12

@veds12 you can install gym==0.10.5 or modify code like: in code multiagent-particle-envs/multiagent/multi_discrete.py

import gym
# from gym.spaces import prng             # prng has been canceled

# and change:
random_array = np.random.RandomState().rand(self.num_discrete_space)

zhaolongkzz avatar Jul 09 '20 07:07 zhaolongkzz

Ya I figured that out from one of the issues. But why not merge this?

veds12 avatar Jul 09 '20 07:07 veds12

@veds12 maybe nobody updates this repository

zhaolongkzz avatar Jul 09 '20 07:07 zhaolongkzz

This helps.

YanjieZe avatar Oct 28 '21 03:10 YanjieZe

good job

Weixw99 avatar Nov 16 '22 12:11 Weixw99