Downloads · 30 days
0
0% of all-time downloads
j-klawson/ppo-LunarLander-v2
ppo-LunarLander-v2 is a reinforcement learning model from j-klawson. 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 PPO (Proximal Policy Optimization) agent playing LunarLander-v2 using Stable-Baselines3.
Downloads · 30 days
0
0% of all-time downloads
All-time downloads
51
Public
Repo size
1.2 MB
Likes
0
Public
Click a slice to open those files.
.mp4148 KB · 32%
From the Hugging Face model README
This is a trained model of a PPO (Proximal Policy Optimization) agent playing LunarLander-v2 using Stable-Baselines3.
The agent successfully learned to land the lunar module, achieving excellent performance well above the 200 reward threshold!
import gymnasium as gym
from stable_baselines3 import PPO
from stable_baselines3.common.vec_env import DummyVecEnv
from stable_baselines3.common.monitor import Monitor
from huggingface_sb3 import load_from_hub
# Load the trained model
model = load_from_hub(
repo_id="j-klawson/ppo-LunarLander-v2",
filename="ppo-LunarLander-v2.zip"
)
# Create environment
env = DummyVecEnv([lambda: Monitor(gym.make("LunarLander-v2"))])
# Use the model
obs = env.reset()
for i in range(1000):
action, _states = model.predict(obs, deterministic=True)
obs, rewards, dones, info = env.step(action)
env.render()
if dones:
break
The agent was trained using PPO with the following process:
This model was trained as part of the Hugging Face Deep Reinforcement Learning Course - Unit 1.