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

Make a copy of current env #1292

Closed
ykun91 opened this issue Jan 18, 2019 · 4 comments
Closed

Make a copy of current env #1292

ykun91 opened this issue Jan 18, 2019 · 4 comments

Comments

@ykun91
Copy link

ykun91 commented Jan 18, 2019

I tried use copy.deepcopy to make a copy of LunarLander-v2 environment , but it does not works. The return value of gym.step with same action are different between original environment and the copied one. Anyone who know the right way to copy the LunarLander-v2 gym[box2d] environment ?

@christopherhesse
Copy link
Contributor

Hmm, why are you trying to make a copy of it?

@ykun91
Copy link
Author

ykun91 commented Feb 9, 2019

Because I am using the Monte Carlo tree search as the search algorithm. In tree search, It is necessary to make a replica of current state for tree expansion.

@christopherhesse
Copy link
Contributor

I'm afraid we don't really support that, and LunarLander is unlikely to work because it uses Box2D which may have its own internal state. Closing as a duplicate of #402

@ykun91
Copy link
Author

ykun91 commented Feb 9, 2019

Thank you for your reply. But I think there must be some way to control its internal state since it have a reset method to reset state. so if the code can "reset with given state", we can simply make a new game and load that state to make a copy.

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