PPO playing LunarLander-v3

明月科创班课程项目

本仓库是明月科创班第 1 周《深度强化学习与开源仿真环境实践》的课程项目。项目使用 Gymnasium 的 LunarLander-v3 环境和 Stable-Baselines3 库,通过 16 个并行环境进行 PPO 训练,实践从环境交互、策略学习到独立评估、视频回放和 Hugging Face 模型发布的完整流程。

课程还包含 Isaac Sim、Isaac Lab、MuJoCo 与 Genesis 的基础环境搭建和验证;本仓库主要展示月球着陆器的训练成果与复现材料。

Evaluation

Mean return 262.79 ± 25.33 over 10 deterministic episodes. Mean minus standard deviation: 237.46.

Checkpoint selected using separate validation episodes. Held-out evaluation seeds start at 20000. Video shows three consecutive fixed seeds 30000–30002, without cherry-picking. Standard deviation uses ddof=0. Scores are for v3 and are not directly interchangeable with the course notebook’s v2 scores.

Download replay

Load the model

from stable_baselines3 import PPO
import gymnasium as gym
model = PPO.load("ppo-LunarLander-v3.zip")
env = gym.make("LunarLander-v3", render_mode="human")
obs, info = env.reset(seed=123)
while True:
    action, _ = model.predict(obs, deterministic=True)
    obs, reward, terminated, truncated, info = env.step(int(action))
    if terminated or truncated:
        break
env.close()

See config.json, requirements-lock.txt, and train.py for reproducibility.

Downloads last month
28
Video Preview
loading

Evaluation results