Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore the MuJoCo env #991

Closed
williamd4112 opened this issue Apr 12, 2018 · 1 comment
Closed

Restore the MuJoCo env #991

williamd4112 opened this issue Apr 12, 2018 · 1 comment

Comments

@williamd4112
Copy link

williamd4112 commented Apr 12, 2018

In my case, I need to replicate the MuJoCo environment (for imitation learning). But, I find that the unpickled environment is not the same as the original environment. First, I pickled the environment which is used for expert's demonstration. Then I unpickled the environment for the learner and find that the initial observation of them are not the same.
I use the code below for testing.

env = gym.make('Reacher-v2')
with open('env.pkl', 'wb') as f:
    env = pickle.dump(env, f)
with open('env.pkl', 'rb') as f:
    load_env = pickle.load(f)
a = env.unwrapped._get_obs()
b = load_env.unwrapped._get_obs()
print(a-b)

Result:

[-5.93206753e-05 -2.84166611e-03 -1.08920995e-02  7.53343027e-02
 -2.19749669e-01  2.24585896e-02  2.24545317e-03  5.33221514e-04
  2.19514907e-01 -1.64562441e-02  0.00000000e+00]
@christopherhesse
Copy link
Contributor

Looks like a duplicate of #402

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants