class_docstr: This is a convenience class for working with environments from OpenAI Gym.
class_docstr_tok: ["This","is","a","convenience","class","for","working","with","environments","from","OpenAI","Gym","."]
docstr: Create an Environment wrapping the OpenAI Gym environment with a specified name.
docstr_tok: ["Create","an","Environment","wrapping","the","OpenAI","Gym","environment","with","a","specified","name","."]
code: def __init__(self, name):
      """Create an Environment wrapping the OpenAI Gym environment with a specified name."""
      import gym
  
      self.env = gym.make(name)
      self.name = name
      space = self.env.action_space
      if "n" in dir(space):
          super(GymEnvironment, self).__init__(
              self.env.observation_space.shape, space.n
          )
      else:
          super(GymEnvironment, self).__init__(
              self.env.observation_space.shape, action_shape=space.shape
          )
  
label_desc: Use image node_id 1 to create a new GymEnvironment object from inherited base classes: Environment with example: obj = GymEnvironment(name)