Registration API
Importing gym_classics2 automatically registers all bundled environments with
Gymnasium. Existing register() calls are harmless; repeated calls for the same
backend do nothing. Use register(backend="gym") to additionally register with
legacy Gym when it is installed.
gym_classics2.register
Register all bundled environments with Gymnasium or legacy Gym.
Importing gym_classics2 automatically registers with Gymnasium.
Explicit calls remain supported; repeated calls for a backend do nothing.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
backend
|
Registry to use. |
'gymnasium'
|
Raises:
| Type | Description |
|---|---|
AssertionError
|
If backend is neither |
Example
import gymnasium as gym import gym_classics2 env = gym.make("ClassicGridworld-v1")