udacity / deep-reinforcement-learning

Repo for the Deep Reinforcement Learning Nanodegree program
https://www.udacity.com/course/deep-reinforcement-learning-nanodegree--nd893
MIT License
4.85k stars 2.34k forks source link

In the bipedal walker, errors occur #3

Closed BerrySG closed 2 years ago

BerrySG commented 6 years ago

File "c:\windows\system32\gym\gym\envs\box2d\bipedal_walker.py", line 383, in step self.joints[0].motorSpeed = float(SPEED_HIP * np.sign(action[0])) TypeError: only size-1 arrays can be converted to Python scalars

crobarcro commented 6 years ago

I see the same error on Ubuntu 16.04. Somehow action becomes an array of arrays, so action[0] is actually an array of length 4.

BerrySG commented 6 years ago

@crobarcro I`ve solved the problem by reinstall the full version of OpenAI-GYM, it seems that some components are missing then lead to this problem

crobarcro commented 6 years ago

Thanks, did you do this using pip, or from the gym source package?

BerrySG commented 6 years ago

@crobarcro I download the whole source package then install

pstansell commented 6 years ago

@BerrySG, did you manage to run the notebook and get a policy that actually solves the walker problem? I tried the fix of changing action to action[0], which allowed the notebook to run, but it didn't produce useful policies (the walking just stumbles and falls over). The graph of the score in the online notebook also suggests that the policies are not converging to a good solution like that displayed in the video in https://github.com/udacity/deep-reinforcement-learning/blob/master/ddpg-bipedal/README.md