rlberry.envs.gym_make

rlberry.envs.gym_make(id, wrap_spaces=False, **kwargs)[source]

Same as gym.make, but wraps the environment to ensure unified seeding with rlberry.

Parameters:
idstr

Environment id.

wrap_spacesbool, default = False

If true, also wraps observation_space and action_space using classes in rlberry.spaces, that define a reseed() method.

**kwargskeywords arguments

Additional arguments to pass to the gymnasium environment constructor.

Examples

>>> from rlberry.envs import gym_make
>>> env_ctor = gym_make
>>> env_kwargs = {"id": "CartPole-v1"}
>>> env = env_ctor(**env_kwargs)

Examples using rlberry.envs.gym_make

Compare PPO and A2C on Acrobot with AdaStop

Compare PPO and A2C on Acrobot with AdaStop

A demo of DQN algorithm in CartPole environment

A demo of DQN algorithm in CartPole environment

A demo of M-DQN algorithm in CartPole environment

A demo of M-DQN algorithm in CartPole environment