You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm training my mujoco agent with gym == 0.9.5, mujoco-py == 0.5.7, mjpro131 and on Windows 7. Currently, I'm good with the original API.
My question is, how to reset the environment to a specific state ? I want this function to do some analysis work.
I see that the original API in (for example) 'half_cheetah.py', the original reset_model() function does not take any params and reset the env to a random initialized state.
Is there any built-in function to do this, or I have to overwrite the original API with a new reset_model(some_state) function? If so, please tell me which upstream files of 'half_cheetah.py' to modify?
Thanks in advance !
The text was updated successfully, but these errors were encountered:
bluecontra
changed the title
Reset the environment to a specific state.
Reset the environment to a specific state in Mujoco tasks.
Jul 23, 2019
As you've noticed this is not a feature of the current API, it looks like you'll have to make your own environment (possibly starting with a copy-and-pasted version of half_cheetah or wrapper) that allows passing in the desired state.
As far as I know there is no built-in way to do this, but there is an existing issue about saving and restoring environment state here: #402
Reset doesn't offer you this option, however the source code for mujoco_env.py shows there is a set_state( ) function you can use after you've performed the reset.
Keep in mind that set_state( ) expects the full input size, including the input related to the x position for the center of mass (which is normally hidden under default parameters).
Hello, I'm training my mujoco agent with gym == 0.9.5, mujoco-py == 0.5.7, mjpro131 and on Windows 7. Currently, I'm good with the original API.
My question is, how to reset the environment to a specific state ? I want this function to do some analysis work.
I see that the original API in (for example) 'half_cheetah.py', the original reset_model() function does not take any params and reset the env to a random initialized state.
![图片](https://user-images.githubusercontent.com/17591106/61698248-53c47280-ad6b-11e9-9f19-b9b4a24df42e.png)
Is there any built-in function to do this, or I have to overwrite the original API with a new reset_model(some_state) function? If so, please tell me which upstream files of 'half_cheetah.py' to modify?
Thanks in advance !
The text was updated successfully, but these errors were encountered: