Downloads · 30 days
1
1% of all-time downloads
imbibek8366/ppo-LunarLander-v2
ppo-LunarLander-v2 is a reinforcement learning model from imbibek8366. Use it for the reinforcement learning task on the model card, and read the license before you ship it in a product. It is set up for stable-baselines3.
This is a trained Deep Reinforcement Learning agent playing the LunarLander-v2 environment. The agent was trained using the Proximal Policy Optimization (PPO) algorithm from the stable-baselines3 library.
Downloads · 30 days
1
1% of all-time downloads
All-time downloads
146
Public
Repo size
482 KB
Likes
0
Public
Click a slice to open those files.
.mp4198 KB · 38%
From the Hugging Face model README
This is a trained Deep Reinforcement Learning agent playing the LunarLander-v2 environment. The agent was trained using the Proximal Policy Optimization (PPO) algorithm from the stable-baselines3 library.
The objective of this project was to train an autonomous agent to safely navigate a lunar module to its landing pad. The agent must manage fuel efficiency, gravity, and precise steering in a continuous state space.
This model successfully "solved" the environment by achieving a consistent score well over the 200-point threshold.
238.00 +/- 14.39stable-baselines3gymnasium (LunarLander-v2)You can easily load and watch this agent play using the huggingface_sb3 library!
import gymnasium as gym
from stable_baselines3 import PPO
from huggingface_sb3 import load_from_hub
# 1. Download the model from the Hugging Face Hub
repo_id = "imbibek8366/ppo-LunarLander-v2"
filename = "ppo-LunarLander-v2.zip"
checkpoint = load_from_hub(repo_id, filename)
# 2. Load the trained model
model = PPO.load(checkpoint)
# 3. Create the environment and watch the agent play!
env = gym.make("LunarLander-v2", render_mode="human")
obs, info = env.reset()
for i in range(1000):
action, _states = model.predict(obs, deterministic=True)
obs, reward, terminated, truncated, info = env.step(action)
if terminated or truncated:
obs, info = env.reset()
env.close()