src.plangym.videogames.env
==========================

.. py:module:: src.plangym.videogames.env

.. autoapi-nested-parse::

   Plangym API implementation.



Attributes
----------

.. autoapisummary::

   src.plangym.videogames.env.LIFE_KEY


Classes
-------

.. autoapisummary::

   src.plangym.videogames.env.VideogameEnv


Module Contents
---------------

.. py:data:: LIFE_KEY
   :value: 'lifes'


.. py:class:: VideogameEnv(name, frameskip = 5, episodic_life = False, autoreset = True, delay_setup = False, remove_time_limit = True, obs_type = 'rgb', render_mode = None, wrappers = None, **kwargs)

   Bases: :py:obj:`plangym.core.PlangymEnv`, :py:obj:`abc.ABC`


   Common interface for working with video games that run using an emulator.


   .. py:attribute:: AVAILABLE_OBS_TYPES


   .. py:attribute:: DEFAULT_OBS_TYPE
      :value: 'rgb'



   .. py:attribute:: episodic_life


   .. py:attribute:: _info_step


   .. py:property:: n_actions
      :type: int

      Return the number of actions available.


   .. py:method:: get_lifes_from_info(info)
      :staticmethod:


      Return the number of lifes remaining in the current game.



   .. py:method:: apply_action(action)

      Evolve the environment for one time step applying the provided action.



   .. py:method:: clone(**kwargs)

      Return a copy of the environment.



   .. py:method:: begin_step(action=None, dt=None, state=None, return_state = None)

      Perform setup of step variables before starting `step_with_dt`.



   .. py:method:: init_spaces()

      Initialize the action_space and the observation_space of the environment.



   .. py:method:: process_obs(obs, **kwargs)

      Return the ram vector if obs_type == "ram" or and image otherwise.



   .. py:method:: get_ram()
      :abstractmethod:


      Return the ram of the emulator as a numpy array.



