|
|
--- |
|
|
library_name: ml-agents |
|
|
tags: |
|
|
- SolarTracker |
|
|
- PyTorch |
|
|
- deep-reinforcement-learning |
|
|
- reinforcement-learning |
|
|
--- |
|
|
|
|
|
# **ppo Agent SolarTracker (SearcherBrain)** |
|
|
This is a trained model of a **ppo Solar Tracker** to search and track the sun made |
|
|
using the [Unity ML-Agents Library](https://github.com/Unity-Technologies/ml-agents). |
|
|
|
|
|
## Usage (with ML-Agents) |
|
|
The Documentation: https://unity-technologies.github.io/ml-agents/ML-Agents-Toolkit-Documentation/ |
|
|
|
|
|
We wrote a complete tutorial to learn to train your first agent using ML-Agents and publish it to the Hub: |
|
|
- A *short tutorial* where you teach Huggy the Dog ๐ถ to fetch the stick and then play with him directly in your |
|
|
browser: https://huggingface.co/learn/deep-rl-course/unitbonus1/introduction |
|
|
- A *longer tutorial* to understand how works ML-Agents: |
|
|
https://huggingface.co/learn/deep-rl-course/unit5/introduction |
|
|
|
|
|
### Resume the training |
|
|
```bash |
|
|
mlagents-learn <your_configuration_file_path.yaml> --run-id=<run_id> --resume |
|
|
``` |
|
|
|
|
|
### Watch this Solar Tracker Agent playing |
|
|
You can watch this agent in action **directly in your browser** |
|
|
|
|
|
1. Go to [this](https://huggingface.co/spaces/SamuelM0422/SolarTracker) Hugging Face Space |
|
|
2. Watch the agent in action! ๐ |
|
|
|
|
|
### Input of the model |
|
|
|
|
|
The action space size is a tensor of 7 elements: |
|
|
|
|
|
1. The coordinates of the sun in the camera ```[x, y]``` normalized |
|
|
2. A one-hot-encoded vector representing if the sun is visible or not ```[0 or 1]``` |
|
|
3. The quaternion vector representing the rotation of the solar panel ```[qx, qy, qz, qw]```. |
|
|
|
|
|
```python |
|
|
# input = [x, y, visibility, qx, qy, qz, qw] |
|
|
example_input = [0.4, 0.5, 1, 0.98, 0, -0.32, -0.99] |
|
|
``` |
|
|
|