PPO Agent playing LunarLander-v3

This is a trained model of a PPO agent playing LunarLander-v3 using the stable-baselines3 library.

This is Unit 1 of the Hugging Face Deep Reinforcement Learning Course.

Results

Metric Value
Mean Reward 245.47
Std Reward 30.51
Eval Episodes 10
Total Timesteps 1,000,000

A mean reward above 200 is generally considered "solved" for LunarLander, so this agent lands consistently and efficiently.

Hyperparameters

model = PPO(
    policy="MlpPolicy",
    env=env,
    n_steps=1024,
    batch_size=64,
    n_epochs=4,
    gamma=0.999,
    gae_lambda=0.98,
    ent_coef=0.01,
    verbose=1
)

Usage (with Stable-baselines3)

from stable_baselines3 import PPO
from huggingface_sb3 import load_from_hub
 
repo_id = "ITSRAJ09/ppo-LunarLander-v3"
filename = "ppo-LunarLander-v3.zip"
 
model = load_from_hub(repo_id, filename)
 
import gymnasium as gym
env = gym.make("LunarLander-v3")
 
obs, _ = 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, _ = env.reset()

About

Trained as part of my journey toward gaming AI and reinforcement learning engineering. Working through the Hugging Face Deep RL Course, building toward Unity ML-Agents and custom game environments next.

Author: Raj Verma GitHub: github.com/Aaron-01-0 LinkedIn: linkedin.com/in/raj-verma-a99823307

Downloads last month
2
Video Preview
loading

Evaluation results