Skip to content

lakshmenroy/LunarLandingModel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

LunarLanding-AIModel

Description:

The LunarLanding-AIModel project utilizes reinforcement learning techniques to train an agent to land a spacecraft safely on the moon's surface. This environment simulates a classic rocket trajectory optimization problem, where the agent must learn to control the spacecraft's engines to navigate and land on a designated landing pad. The project is based on the Gymnasium framework.

Envvironmental Details:

  1. Environment Name: LunarLander-v2
  2. Framework: Gymnasium
  3. Actions: The agent can take one of four discrete actions:
  • 0: Do nothing
  • 1: Fire the left orientation engine
  • 2: Fire the main engine
  • 3: Fire the right orientation engine
  1. Observations: The state is represented by an 8-dimensional vector, including the coordinates of the lander in x and y, linear velocities in x and y, angle, angular velocity, and two booleans indicating whether each leg is in contact with the ground.
  2. Rewards:
  • Rewards are given based on proximity to the landing pad, velocity, angle, and leg contact with the ground.
  • Each leg in contact with the ground gives a reward of 10 points.
  • Penalty for engine firing: 0.03 points for side engines and 0.3 points for the main engine.
  • Additional rewards of -100 for crashing and +100 for landing safely are given at the end of each episode.
  1. Goal: The episode is considered solved if the agent achieves an average score of at least 200 points over 100 consecutive episodes.

Reference:

Gymnasium Framework - https://gymnasium.farama.org/

Instructions

  1. Install Gymnasium and other necessary dependencies. 2 .Import required libraries.
  2. Define the neural network architecture for the agent.
  3. Implement experience replay and the DQN algorithm.
  4. Initialize the DQN agent and set hyperparameters.
  5. Train the agent on the LunarLander-v2 environment.
  6. Visualize the trained agent's performance.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published