Instructions to use SionJang/ppo-LunarLander-v3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- stable-baselines3
How to use SionJang/ppo-LunarLander-v3 with stable-baselines3:
from huggingface_sb3 import load_from_hub checkpoint = load_from_hub( repo_id="SionJang/ppo-LunarLander-v3", filename="{MODEL FILENAME}.zip", ) - Notebooks
- Google Colab
- Kaggle
PPO agent for LunarLander-v3 (mean reward 274.83, 100% landings)
This model was trained by an AI agent. Rich, an AI agent running on Claude Code, designed the experiment, wrote the training code, ran the training and evaluated the model. A human, Sion Jang, approved each step and reviewed the results before release.
Training recipe
The training code, the fixed evaluation protocol, and the results of every seed (failures included) are in cpu-rl-recipes.
Results
Evaluation: 100 episodes, deterministic actions, evaluation seeds 10000โ10099. None of these seeds were used in training.
| Model | Mean reward | Std | Min | Landing success |
|---|---|---|---|---|
| This model (PPO, seed 1) | 274.83 | 19.90 | 235.64 | 100% |
| Our earlier Double DQN (SionJang/lunarlander-v3-double-dqn), same 100 episodes | 223.49 | 88.69 | 18.71 | 75% |
The same recipe is stable across three training seeds:
| Seed | Mean | Std | Min | Episodes โฅ 200 |
|---|---|---|---|---|
| 0 | 267.51 | 20.53 | 227.72 | 100% |
| 1 (this model) | 274.83 | 19.90 | 235.64 | 100% |
| 2 | 272.70 | 22.30 | 217.98 | 100% |
| Mean of 3 seeds | 271.68 | 300 / 300 |
Landing success counts episodes that end in a successful touchdown. The final step reward is above +50.
How it was trained
Algorithm: PPO with
MlpPolicy, from stable-baselines3 2.9.2.Starting point: the RL Baselines3 Zoo hyperparameters for LunarLander.
- 16 parallel environments
n_steps=1024,batch_size=64,gamma=0.999,gae_lambda=0.98,n_epochs=4,ent_coef=0.01
Changes that took the run past 260:
- 2,000,000 timesteps instead of 1,000,000.
- The learning rate decays linearly from 3e-4 to 0.
Together these removed the rare crash (a 47-point episode) seen in the 1M-step run. The 3-seed mean rose from 257.53 to 271.68.
Hardware: one laptop CPU (Intel i7-11800H), no GPU.
- This model trained in 26.4 minutes.
- All three seeds together took 84.3 minutes.
Software: Python 3.12, PyTorch 2.13.0 (CPU), Gymnasium 1.3.0, Box2D 2.3.10.
train_ppo.py and results.json in this repository reproduce the run:
RUN_NAME=runs STEPS=2000000 LINEAR_LR=1 python train_ppo.py
Usage
import gymnasium as gym
from stable_baselines3 import PPO
from huggingface_hub import hf_hub_download
path = hf_hub_download("SionJang/ppo-LunarLander-v3", "ppo-LunarLander-v3.zip")
model = PPO.load(path)
env = gym.make("LunarLander-v3", render_mode="human")
obs, _ = env.reset(seed=10000)
done = False
while not done:
action, _ = model.predict(obs, deterministic=True)
obs, reward, terminated, truncated, _ = env.step(action)
done = terminated or truncated
Note: .zip model files use Python pickle. Load model files only from sources you trust.
Who did what
| Role | Who |
|---|---|
| Experiment design, code, training, evaluation, model card | Rich, AI agent (Claude Code) |
| Approval and review of results before release | Sion Jang (human) |
- Downloads last month
- 21
Evaluation results
- mean_reward on LunarLander-v3self-reported274.83 +/- 19.90
