Welcome to the Deep Q-Learning for Lunar Lander project! This project aims to train an intelligent agent to land a lunar module safely on a designated landing pad using Deep Q-Networks (DQN). The agent learns to control the lander's thrusters to achieve a smooth landing.
This project is implemented in a Jupyter Notebook, making it easy to follow the code and see the results interactively.
Follow these steps to set up the project on your local machine:
-
Clone the Repository:
git clone https://github.com/harshaparida/LunarBot.git cd LunarBot
-
Install Dependencies: Install the required libraries using pip:
pip install gymnasium pip install "gymnasium[atari, accept-rom-license]" pip install "gymnasium[box2d]" pip install torch numpy sudo apt-get install -y swig
-
Launch Jupyter Notebook: Start Jupyter Notebook to run the project:
jupyter notebook
-
Open the Notebook: In Jupyter Notebook, open the
_dqn.ipynb
file to explore the project.
Run the cells in the Jupyter Notebook to train the agent.
After training, you can watch the trained agent in action by running the provided cells in the notebook.
dqn.ipynb
: Jupyter Notebook containing the implementation.README.md
: This file.demo.gif
: Demo GIF showing the trained agent in action.
The agent successfully learned to land the lunar module, solving the LunarLander-v2 environment in approximately 733 episodes, achieving an average score of over 200.
Contributions are welcome! Feel free to fork this repository, make improvements, and submit a pull request. Let's collaborate to make this project even better!
For any inquiries or feedback, please reach out to my email.