PPO LunarLander-v3 Agent
This is a trained PPO agent for the LunarLander-v3 environment.
Training Details
- Algorithm: PPO
- Environment: LunarLander-v3
- Mean Reward: 228.59 +/- 54.97
Video of Agent Performance
<video controls autoplay loop>
<source src="https://huggingface.co/nhankins/ppo-LunarLander-v3/resolve/main/rl-video-episode-0.mp4" type="video/mp4">
</video>
How to use this model
import gymnasium as gym
from stable_baselines3 import PPO
from huggingface_sb3 import load_from_hub
# Load the model from the Hub
repo_id = "nhankins/ppo-LunarLander-v3"
filename = "ppo-LunarLander-v3.zip"
checkpoint = load_from_hub(repo_id, filename)
model = PPO.load(checkpoint)
# Create the environment
env = gym.make("LunarLander-v3", render_mode="human") # or rgb_array for recording
obs, info = env.reset()
for _ in range(1000): # Run for 1000 steps
action, _states = model.predict(obs, deterministic=True)
obs, rewards, terminated, truncated, info = env.step(action)
if terminated or truncated:
obs, info = env.reset()
env.close()
- Downloads last month
- 20