Downloads · 30 days
2
2% of all-time downloads
EdwardSnowy/ppo-LunarLander-v3_2m
ppo-LunarLander-v3_2m is a reinforcement learning model from EdwardSnowy. 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 PPO agent playing LunarLander-v3 using the Stable-Baselines3 library.
Downloads · 30 days
2
2% of all-time downloads
All-time downloads
84
Public
Repo size
283 KB
Likes
0
Public
Click a slice to open those files.
.zip149 KB · 37%
From the Hugging Face model README
This is a trained PPO agent playing LunarLander-v3 using the Stable-Baselines3 library.
The model achieved a best recorded evaluation episode reward of 312.46, completing the landing in 223 steps.
This result was obtained from a recorded evaluation rollout using deterministic inference.
LunarLander-v3MlpPolicy2,000,00016This is a trained PPO agent playing LunarLander-v3 using the Stable-Baselines3 library.
The agent was trained locally in WSL2 with Python 3.13 and CUDA for 2,000,000 timesteps.
The model uses an MlpPolicy and was trained with 16 vectorized environments.
import gymnasium as gym
from huggingface_sb3 import load_from_hub
from stable_baselines3 import PPO
repo_id = "EdwardSnowy/ppo-LunarLander-v3_2m"
filename = "ppo-LunarLander-v3_2m.zip"
checkpoint = load_from_hub(
repo_id=repo_id,
filename=filename,
)
model = PPO.load(checkpoint, device="cpu")
env = gym.make("LunarLander-v3", render_mode="rgb_array")
obs, info = env.reset()
done = False
total_reward = 0.0
steps = 0
while not done:
action, _ = model.predict(obs, deterministic=True)
obs, reward, terminated, truncated, info = env.step(action)
total_reward += float(reward)
steps += 1
done = terminated or truncated
env.close()
print(f"Episode reward: {total_reward:.2f}")
print(f"Steps: {steps}")