simulate icon indicating copy to clipboard operation
simulate copied to clipboard

Added some basic gym env registration

Open shyamsn97 opened this issue 3 years ago • 5 comments

Thought I'd take a stab at #297

Added some simple registration of sm.Scene objects with sm.RLEnv

scene = sm.Scene() # this could also be loaded in
sm.RLEnv.register("SimulateLunarLander-v0", scene, frame_skip=1)
env = gym.make("SimulateLunarLander-v0")

Right now it just uses the initial scene object, but maybe it should copy it before.

Let me know if this is useful! @natolambert

shyamsn97 avatar Oct 09 '22 02:10 shyamsn97

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

Hi @shyamsn97 ! This is a great start. Sorry for the delay, I'm wrapping my head around if we want to do this in specific examples, have a general API, or just include it in the docs.

Happy to hear any thoughts from the community, and I'll write up my thoughts soon too.

natolambert avatar Oct 14 '22 15:10 natolambert

Hey, thanks for reviewing! Sorry it’s failing, will fix that soon. Also yeah I think having a general api for registering envs makes sense because if a user wanted to write their own registration method it’s not too straightforward (normally I’d pass Scene into the registration kwargs, but it fails because socket can’t be pickled). But I also see how including a small snippet in the docs could work

shyamsn97 avatar Oct 15 '22 02:10 shyamsn97

Yeah I'm happy to have it in multiple places for now. Two that seem most specific are in the rl examples or in the docs under advanced usage. Happy to answer specifics on how to do this.

I'm thinking add a new example so it's easier to find!

natolambert avatar Oct 15 '22 18:10 natolambert

Ah the tests seem to be failing because of gym I can think about this.

natolambert avatar Oct 15 '22 18:10 natolambert