Gymnasium Built-in Environments
Use this sub-skill when a task involves selecting or using Gymnasium's built-in environment families, deciding which optional extra is needed, inspecting registered environment IDs, handling Toy Text action masks, or diagnosing backend/render/plugin failures.
Start Here
- Choose the smallest environment family and optional extra that matches the task; avoid
gymnasium[all]unless a disposable environment explicitly needs every backend. Seereferences/optional-dependencies.md. - Inspect availability before installing anything: use
gym.spec("CartPole-v1"),gym.registry, orgym.pprint_registry(); seereferences/builtin-environments.md. - Use versioned IDs exactly, including namespaces such as
phys2d/CartPole-v1or plugin namespaces such asALE/...; do not guess unversioned names. - For Taxi action masks and render mode choices, use
references/action-masking-and-rendering.mdand the bundledscripts/action_mask_smoke.py. - For missing
pygame, Box2D, MuJoCo, ALE/ROMs,shimmy, or media dependencies, usereferences/troubleshooting.mdbefore broad installs.
Route by Task
| Task | Read |
| --- | --- |
| Pick a built-in family or verify an env ID | references/builtin-environments.md |
| Decide the minimal package extra | references/optional-dependencies.md |
| Use Taxi action masks or render modes | references/action-masking-and-rendering.md |
| Diagnose backend, plugin, ROM, ID, or compatibility errors | references/troubleshooting.md |