Downloads · 30 days
2
5% of all-time downloads
arabellako22/dqn-LunarLander-v3-sb3
dqn-LunarLander-v3-sb3 is a reinforcement learning model from arabellako22. 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 model of a DQN agent playing LunarLander-v3 using the stable-baselines3 library.
Downloads · 30 days
2
5% of all-time downloads
All-time downloads
43
Public
Repo size
2.5 MB
Likes
0
Public
Click a slice to open those files.
.zip1.1 MB · 47%
From the Hugging Face model README
This is a trained model of a DQN agent playing LunarLander-v3 using the stable-baselines3 library.
import gymnasium as gym
from stable_baselines3 import DQN
from huggingface_sb3 import load_from_hub
checkpoint = load_from_hub("arabellako22/dqn-LunarLander-v3-sb3", "dqn-LunarLander-v3-sb3.zip")
model = DQN.load(checkpoint, device="cpu")
env = gym.make("LunarLander-v3", render_mode="human")
obs, info = env.reset()
done = False
while not done:
action, _states = model.predict(obs, deterministic=True)
obs, reward, terminated, truncated, info = env.step(action)
done = terminated or truncated
env.close()
Trained for 300,000 environment steps with the RL Zoo hyperparameters
(net_arch=[256, 256], lr=6.3e-4, buffer_size=50000, batch_size=128,
target_update_interval=250), with the exploration rate annealed from 1.0
to 0.05 over the first 12% of training.
Both agents were trained for 300,000 environment steps with identical hyperparameters, and evaluated on the same 50 episodes (seeds 100-149, greedy action selection). A score above 200 is generally considered "solved".
| Metric | Stable-Baselines3 | From scratch (PyTorch) |
|---|---|---|
| Mean reward | 237.4 +/- 101.1 | 235.2 +/- 89.0 |
| Median reward | 281.4 | 256.6 |
| Success rate (>= 200) | 80% | 84% |
| Worst episode | 6.7 | -152.2 |
| Best episode | 327.1 | 315.9 |
Note that the reward distribution is bimodal: most episodes land cleanly above 220, while a minority hover above the pad until the 1000-step time limit and score well below 100. The mean alone is therefore sensitive to the choice of evaluation seeds, which is why the median and the success rate are reported alongside it.
This repository is the tuned library baseline. A from-scratch PyTorch implementation of the same algorithm — with the replay buffer, target network and Bellman update written by hand — is available at arabellako22/dqn-LunarLander-v3-scratch.
Both models were trained and evaluated in the same notebook under identical conditions, so the table above is a like-for-like comparison rather than two independently reported numbers.