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 /CameraFollow.cs
| using UnityEngine; | |
| namespace Unity.MLAgentsExamples | |
| { | |
| public class CameraFollow : MonoBehaviour | |
| { | |
| [] public Transform target; | |
| [] | |
| public float smoothingTime; //The time it takes to move to the new position | |
| private Vector3 m_Offset; | |
| private Vector3 m_CamVelocity; //Camera's velocity (used by SmoothDamp) | |
| // Use this for initialization | |
| void Start() | |
| { | |
| m_Offset = gameObject.transform.position - target.position; | |
| } | |
| void FixedUpdate() | |
| { | |
| var newPosition = new Vector3(target.position.x + m_Offset.x, transform.position.y, | |
| target.position.z + m_Offset.z); | |
| gameObject.transform.position = | |
| Vector3.SmoothDamp(transform.position, newPosition, ref m_CamVelocity, smoothingTime, Mathf.Infinity, | |
| Time.fixedDeltaTime); | |
| } | |
| } | |
| } | |