Add model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- deep-reinforcement-learning
|
| 4 |
+
- reinforcement-learning
|
| 5 |
+
- stable-baselines3
|
| 6 |
+
- BipedalWalker-v3
|
| 7 |
+
- PPO
|
| 8 |
+
- SAC
|
| 9 |
+
library_name: stable-baselines3
|
| 10 |
+
model_name: ppo
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# 🤖 PPO/SAC Agent for BipedalWalker-v3
|
| 14 |
+
|
| 15 |
+
This is a trained agent that learned to walk on two legs from scratch!
|
| 16 |
+
|
| 17 |
+
## Model Description
|
| 18 |
+
|
| 19 |
+
- **Algorithm**: PPO or SAC (Soft Actor-Critic)
|
| 20 |
+
- **Environment**: BipedalWalker-v3
|
| 21 |
+
- **Framework**: Stable-Baselines3
|
| 22 |
+
- **Training Steps**: 500,000 steps
|
| 23 |
+
|
| 24 |
+
## Performance
|
| 25 |
+
|
| 26 |
+
- **Walking Success**: Consistent bipedal locomotion
|
| 27 |
+
- **Average Reward**: 200+ (successful walking)
|
| 28 |
+
- **Coordination**: Learned proper leg coordination and balance
|
| 29 |
+
|
| 30 |
+
## Usage
|
| 31 |
+
|
| 32 |
+
```python
|
| 33 |
+
from stable_baselines3 import PPO
|
| 34 |
+
import gymnasium as gym
|
| 35 |
+
|
| 36 |
+
# Load the trained model
|
| 37 |
+
model = PPO.load("bipedal_walker_ppo_model")
|
| 38 |
+
|
| 39 |
+
# Create environment
|
| 40 |
+
env = gym.make('BipedalWalker-v3', render_mode='human')
|
| 41 |
+
|
| 42 |
+
# Watch it walk!
|
| 43 |
+
obs, _ = env.reset()
|
| 44 |
+
for _ in range(2000):
|
| 45 |
+
action, _ = model.predict(obs, deterministic=True)
|
| 46 |
+
obs, reward, terminated, truncated, info = env.step(action)
|
| 47 |
+
if terminated or truncated:
|
| 48 |
+
obs, _ = env.reset()
|
| 49 |
+
|
| 50 |
+
env.close()
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
## Training Details
|
| 54 |
+
|
| 55 |
+
The agent learned to coordinate:
|
| 56 |
+
- 4 continuous joint controls (hip + knee for each leg)
|
| 57 |
+
- Balance and momentum management
|
| 58 |
+
- Forward locomotion
|
| 59 |
+
- Obstacle navigation
|
| 60 |
+
|
| 61 |
+
## What Makes This Impressive
|
| 62 |
+
|
| 63 |
+
- **24-dimensional state space** - Complex sensory input
|
| 64 |
+
- **Continuous control** - Smooth joint movements
|
| 65 |
+
- **Physics simulation** - Realistic walking dynamics
|
| 66 |
+
- **From scratch learning** - No pre-programmed walking patterns
|
| 67 |
+
|
| 68 |
+
Amazing to watch a robot learn to walk! 🚶♂️
|