Reinforcement Learning
ml-agents
TensorBoard
ONNX
Pyramids
deep-reinforcement-learning
ML-Agents-Pyramids
Instructions to use AnnaMats/ppo-Pyramids-Training with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ml-agents
How to use AnnaMats/ppo-Pyramids-Training with ml-agents:
mlagents-load-from-hf --repo-id="AnnaMats/ppo-Pyramids-Training" --local-dir="./download: string[]s"
- Notebooks
- Google Colab
- Kaggle
ppo-Pyramids-Training / Project /Assets /ML-Agents /Examples /SharedAssets /Scripts /TargetContact.cs
| using UnityEngine; | |
| namespace Unity.MLAgentsExamples | |
| { | |
| /// <summary> | |
| /// This class contains logic for locomotion agents with joints which might make contact with a target. | |
| /// By attaching this as a component to those joints, their contact with the ground can be used as | |
| /// an observation for that agent. | |
| /// </summary> | |
| [] | |
| public class TargetContact : MonoBehaviour | |
| { | |
| [] public bool touchingTarget; | |
| const string k_Target = "target"; // Tag on target object. | |
| /// <summary> | |
| /// Check for collision with a target. | |
| /// </summary> | |
| void OnCollisionEnter(Collision col) | |
| { | |
| if (col.transform.CompareTag(k_Target)) | |
| { | |
| touchingTarget = true; | |
| } | |
| } | |
| /// <summary> | |
| /// Check for end of ground collision and reset flag appropriately. | |
| /// </summary> | |
| void OnCollisionExit(Collision other) | |
| { | |
| if (other.transform.CompareTag(k_Target)) | |
| { | |
| touchingTarget = false; | |
| } | |
| } | |
| } | |
| } | |