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
It is very nice to see that the gymnasium library is experimenting with pure function environments!
The current signature for the initial(...) method looks like
definitial(self, rng : Any, state : Optional[StateType] =None) ->StateType
Otherwise, we can also add a reset(self, rng, state) method for resetting (not initializing) the environment (I actually prefer this, since this allows us to write pure environment resets that can be JITted)
defreset(self, rng : Any, state : StateType) ->StateType
Motivation
I'm currently writing a gymnasium environment with Mujoco / MJX backends and are trying to use the new FuncEnv experimental API.
However in a lot of mujoco / MJX environments it is very computationally expensive to generate mjData or mjx.mjData from an mjModel => We can just simply reset some qpos to reset the environment. So this modification allows that to happen.
Proposal
Hello Gymnasium Contributors,
It is very nice to see that the gymnasium library is experimenting with pure function environments!
The current signature for the
initial(...)
method looks likeI propose to change this to
Otherwise, we can also add a
reset(self, rng, state)
method for resetting (not initializing) the environment (I actually prefer this, since this allows us to write pure environment resets that can be JITted)Motivation
I'm currently writing a gymnasium environment with Mujoco / MJX backends and are trying to use the new
FuncEnv
experimental API.However in a lot of mujoco / MJX environments it is very computationally expensive to generate
mjData
ormjx.mjData
from anmjModel
=> We can just simply reset some qpos to reset the environment. So this modification allows that to happen.Pitch
No response
Alternatives
No response
Additional context
Related: #833
Checklist
The text was updated successfully, but these errors were encountered: