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
| using System; | |
| using NUnit.Framework; | |
| namespace Unity.MLAgents.Tests | |
| { | |
| [] | |
| public class RecursionCheckerTests | |
| { | |
| class InfiniteRecurser | |
| { | |
| RecursionChecker m_checker = new RecursionChecker("InfiniteRecurser"); | |
| public int NumCalls; | |
| public void Implode() | |
| { | |
| NumCalls++; | |
| using (m_checker.Start()) | |
| { | |
| Implode(); | |
| } | |
| } | |
| } | |
| [] | |
| public void TestRecursionCheck() | |
| { | |
| var rc = new InfiniteRecurser(); | |
| Assert.Throws<UnityAgentsException>(() => | |
| { | |
| rc.Implode(); | |
| }); | |
| // Should increment twice before bailing out. | |
| Assert.AreEqual(2, rc.NumCalls); | |
| } | |
| class OneTimeThrower | |
| { | |
| RecursionChecker m_checker = new RecursionChecker("OneTimeThrower"); | |
| public int NumCalls; | |
| public void DoStuff() | |
| { | |
| // This method throws from inside the checker the first time. | |
| // Later calls do nothing. | |
| NumCalls++; | |
| using (m_checker.Start()) | |
| { | |
| if (NumCalls == 1) | |
| { | |
| throw new ArgumentException("oops"); | |
| } | |
| } | |
| } | |
| } | |
| [] | |
| public void TestThrowResetsFlag() | |
| { | |
| var ott = new OneTimeThrower(); | |
| Assert.Throws<ArgumentException>(() => | |
| { | |
| ott.DoStuff(); | |
| }); | |
| // Make sure the flag is cleared if we throw in the "using". Should be able to step subsequently. | |
| ott.DoStuff(); | |
| ott.DoStuff(); | |
| Assert.AreEqual(3, ott.NumCalls); | |
| } | |
| } | |
| } | |