Update README.md
Browse files
README.md
CHANGED
|
@@ -25,29 +25,79 @@ model-index:
|
|
| 25 |
verified: false
|
| 26 |
---
|
| 27 |
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
verified: false
|
| 26 |
---
|
| 27 |
|
| 28 |
+
# โ๏ธ **PPO Agent on SnowballTarget**
|
| 29 |
+
|
| 30 |
+
This repository contains a trained **Proximal Policy Optimization (PPO)** agent that plays the **SnowballTarget** environment using the [Unity ML-Agents Library](https://github.com/Unity-Technologies/ml-agents).
|
| 31 |
+
|
| 32 |
+
---
|
| 33 |
+
|
| 34 |
+
## ๐ Model Card
|
| 35 |
+
|
| 36 |
+
**Model Name:** `ppo-SnowballTarget`
|
| 37 |
+
**Environment:** `SnowballTarget` (Unity ML-Agents)
|
| 38 |
+
**Algorithm:** PPO (Proximal Policy Optimization)
|
| 39 |
+
**Performance Metric:**
|
| 40 |
+
- Achieves stable performance in target-hitting tasks
|
| 41 |
+
- Demonstrates convergence to an effective policy
|
| 42 |
+
|
| 43 |
+
---
|
| 44 |
+
|
| 45 |
+
## ๐ Usage (with ML-Agents)
|
| 46 |
+
|
| 47 |
+
Documentation: [ML-Agents Toolkit Docs](https://unity-technologies.github.io/ml-agents/ML-Agents-Toolkit-Documentation/)
|
| 48 |
+
|
| 49 |
+
```bash
|
| 50 |
+
mlagents-learn <your_configuration_file_path.yaml> --run-id=<run_id> --resume
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
```python
|
| 54 |
+
# Example: loading the trained PPO model
|
| 55 |
+
# (requires Unity ML-Agents setup)
|
| 56 |
+
model_id = "KraTUZen/ppo-SnowballTarget"
|
| 57 |
+
# Select your .nn or .onnx file from the repo
|
| 58 |
+
```
|
| 59 |
+
|
| 60 |
+
---
|
| 61 |
+
|
| 62 |
+
## ๐ง Notes
|
| 63 |
+
- The agent is trained using **PPO**, a robust on-policy algorithm widely used in Unity ML-Agents.
|
| 64 |
+
- The environment involves **throwing snowballs at targets**, requiring precision and timing.
|
| 65 |
+
- The trained model is stored as `.nn` or `.onnx` files for direct Unity integration.
|
| 66 |
+
|
| 67 |
+
---
|
| 68 |
+
|
| 69 |
+
## ๐ Repository Structure
|
| 70 |
+
- `SnowballTarget.nn` / `SnowballTarget.onnx` โ Trained PPO policy
|
| 71 |
+
- `README.md` โ Documentation and usage guide
|
| 72 |
+
|
| 73 |
+
---
|
| 74 |
+
|
| 75 |
+
## โ
Results
|
| 76 |
+
- The agent learns to consistently hit targets with snowballs.
|
| 77 |
+
- Demonstrates stable training and effective policy convergence using PPO.
|
| 78 |
+
|
| 79 |
+
---
|
| 80 |
+
|
| 81 |
+
## ๐ Environment Overview
|
| 82 |
+
- **Observation Space:** Continuous (agent position, target position, environment state)
|
| 83 |
+
- **Action Space:** Continuous (throwing angle, force)
|
| 84 |
+
- **Objective:** Maximize hits on targets with snowballs
|
| 85 |
+
- **Reward:** Positive reward for successful hits, penalties for misses
|
| 86 |
+
|
| 87 |
+
---
|
| 88 |
+
|
| 89 |
+
## ๐ Learning Highlights
|
| 90 |
+
- **Algorithm:** PPO (Proximal Policy Optimization)
|
| 91 |
+
- **Update Rule:** Clipped surrogate objective to ensure stable updates
|
| 92 |
+
- **Strengths:** Robust, stable, widely used in Unity ML-Agents
|
| 93 |
+
- **Limitations:** Requires careful tuning of hyperparameters (clip ratio, learning rate, batch size)
|
| 94 |
+
|
| 95 |
+
---
|
| 96 |
+
|
| 97 |
+
## ๐ฎ Watch Your Agent Play
|
| 98 |
+
You can watch your agent **directly in your browser**:
|
| 99 |
+
|
| 100 |
+
1. Visit [Unity ML-Agents on Hugging Face](https://huggingface.co/unity)
|
| 101 |
+
2. Find your model ID: `KraTUZen/ppo-SnowballTarget`
|
| 102 |
+
3. Select your `.nn` or `.onnx` file
|
| 103 |
+
4. Click **Watch the agent play ๐**
|