class_docstr: The main OpenAI Gym class.
  
  It encapsulates an environment with arbitrary behind-the-scenes dynamics.
  An environment can be partially or fully observed.
  
  The main API methods that users of this class need to know are:
  
  - :meth:`step` - Takes a step in the environment using an action returning the next observation, reward,
    if the environment terminated and observation information.
  - :meth:`reset` - Resets the environment to an initial state, returning the initial observation and observation information.
  - :meth:`render` - Renders the environment observation with modes depending on the output
  - :meth:`close` - Closes the environment, important for rendering where pygame is imported
  
  And set the following attributes:
  
  - :attr:`action_space` - The Space object corresponding to valid actions
  - :attr:`observation_space` - The Space object corresponding to valid observations
  - :attr:`reward_range` - A tuple corresponding to the minimum and maximum possible rewards
  - :attr:`spec` - An environment spec that contains the information used to initialise the environment from `gym.make`
  - :attr:`metadata` - The metadata of the environment, i.e. render modes
  - :attr:`np_random` - The random number generator for the environment
  
  Note: a default reward range set to :math:`(-\infty,+\infty)` already exists. Set it if you want a narrower range.
class_docstr_tok: ["The","main","OpenAI","Gym","class",".","It","encapsulates","an","environment","with","arbitrary","behind-the-scenes","dynamics",".","An","environment","can","be","partially","or","fully","observed",".","The","main","API","methods","that","users","of","this","class","need","to","know","are",":","-",":","meth",":","`","step","`","-","Takes","a","step","in","the","environment","using","an","action","returning","the","next","observation",",","reward",",","if","the","environment","terminated","and","observation","information",".","-",":","meth",":","`","reset","`","-","Resets","the","environment","to","an","initial","state",",","returning","the","initial","observation","and","observation","information",".","-",":","meth",":","`","render","`","-","Renders","the","environment","observation","with","modes","depending","on","the","output","-",":","meth",":","`","close","`","-","Closes","the","environment",",","important","for","rendering","where","pygame","is","imported","And","set","the","following","attributes",":","-",":","attr",":","`","action_space","`","-","The","Space","object","corresponding","to","valid","actions","-",":","attr",":","`","observation_space","`","-","The","Space","object","corresponding","to","valid","observations","-",":","attr",":","`","reward_range","`","-","A","tuple","corresponding","to","the","minimum","and","maximum","possible","rewards","-",":","attr",":","`","spec","`","-","An","environment","spec","that","contains","the","information","used","to","initialise","the","environment","from","`","gym.make","`","-",":","attr",":","`","metadata","`","-","The","metadata","of","the","environment",",","i.e",".","render","modes","-",":","attr",":","`","np_random","`","-","The","random","number","generator","for","the","environment","Note",":","a","default","reward","range","set","to",":","math",":","`","(","-\\infty",",","+\\infty",")","`","already","exists",".","Set","it","if","you","want","a","narrower","range","."]
docstr: Resets the environment to an initial state and returns the initial observation.
  
  This method can reset the environment's random number generator(s) if ``seed`` is an integer or
  if the environment has not yet initialized a random number generator.
  If the environment already has a random number generator and :meth:`reset` is called with ``seed=None``,
  the RNG should not be reset. Moreover, :meth:`reset` should (in the typical use case) be called with an
  integer seed right after initialization and then never again.
  
  Args:
      seed (optional int): The seed that is used to initialize the environment's PRNG.
          If the environment does not already have a PRNG and ``seed=None`` (the default option) is passed,
          a seed will be chosen from some source of entropy (e.g. timestamp or /dev/urandom).
          However, if the environment already has a PRNG and ``seed=None`` is passed, the PRNG will *not* be reset.
          If you pass an integer, the PRNG will be reset even if it already exists.
          Usually, you want to pass an integer *right after the environment has been initialized and then never again*.
          Please refer to the minimal example above to see this paradigm in action.
      options (optional dict): Additional information to specify how the environment is reset (optional,
          depending on the specific environment)
  
  
  Returns:
      observation (object): Observation of the initial state. This will be an element of :attr:`observation_space`
          (typically a numpy array) and is analogous to the observation returned by :meth:`step`.
      info (dictionary):  This dictionary contains auxiliary information complementing ``observation``. It should be analogous to
          the ``info`` returned by :meth:`step`.
docstr_tok: ["Resets","the","environment","to","an","initial","state","and","returns","the","initial","observation",".","This","method","can","reset","the","environment","'s","random","number","generator","(","s",")","if","``","seed","``","is","an","integer","or","if","the","environment","has","not","yet","initialized","a","random","number","generator",".","If","the","environment","already","has","a","random","number","generator","and",":","meth",":","`","reset","`","is","called","with","``","seed=None","``",",","the","RNG","should","not","be","reset",".","Moreover",",",":","meth",":","`","reset","`","should","(","in","the","typical","use","case",")","be","called","with","an","integer","seed","right","after","initialization","and","then","never","again",".","Args",":","seed","(","optional","int",")",":","The","seed","that","is","used","to","initialize","the","environment","'s","PRNG",".","If","the","environment","does","not","already","have","a","PRNG","and","``","seed=None","``","(","the","default","option",")","is","passed",",","a","seed","will","be","chosen","from","some","source","of","entropy","(","e.g",".","timestamp","or","\/dev\/urandom",")",".","However",",","if","the","environment","already","has","a","PRNG","and","``","seed=None","``","is","passed",",","the","PRNG","will","*","not","*","be","reset",".","If","you","pass","an","integer",",","the","PRNG","will","be","reset","even","if","it","already","exists",".","Usually",",","you","want","to","pass","an","integer","*","right","after","the","environment","has","been","initialized","and","then","never","again","*",".","Please","refer","to","the","minimal","example","above","to","see","this","paradigm","in","action",".","options","(","optional","dict",")",":","Additional","information","to","specify","how","the","environment","is","reset","(","optional",",","depending","on","the","specific","environment",")","Returns",":","observation","(","object",")",":","Observation","of","the","initial","state",".","This","will","be","an","element","of",":","attr",":","`","observation_space","`","(","typically","a","numpy","array",")","and","is","analogous","to","the","observation","returned","by",":","meth",":","`","step","`",".","info","(","dictionary",")",":","This","dictionary","contains","auxiliary","information","complementing","``","observation","``",".","It","should","be","analogous","to","the","``","info","``","returned","by",":","meth",":","`","step","`","."]
code: def reset(
      self,
      *,
      seed: Optional[int] = None,
      options: Optional[dict] = None,
  ) -> Tuple[ObsType, dict]:
      """Resets the environment to an initial state and returns the initial observation.
  
      This method can reset the environment's random number generator(s) if ``seed`` is an integer or
      if the environment has not yet initialized a random number generator.
      If the environment already has a random number generator and :meth:`reset` is called with ``seed=None``,
      the RNG should not be reset. Moreover, :meth:`reset` should (in the typical use case) be called with an
      integer seed right after initialization and then never again.
  
      Args:
          seed (optional int): The seed that is used to initialize the environment's PRNG.
              If the environment does not already have a PRNG and ``seed=None`` (the default option) is passed,
              a seed will be chosen from some source of entropy (e.g. timestamp or /dev/urandom).
              However, if the environment already has a PRNG and ``seed=None`` is passed, the PRNG will *not* be reset.
              If you pass an integer, the PRNG will be reset even if it already exists.
              Usually, you want to pass an integer *right after the environment has been initialized and then never again*.
              Please refer to the minimal example above to see this paradigm in action.
          options (optional dict): Additional information to specify how the environment is reset (optional,
              depending on the specific environment)
  
  
      Returns:
          observation (object): Observation of the initial state. This will be an element of :attr:`observation_space`
              (typically a numpy array) and is analogous to the observation returned by :meth:`step`.
          info (dictionary):  This dictionary contains auxiliary information complementing ``observation``. It should be analogous to
              the ``info`` returned by :meth:`step`.
      """
      # Initialize the RNG if the seed is manually passed
      if seed is not None:
          self._np_random, seed = seeding.np_random(seed)
  
imports: import sys
  from typing import TYPE_CHECKING, Any, Dict, Generic, List, Optional, SupportsFloat, Tuple, TypeVar, Union
  import numpy
  from gym import spaces
  from gym.logger import warn
  from gym.utils import seeding
label_desc: Use image node_id 4 for calling the Env obj's underlying member method code with example usage: obj.reset() without return types