plangym.control.lunar_lander

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

Module Contents

Classes

FastGymLunarLander

Faster implementation of the LunarLander without bells and whistles.

LunarLander

Fast LunarLander that follows the plangym API.

Attributes

import_error

FPS

SCALE

MAIN_ENGINE_POWER

SIDE_ENGINE_POWER

INITIAL_RANDOM

LANDER_POLY

LEG_AWAY

LEG_DOWN

LEG_SPRING_TORQUE

SIDE_ENGINE_HEIGHT

SIDE_ENGINE_AWAY

VIEWPORT_W

VIEWPORT_H

plangym.control.lunar_lander.import_error
plangym.control.lunar_lander.FPS = 50
plangym.control.lunar_lander.SCALE = 30.0
plangym.control.lunar_lander.MAIN_ENGINE_POWER = 13.0
plangym.control.lunar_lander.SIDE_ENGINE_POWER = 0.6
plangym.control.lunar_lander.INITIAL_RANDOM = 1000.0
plangym.control.lunar_lander.LANDER_POLY = [None, None, None, None, None, None]
plangym.control.lunar_lander.LEG_AWAY = 20
plangym.control.lunar_lander.LEG_DOWN = 18
plangym.control.lunar_lander.LEG_SPRING_TORQUE = 40
plangym.control.lunar_lander.SIDE_ENGINE_HEIGHT = 14.0
plangym.control.lunar_lander.SIDE_ENGINE_AWAY = 12.0
plangym.control.lunar_lander.VIEWPORT_W = 600
plangym.control.lunar_lander.VIEWPORT_H = 400
class plangym.control.lunar_lander.FastGymLunarLander(deterministic=False, continuous=False)[source]

Bases: gym.envs.box2d.lunar_lander.LunarLander

Faster implementation of the LunarLander without bells and whistles.

Parameters
  • deterministic (bool) –

  • continuous (bool) –

FPS
reset(self)[source]

Reset the environment to its initial state.

Return type

tuple

step(self, action)[source]

Step the environment applying the provided action.

Parameters

action (int) –

Return type

tuple

render(self, mode='human')[source]

Render the environment.

class plangym.control.lunar_lander.LunarLander(name=None, frameskip=1, episodic_life=True, autoreset=True, wrappers=None, delay_setup=False, deterministic=False, continuous=False, render_mode=None, remove_time_limit=None, **kwargs)[source]

Bases: plangym.core.PlangymEnv

Fast LunarLander that follows the plangym API.

Parameters
  • name (str) –

  • frameskip (int) –

  • episodic_life (bool) –

  • autoreset (bool) –

  • wrappers (Iterable[plangym.core.wrap_callable]) –

  • delay_setup (bool) –

  • deterministic (bool) –

  • continuous (bool) –

  • render_mode (Optional[str]) –

property deterministic(self)

Return true if the LunarLander simulation is deterministic.

Return type

bool

property continuous(self)

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

Return type

bool

init_gym_env(self)[source]

Initialize the target gym.Env instance.

Return type

FastGymLunarLander

get_state(self)[source]

Recover the internal state of the simulation.

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

Return type

numpy.ndarray

set_state(self, state)[source]

Set the internal state of the simulation.

Parameters

state (numpy.ndarray) – Target state to be set in the environment.

Returns

None

Return type

None

process_terminal(self, terminal, obs=None, **kwargs)[source]

Return the terminal condition considering the lunar lander state.

Return type

bool