'List all environment id in openai gym

How to list all currently registered environment IDs (as they are used for creating environments) in openai gym?

A bit context: there are many plugins installed which have customary ids such as atari, super mario, doom etc.

Not to be confused with game names for atari-py.



Solution 1:[1]

You can use this code for listing all environments in gym:

import gym
for i in gym.envs.registry.all():
  print(i.id)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Tefna Mintamol