Reinforcement Learning
stable-baselines3
LunarLander-v2
deep-reinforcement-learning
ppo
Eval Results (legacy)
Instructions to use arjun80892/ppo-LunarLander-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- stable-baselines3
How to use arjun80892/ppo-LunarLander-v2 with stable-baselines3:
from huggingface_sb3 import load_from_hub checkpoint = load_from_hub( repo_id="arjun80892/ppo-LunarLander-v2", filename="{MODEL FILENAME}.zip", ) - Notebooks
- Google Colab
- Kaggle
PPO Agent Playing LunarLander-v2 ๐๐ค
This is a trained model of a PPO agent playing LunarLander-v2 using the Stable-Baselines3 library. This model was trained as part of Unit 1 of the Hugging Face Deep Reinforcement Learning Course.
๐ Performance & Evaluation Results
- Environment:
LunarLander-v2 - Mean Reward:
257.64 +/- 25.05 - Certification Score (
mean_reward - std_reward):232.59 - Certification Status: Passed (Score >= 200) โ
๐ฎ Video Replay
๐ฆ Usage (with Stable-Baselines3)
To run this model with Stable-Baselines3 and Gymnasium:
import gymnasium as gym
from stable_baselines3 import PPO
from huggingface_sb3 import load_from_hub
# 1. Download model checkpoint from Hugging Face Hub
checkpoint = load_from_hub(
repo_id="arjun80892/ppo-LunarLander-v2",
filename="ppo-LunarLander-v2.zip",
)
# 2. Load model
model = PPO.load(checkpoint)
# 3. Evaluate the agent
env = gym.make("LunarLander-v2", render_mode="human")
obs, info = env.reset()
for _ 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()
โ๏ธ Hyperparameters
- Algorithm: PPO (Proximal Policy Optimization)
- Policy:
MlpPolicy - Number of Steps (
n_steps): 1024 - Batch Size: 64
- Epochs (
n_epochs): 4 - Gamma (
gamma): 0.999 - GAE Lambda (
gae_lambda): 0.98 - Entropy Coefficient (
ent_coef): 0.01
- Downloads last month
- -
Evaluation results
- mean_reward on LunarLander-v2self-reported257.64 +/- 25.05