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; | |
| using Unity.MLAgents.Integrations.Match3; | |
| namespace Unity.MLAgents.Tests.Integrations.Match3 | |
| { | |
| public class MoveTests | |
| { | |
| [] | |
| public void TestMoveEquivalence() | |
| { | |
| var board10x10 = new BoardSize { Rows = 10, Columns = 10 }; | |
| var moveUp = Move.FromPositionAndDirection(1, 1, Direction.Up, board10x10); | |
| var moveDown = Move.FromPositionAndDirection(2, 1, Direction.Down, board10x10); | |
| Assert.AreEqual(moveUp.MoveIndex, moveDown.MoveIndex); | |
| var moveRight = Move.FromPositionAndDirection(1, 1, Direction.Right, board10x10); | |
| var moveLeft = Move.FromPositionAndDirection(1, 2, Direction.Left, board10x10); | |
| Assert.AreEqual(moveRight.MoveIndex, moveLeft.MoveIndex); | |
| } | |
| [] | |
| public void TestNext() | |
| { | |
| var maxRows = 8; | |
| var maxCols = 13; | |
| var boardSize = new BoardSize | |
| { | |
| Rows = maxRows, | |
| Columns = maxCols | |
| }; | |
| // make sure using Next agrees with FromMoveIndex. | |
| var advanceMove = Move.FromMoveIndex(0, boardSize); | |
| for (var moveIndex = 0; moveIndex < Move.NumPotentialMoves(boardSize); moveIndex++) | |
| { | |
| var moveFromIndex = Move.FromMoveIndex(moveIndex, boardSize); | |
| Assert.AreEqual(advanceMove.MoveIndex, moveFromIndex.MoveIndex); | |
| Assert.AreEqual(advanceMove.Row, moveFromIndex.Row); | |
| Assert.AreEqual(advanceMove.Column, moveFromIndex.Column); | |
| Assert.AreEqual(advanceMove.Direction, moveFromIndex.Direction); | |
| advanceMove.Next(boardSize); | |
| } | |
| } | |
| // These are off the board | |
| [] | |
| [] | |
| [] | |
| [] | |
| // These are on the board but would move off | |
| [] | |
| [] | |
| [] | |
| [] | |
| public void TestInvalidMove(int row, int col, Direction dir) | |
| { | |
| var board10x10 = new BoardSize { Rows = 10, Columns = 10 }; | |
| Assert.Throws<IndexOutOfRangeException>(() => | |
| { | |
| Move.FromPositionAndDirection(row, col, dir, board10x10); | |
| }); | |
| } | |
| } | |
| } | |