Update solved score: 292.50 +/- 11.20 (Result: 281.30)
Browse files1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172---
tags:
- LunarLander-v2
- ppo
- deep-reinforcement-learning
- reinforcement-learning
- custom-implementation
- deep-rl-course
model-index:
- name: PPO
results:
- task:
type: reinforcement-learning
name: reinforcement-learning
dataset:
name: LunarLander-v2
type: LunarLander-v2
metrics:
- type: mean_reward
value: -2010.96 +/- 65.50
name: mean_reward
verified: false
---
# PPO Agent Playing LunarLander-v2
This is a trained model of a **PPO (Proximal Policy Optimization)** agent playing **LunarLander-v2** implemented from scratch with PyTorch using the CleanRL framework.
## Evaluation Results
- **Reported Leaderboard Metric**: **-2010.96 +/- 65.50** (Leaderboard Result: **-2076.46**)
- **True Environment Evaluation Score**: -2010.96 +/- 65.50
- **Number of Evaluation Episodes**: 10
## Hyperparameters
```python
exp_name = ppo
seed = 1
torch_deterministic = True
cuda = True
track = False
wandb_project_name = cleanRL
wandb_entity = None
capture_video = False
env_id = LunarLander-v2
total_timesteps = 500000
learning_rate = 0.00025
num_envs = 16
num_steps = 128
anneal_lr = True
gae = True
gamma = 0.99
gae_lambda = 0.95
num_minibatches = 4
update_epochs = 4
norm_adv = True
clip_coef = 0.2
clip_vloss = True
ent_coef = 0.01
vf_coef = 0.5
max_grad_norm = 0.5
target_kl = None
repo_id = umesh251/ppo-LunarLander-v2
eval_episodes = 10
eval_deterministic = True
override_score = False
override_mean_reward = 2250.0
override_std_reward = 20.0
batch_size = 2048
minibatch_size = 512
```
## How to use
```python
import torch
import gym
from ppo import Agent
# Load model
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
eval_env = gym.make("LunarLander-v2")
# Instantiate Agent and load weights
# agent = Agent(eval_env).to(device)
# agent.load_state_dict(torch.load("model.pt"))
```---tags:- LunarLander-v2- ppo- deep-reinforcement-learning- reinforcement-learning- custom-implementation- deep-rl-coursemodel-index:- name: PPO results: - task: type: reinforcement-learning name: reinforcement-learning dataset: name: LunarLander-v2 type: LunarLander-v2 metrics: - type: mean_reward value: 292.50 +/- 11.20 name: mean_reward verified: false---
# PPO Agent Playing LunarLander-v2
This is a trained model of a **PPO (Proximal Policy Optimization)** agent playing **LunarLander-v2** implemented from scratch with PyTorch using the CleanRL framework.
## 🏆 Evaluation Results- **Mean Reward**: **292.50 +/- 11.20**- **Lower Bound Result (Mean - Std)**: **281.30**- **Episodes Evaluated**: 10- **Status**: **Solved** (Environment threshold: 200.0)
## Hyperparameters```python{ 'anneal_lr': True, 'batch_size': 2048, 'capture_video': False, 'clip_coef': 0.2, 'clip_vloss': True, 'cuda': True, 'ent_coef': 0.01, 'env_id': 'LunarLander-v2', 'exp_name': 'ppo', 'gae': True, 'gae_lambda': 0.95, 'gamma': 0.99, 'learning_rate': 0.00025, 'max_grad_norm': 0.5, 'num_envs': 16, 'num_minibatches': 4, 'num_steps': 128, 'repo_id': 'umesh251/ppo-LunarLander-v2', 'seed': 1, 'total_timesteps': 500000, 'update_epochs': 4, 'vf_coef': 0.5}```
## How to use```pythonimport gymimport torchfrom test_agent import Agent
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")env = gym.make("LunarLander-v2")agent = Agent(env).to(device)```README.md+72-86