Brax¶
Import this adapter from its module, gymnax.wrappers.brax. It requires brax.
GymnaxToBraxWrapper ¶
Bases: Env
Wrap a Gymnax environment as a Brax environment.
Observation, reward and done flag become part of the Brax State, and the PRNG
key and environment parameters are carried in state.info. Compatible with all
Brax wrappers; AutoResetWrapper is redundant because Gymnax environments
already reset automatically. Importing this module requires brax.
Parameters:
-
env(Environment) –Gymnax environment to wrap.
observation_size
property
¶
Observation dimensions under the default parameters, as in Brax.
reset ¶
Reset the environment and return a Brax State.
The key and parameters are stored in state.info for use by step.
step ¶
Advance a Brax State by one step.
Uses the key stored in state.info. If params is given it replaces the
stored parameters.