Last active
February 15, 2020 13:00
-
-
Save bruce-willis/6683da339f7a8140f900024d774bddc8 to your computer and use it in GitHub Desktop.
Add pybullet env to gum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# before install pybullet with `pip install pybullet` | |
# source: https://github.com/bulletphysics/bullet3/blob/cbede4eb6c4b9b6d0dddf5b3964a1c7449af05d6/examples/pybullet/gym/pybullet_envs/__init__.py#L188-L191 | |
import gym | |
from gym.envs.registration import registry, make, spec | |
def register(id, *args, **kvargs): | |
if id in registry.env_specs: | |
return | |
else: | |
return gym.envs.registration.register(id, *args, **kvargs) | |
register(id='HalfCheetahBulletEnv-v0', | |
entry_point='pybullet_envs.gym_locomotion_envs:HalfCheetahBulletEnv', | |
max_episode_steps=1000, | |
reward_threshold=3000.0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Or you can install
pybullet-gym
withpip install git+https://github.com/benelot/pybullet-gym
And after: