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
deftest_model_envs(env):
"""Smoke test for each of the ModelBasedEnv methods with type checks. Args: env: The environment to test. Raises: AssertionError if test fails. """state=env.initial_state()
assertenv.pomdp_state_space.contains(state)
action=env.action_space.sample()
new_state=env.transition(state, action)
assertenv.pomdp_state_space.contains(new_state)
reward=env.reward(state, action, new_state)
assertisinstance(reward, float)
done=env.terminal(state, 0)
assertisinstance(done, bool)
obs=env.obs_from_state(state)
assertenv.pomdp_observation_space.contains(obs)
next_obs=env.obs_from_state(new_state)
assertenv.pomdp_observation_space.contains(next_obs)
The text was updated successfully, but these errors were encountered:
Old tests:
The text was updated successfully, but these errors were encountered: