RobertTLange / gymnax

RL Environments in JAX 🌍
Apache License 2.0
577 stars 54 forks source link

If `Environment.observation_space` requires the `EnvParams`, `Environment.get_obs` should too. #59

Open keraJLi opened 1 year ago

keraJLi commented 1 year ago

If params are designed to influence the observation space, then they should be available when generating an observation. Currently, the two functions in question are implemented like this

def get_obs(self, state: EnvState) -> chex.Array: pass
def observation_space(self, params: EnvParams): pass

I believe that this isn't a fatal issue, but I believe it would be more consistent when considering the overall design of the environment interface.