sail-sg / envpool

C++-based high-performance parallel environment execution engine (vectorized env) for general RL environments.
https://envpool.readthedocs.io
Apache License 2.0
1.1k stars 100 forks source link

[Feature Request] Do this project support like gym.vector.asyncvecenv? #309

Open wsty1234 opened 4 months ago

wsty1234 commented 4 months ago

Motivation

Please outline the motivation for the proposal. Is your feature request related to a problem? e.g., "I'm always frustrated when [...]". If this is related to another issue, please link here too.

Solution

A clear and concise description of what you want to happen.

Alternatives

A clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context or screenshots about the feature request here.

Checklist

wsty1234 commented 4 months ago

sorry, first time use this function.

My problem is that my custom env need to pass a unique parameter to init the env. like an Id. with gym.ayncvectorenv i can use the lambda function to generate this kind of vec envs. But How can i do this with envpool?

Trinkle23897 commented 4 months ago

what's your customized env? is it already in envpool implementation?

wsty1234 commented 4 months ago

what's your customized env? is it already in envpool implementation?

Thank you for your reply.

My env is just like pendulum v0.

env = gym.vector.AsyncVectorEnv([ lambda: gym.make("Pendulum-v0", g=9.81), lambda: gym.make("Pendulum-v0", g=1.62) ])

I'd like to pass different g to each new environment. If there is a way to do this in envpool, please let me know!

Thank you so much.