src.plangym.control.lunar_lander
================================

.. py:module:: src.plangym.control.lunar_lander

.. autoapi-nested-parse::

   Implementation of LunarLander with no fire coming out of the engines that steps faster.



Attributes
----------

.. autoapisummary::

   src.plangym.control.lunar_lander.import_error
   src.plangym.control.lunar_lander.FPS
   src.plangym.control.lunar_lander.SCALE
   src.plangym.control.lunar_lander.MAIN_ENGINE_POWER
   src.plangym.control.lunar_lander.SIDE_ENGINE_POWER
   src.plangym.control.lunar_lander.INITIAL_RANDOM
   src.plangym.control.lunar_lander.LANDER_POLY
   src.plangym.control.lunar_lander.LEG_AWAY
   src.plangym.control.lunar_lander.LEG_DOWN
   src.plangym.control.lunar_lander.LEG_SPRING_TORQUE
   src.plangym.control.lunar_lander.SIDE_ENGINE_HEIGHT
   src.plangym.control.lunar_lander.SIDE_ENGINE_AWAY
   src.plangym.control.lunar_lander.VIEWPORT_W
   src.plangym.control.lunar_lander.VIEWPORT_H


Classes
-------

.. autoapisummary::

   src.plangym.control.lunar_lander.FastGymLunarLander
   src.plangym.control.lunar_lander.LunarLander


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

.. py:data:: import_error
   :value: None


.. py:data:: FPS
   :value: 50


.. py:data:: SCALE
   :value: 30.0


.. py:data:: MAIN_ENGINE_POWER
   :value: 13.0


.. py:data:: SIDE_ENGINE_POWER
   :value: 0.6


.. py:data:: INITIAL_RANDOM
   :value: 1000.0


.. py:data:: LANDER_POLY

.. py:data:: LEG_AWAY
   :value: 20


.. py:data:: LEG_DOWN
   :value: 18


.. py:data:: LEG_SPRING_TORQUE
   :value: 40


.. py:data:: SIDE_ENGINE_HEIGHT
   :value: 14.0


.. py:data:: SIDE_ENGINE_AWAY
   :value: 12.0


.. py:data:: VIEWPORT_W
   :value: 600


.. py:data:: VIEWPORT_H
   :value: 400


.. py:class:: FastGymLunarLander(deterministic = False, continuous = False)

   Bases: :py:obj:`gymnasium.envs.box2d.lunar_lander.LunarLander`


   Faster implementation of the LunarLander without bells and whistles.


   .. py:attribute:: FPS


   .. py:attribute:: deterministic


   .. py:attribute:: game_over
      :value: False



   .. py:attribute:: prev_shaping
      :value: None



   .. py:attribute:: helipad_x1
      :value: None



   .. py:attribute:: helipad_x2
      :value: None



   .. py:attribute:: helipad_y
      :value: None



   .. py:attribute:: moon
      :value: None



   .. py:attribute:: sky_polys
      :value: None



   .. py:attribute:: lander
      :value: None



   .. py:attribute:: legs
      :value: None



   .. py:attribute:: drawlist
      :value: None



   .. py:attribute:: viewer
      :value: None



   .. py:attribute:: particles
      :value: None



   .. py:attribute:: prev_reward
      :value: None



   .. py:attribute:: observation_space
      :value: None



   .. py:attribute:: action_space
      :value: None



   .. py:attribute:: continuous


   .. py:attribute:: _display
      :value: None



   .. py:method:: __del__()

      Close the environment.



   .. py:method:: reset()

      Reset the environment to its initial state.



   .. py:method:: step(action)

      Step the environment applying the provided action.



   .. py:method:: render(mode=None)

      Render the environment.



.. py:class:: LunarLander(name = None, frameskip = 1, episodic_life = True, autoreset = True, wrappers = None, delay_setup = False, deterministic = False, continuous = False, render_mode = 'rgb_array', remove_time_limit=None, **kwargs)

   Bases: :py:obj:`plangym.core.PlangymEnv`


   Fast LunarLander that follows the plangym API.


   .. py:attribute:: _deterministic


   .. py:attribute:: _continuous


   .. py:property:: deterministic
      :type: bool

      Return true if the LunarLander simulation is deterministic.


   .. py:property:: continuous
      :type: bool

      Return true if the LunarLander agent takes continuous actions as input.


   .. py:method:: init_gym_env()

      Initialize the target :class:`gym.Env` instance.



   .. py:method:: get_state()

      Recover the internal state of the simulation.

      An state must completely describe the Environment at a given moment.



   .. py:method:: set_state(state)

      Set the internal state of the simulation.

      :param state: Target state to be set in the environment.

      :returns: None



   .. py:method:: get_image()

      Return a numpy array containing the rendered view of the environment.

      Square matrices are interpreted as a greyscale image. Three-dimensional arrays
      are interpreted as RGB images with channels (Height, Width, RGB).



   .. py:method:: process_terminal(terminal, obs=None, **kwargs)

      Return the terminal condition considering the lunar lander state.



