KraTUZen commited on
Commit
ea8a32a
ยท
verified ยท
1 Parent(s): 46ed70d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +76 -26
README.md CHANGED
@@ -25,29 +25,79 @@ model-index:
25
  verified: false
26
  ---
27
 
28
- # **ppo** Agent playing **SnowballTarget**
29
- This is a trained model of a **ppo** agent playing **SnowballTarget**
30
- using the [Unity ML-Agents Library](https://github.com/Unity-Technologies/ml-agents).
31
-
32
- ## Usage (with ML-Agents)
33
- The Documentation: https://unity-technologies.github.io/ml-agents/ML-Agents-Toolkit-Documentation/
34
-
35
- We wrote a complete tutorial to learn to train your first agent using ML-Agents and publish it to the Hub:
36
- - A *short tutorial* where you teach Huggy the Dog ๐Ÿถ to fetch the stick and then play with him directly in your
37
- browser: https://huggingface.co/learn/deep-rl-course/unitbonus1/introduction
38
- - A *longer tutorial* to understand how works ML-Agents:
39
- https://huggingface.co/learn/deep-rl-course/unit5/introduction
40
-
41
- ### Resume the training
42
- ```bash
43
- mlagents-learn <your_configuration_file_path.yaml> --run-id=<run_id> --resume
44
- ```
45
-
46
- ### Watch your Agent play
47
- You can watch your agent **playing directly in your browser**
48
-
49
- 1. If the environment is part of ML-Agents official environments, go to https://huggingface.co/unity
50
- 2. Step 1: Find your model_id: KraTUZen/ppo-SnowballTarget
51
- 3. Step 2: Select your *.nn /*.onnx file
52
- 4. Click on Watch the agent play ๐Ÿ‘€
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 ๐Ÿ‘€**