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.*