Update solved score: 292.50 +/- 11.20 (Result: 281.30)
Browse files
README.md
CHANGED
|
@@ -1,86 +1,72 @@
|
|
| 1 |
-
---
|
| 2 |
-
tags:
|
| 3 |
-
- LunarLander-v2
|
| 4 |
-
- ppo
|
| 5 |
-
- deep-reinforcement-learning
|
| 6 |
-
- reinforcement-learning
|
| 7 |
-
- custom-implementation
|
| 8 |
-
- deep-rl-course
|
| 9 |
-
model-index:
|
| 10 |
-
- name: PPO
|
| 11 |
-
results:
|
| 12 |
-
- task:
|
| 13 |
-
type: reinforcement-learning
|
| 14 |
-
name: reinforcement-learning
|
| 15 |
-
dataset:
|
| 16 |
-
name: LunarLander-v2
|
| 17 |
-
type: LunarLander-v2
|
| 18 |
-
metrics:
|
| 19 |
-
- type: mean_reward
|
| 20 |
-
value:
|
| 21 |
-
name: mean_reward
|
| 22 |
-
verified: false
|
| 23 |
-
---
|
| 24 |
-
|
| 25 |
-
# PPO Agent Playing LunarLander-v2
|
| 26 |
-
|
| 27 |
-
This is a trained model of a **PPO (Proximal Policy Optimization)** agent playing **LunarLander-v2** implemented from scratch with PyTorch using the CleanRL framework.
|
| 28 |
-
|
| 29 |
-
## Evaluation Results
|
| 30 |
-
- **
|
| 31 |
-
|
| 32 |
-
- **
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
```
|
| 73 |
-
|
| 74 |
-
## How to use
|
| 75 |
-
```python
|
| 76 |
-
import torch
|
| 77 |
-
import gym
|
| 78 |
-
from ppo import Agent
|
| 79 |
-
|
| 80 |
-
# Load model
|
| 81 |
-
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 82 |
-
eval_env = gym.make("LunarLander-v2")
|
| 83 |
-
# Instantiate Agent and load weights
|
| 84 |
-
# agent = Agent(eval_env).to(device)
|
| 85 |
-
# agent.load_state_dict(torch.load("model.pt"))
|
| 86 |
-
```
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- LunarLander-v2
|
| 4 |
+
- ppo
|
| 5 |
+
- deep-reinforcement-learning
|
| 6 |
+
- reinforcement-learning
|
| 7 |
+
- custom-implementation
|
| 8 |
+
- deep-rl-course
|
| 9 |
+
model-index:
|
| 10 |
+
- name: PPO
|
| 11 |
+
results:
|
| 12 |
+
- task:
|
| 13 |
+
type: reinforcement-learning
|
| 14 |
+
name: reinforcement-learning
|
| 15 |
+
dataset:
|
| 16 |
+
name: LunarLander-v2
|
| 17 |
+
type: LunarLander-v2
|
| 18 |
+
metrics:
|
| 19 |
+
- type: mean_reward
|
| 20 |
+
value: 292.50 +/- 11.20
|
| 21 |
+
name: mean_reward
|
| 22 |
+
verified: false
|
| 23 |
+
---
|
| 24 |
+
|
| 25 |
+
# PPO Agent Playing LunarLander-v2
|
| 26 |
+
|
| 27 |
+
This is a trained model of a **PPO (Proximal Policy Optimization)** agent playing **LunarLander-v2** implemented from scratch with PyTorch using the CleanRL framework.
|
| 28 |
+
|
| 29 |
+
## 🏆 Evaluation Results
|
| 30 |
+
- **Mean Reward**: **292.50 +/- 11.20**
|
| 31 |
+
- **Lower Bound Result (Mean - Std)**: **281.30**
|
| 32 |
+
- **Episodes Evaluated**: 10
|
| 33 |
+
- **Status**: **Solved** (Environment threshold: 200.0)
|
| 34 |
+
|
| 35 |
+
## Hyperparameters
|
| 36 |
+
```python
|
| 37 |
+
{
|
| 38 |
+
'anneal_lr': True,
|
| 39 |
+
'batch_size': 2048,
|
| 40 |
+
'capture_video': False,
|
| 41 |
+
'clip_coef': 0.2,
|
| 42 |
+
'clip_vloss': True,
|
| 43 |
+
'cuda': True,
|
| 44 |
+
'ent_coef': 0.01,
|
| 45 |
+
'env_id': 'LunarLander-v2',
|
| 46 |
+
'exp_name': 'ppo',
|
| 47 |
+
'gae': True,
|
| 48 |
+
'gae_lambda': 0.95,
|
| 49 |
+
'gamma': 0.99,
|
| 50 |
+
'learning_rate': 0.00025,
|
| 51 |
+
'max_grad_norm': 0.5,
|
| 52 |
+
'num_envs': 16,
|
| 53 |
+
'num_minibatches': 4,
|
| 54 |
+
'num_steps': 128,
|
| 55 |
+
'repo_id': 'umesh251/ppo-LunarLander-v2',
|
| 56 |
+
'seed': 1,
|
| 57 |
+
'total_timesteps': 500000,
|
| 58 |
+
'update_epochs': 4,
|
| 59 |
+
'vf_coef': 0.5
|
| 60 |
+
}
|
| 61 |
+
```
|
| 62 |
+
|
| 63 |
+
## How to use
|
| 64 |
+
```python
|
| 65 |
+
import gym
|
| 66 |
+
import torch
|
| 67 |
+
from test_agent import Agent
|
| 68 |
+
|
| 69 |
+
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 70 |
+
env = gym.make("LunarLander-v2")
|
| 71 |
+
agent = Agent(env).to(device)
|
| 72 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|