diff --git a/Project/Assets/ML-Agents/Examples/Match3/Scripts/Match3Agent.cs b/Project/Assets/ML-Agents/Examples/Match3/Scripts/Match3Agent.cs index 5cafd5d6ce..fb7ab75994 100644 --- a/Project/Assets/ML-Agents/Examples/Match3/Scripts/Match3Agent.cs +++ b/Project/Assets/ML-Agents/Examples/Match3/Scripts/Match3Agent.cs @@ -2,7 +2,7 @@ using UnityEngine; using Unity.MLAgents; using Unity.MLAgents.Actuators; -using Unity.MLAgents.Extensions.Match3; +using Unity.MLAgents.Integrations.Match3; namespace Unity.MLAgentsExamples { diff --git a/Project/Assets/ML-Agents/Examples/Match3/Scripts/Match3Board.cs b/Project/Assets/ML-Agents/Examples/Match3/Scripts/Match3Board.cs index 4e71465354..df6c3a56a4 100644 --- a/Project/Assets/ML-Agents/Examples/Match3/Scripts/Match3Board.cs +++ b/Project/Assets/ML-Agents/Examples/Match3/Scripts/Match3Board.cs @@ -1,5 +1,5 @@ using System; -using Unity.MLAgents.Extensions.Match3; +using Unity.MLAgents.Integrations.Match3; using UnityEngine; using UnityEngine.Serialization; diff --git a/Project/Assets/ML-Agents/Examples/Match3/Scripts/Match3ExampleActuator.cs b/Project/Assets/ML-Agents/Examples/Match3/Scripts/Match3ExampleActuator.cs index 1347cf97ba..a277635a3f 100644 --- a/Project/Assets/ML-Agents/Examples/Match3/Scripts/Match3ExampleActuator.cs +++ b/Project/Assets/ML-Agents/Examples/Match3/Scripts/Match3ExampleActuator.cs @@ -1,5 +1,5 @@ using Unity.MLAgents; -using Unity.MLAgents.Extensions.Match3; +using Unity.MLAgents.Integrations.Match3; namespace Unity.MLAgentsExamples { diff --git a/Project/Assets/ML-Agents/Examples/Match3/Scripts/Match3ExampleActuatorComponent.cs b/Project/Assets/ML-Agents/Examples/Match3/Scripts/Match3ExampleActuatorComponent.cs index 530b7d0be3..c3501bada4 100644 --- a/Project/Assets/ML-Agents/Examples/Match3/Scripts/Match3ExampleActuatorComponent.cs +++ b/Project/Assets/ML-Agents/Examples/Match3/Scripts/Match3ExampleActuatorComponent.cs @@ -1,6 +1,6 @@ using Unity.MLAgents; using Unity.MLAgents.Actuators; -using Unity.MLAgents.Extensions.Match3; +using Unity.MLAgents.Integrations.Match3; namespace Unity.MLAgentsExamples { diff --git a/com.unity.ml-agents.extensions/Documentation~/com.unity.ml-agents.extensions.md b/com.unity.ml-agents.extensions/Documentation~/com.unity.ml-agents.extensions.md index be035eac6c..98914d4b36 100644 --- a/com.unity.ml-agents.extensions/Documentation~/com.unity.ml-agents.extensions.md +++ b/com.unity.ml-agents.extensions/Documentation~/com.unity.ml-agents.extensions.md @@ -18,8 +18,7 @@ The following table describes the package folder structure: | _Runtime_ | Contains core C# APIs for integrating ML-Agents into your Unity scene. | | _Tests_ | Contains the unit tests for the package. | -The Runtime directory currently contains three features: - * [Match-3 sensor and actuator](Match3.md) +The Runtime directory currently contains these features: * [Grid-based sensor](Grid-Sensor.md) * Physics-based sensors * [Input System Package Integration](InputActuatorComponent.md) diff --git a/com.unity.ml-agents/CHANGELOG.md b/com.unity.ml-agents/CHANGELOG.md index dbc0bb903a..f75162e9d5 100755 --- a/com.unity.ml-agents/CHANGELOG.md +++ b/com.unity.ml-agents/CHANGELOG.md @@ -52,6 +52,7 @@ determine whether `Agent.RequestDecision()` and `Agent.RequestAction()` are call amount of memory that needs to be allocated during runtime. (#5233) - Optimzed `ObservationWriter.WriteTexture()` so that it doesn't call `Texture2D.GetPixels32()` for `RGB24` textures. This results in much less memory being allocated during inference with `CameraSensor` and `RenderTextureSensor`. (#5233) +- The Match-3 integration utilities were moved from `com.unity.ml-agents.extensions` to `com.unity.ml-agents`. (#5259) #### ml-agents / ml-agents-envs / gym-unity (Python) - Some console output have been moved from `info` to `debug` and will not be printed by default. If you want all messages to be printed, you can run `mlagents-learn` with the `--debug` option or add the line `debug: true` at the top of the yaml config file. (#5211) diff --git a/com.unity.ml-agents/Documentation~/com.unity.ml-agents.md b/com.unity.ml-agents/Documentation~/com.unity.ml-agents.md index 562f7fc471..e9fcd8628d 100644 --- a/com.unity.ml-agents/Documentation~/com.unity.ml-agents.md +++ b/com.unity.ml-agents/Documentation~/com.unity.ml-agents.md @@ -35,13 +35,14 @@ GitHub repo]. The following table describes the package folder structure: -| **Location** | **Description** | -| ---------------- | ---------------------------------------------------------------------- | -| _Documentation~_ | Contains the documentation for the Unity package. | -| _Editor_ | Contains utilities for Editor windows and drawers. | -| _Plugins_ | Contains third-party DLLs. | -| _Runtime_ | Contains core C# APIs for integrating ML-Agents into your Unity scene. | -| _Tests_ | Contains the unit tests for the package. | +| **Location** | **Description** | +| ---------------------- | ----------------------------------------------------------------------- | +| _Documentation~_ | Contains the documentation for the Unity package. | +| _Editor_ | Contains utilities for Editor windows and drawers. | +| _Plugins_ | Contains third-party DLLs. | +| _Runtime_ | Contains core C# APIs for integrating ML-Agents into your Unity scene. | +| _Runtime/Integrations_ | Contains utilities for integrating ML-Agents into specific game genres. | +| _Tests_ | Contains the unit tests for the package. | diff --git a/com.unity.ml-agents/Runtime/Integrations.meta b/com.unity.ml-agents/Runtime/Integrations.meta new file mode 100644 index 0000000000..f218be2521 --- /dev/null +++ b/com.unity.ml-agents/Runtime/Integrations.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f8f4fd0bc35f4e8f9867228591f663e3 +timeCreated: 1618359419 \ No newline at end of file diff --git a/com.unity.ml-agents.extensions/Runtime/Match3.meta b/com.unity.ml-agents/Runtime/Integrations/Match3.meta similarity index 100% rename from com.unity.ml-agents.extensions/Runtime/Match3.meta rename to com.unity.ml-agents/Runtime/Integrations/Match3.meta diff --git a/com.unity.ml-agents.extensions/Runtime/Match3/AbstractBoard.cs b/com.unity.ml-agents/Runtime/Integrations/Match3/AbstractBoard.cs similarity index 98% rename from com.unity.ml-agents.extensions/Runtime/Match3/AbstractBoard.cs rename to com.unity.ml-agents/Runtime/Integrations/Match3/AbstractBoard.cs index 807aa36c96..5737cbb958 100644 --- a/com.unity.ml-agents.extensions/Runtime/Match3/AbstractBoard.cs +++ b/com.unity.ml-agents/Runtime/Integrations/Match3/AbstractBoard.cs @@ -4,10 +4,10 @@ using UnityEngine; using Debug = UnityEngine.Debug; -namespace Unity.MLAgents.Extensions.Match3 +namespace Unity.MLAgents.Integrations.Match3 { /// - /// Representation of the AbstractBoard size and number of cell and special types. + /// Representation of the AbstractBoard dimensions, and number of cell and special types. /// public struct BoardSize { @@ -125,7 +125,7 @@ public virtual BoardSize GetCurrentBoardSize() public abstract bool IsMoveValid(Move m); /// - /// Instruct the game to make the given move. Returns true if the move was made. + /// Instruct the game to make the given Move. Returns true if the move was made. /// Note that during training, a move that was marked as invalid may occasionally still be /// requested. If this happens, it is safe to do nothing and request another move. /// diff --git a/com.unity.ml-agents.extensions/Runtime/Match3/AbstractBoard.cs.meta b/com.unity.ml-agents/Runtime/Integrations/Match3/AbstractBoard.cs.meta similarity index 100% rename from com.unity.ml-agents.extensions/Runtime/Match3/AbstractBoard.cs.meta rename to com.unity.ml-agents/Runtime/Integrations/Match3/AbstractBoard.cs.meta diff --git a/com.unity.ml-agents.extensions/Runtime/Match3/Match3Actuator.cs b/com.unity.ml-agents/Runtime/Integrations/Match3/Match3Actuator.cs similarity index 98% rename from com.unity.ml-agents.extensions/Runtime/Match3/Match3Actuator.cs rename to com.unity.ml-agents/Runtime/Integrations/Match3/Match3Actuator.cs index ea61c14813..9bd60bd571 100644 --- a/com.unity.ml-agents.extensions/Runtime/Match3/Match3Actuator.cs +++ b/com.unity.ml-agents/Runtime/Integrations/Match3/Match3Actuator.cs @@ -2,7 +2,7 @@ using Debug = UnityEngine.Debug; -namespace Unity.MLAgents.Extensions.Match3 +namespace Unity.MLAgents.Integrations.Match3 { /// /// Actuator for a Match3 game. It translates valid moves (defined by AbstractBoard.IsMoveValid()) @@ -23,7 +23,6 @@ public class Match3Actuator : IActuator, IBuiltInActuator /// Whether the inference action should be ignored and the Agent's Heuristic /// should be called. This should only be used for generating comparison stats of the Heuristic. /// The seed used to initialize . - /// /// public Match3Actuator(AbstractBoard board, bool forceHeuristic, diff --git a/com.unity.ml-agents.extensions/Runtime/Match3/Match3Actuator.cs.meta b/com.unity.ml-agents/Runtime/Integrations/Match3/Match3Actuator.cs.meta similarity index 100% rename from com.unity.ml-agents.extensions/Runtime/Match3/Match3Actuator.cs.meta rename to com.unity.ml-agents/Runtime/Integrations/Match3/Match3Actuator.cs.meta diff --git a/com.unity.ml-agents.extensions/Runtime/Match3/Match3ActuatorComponent.cs b/com.unity.ml-agents/Runtime/Integrations/Match3/Match3ActuatorComponent.cs similarity index 97% rename from com.unity.ml-agents.extensions/Runtime/Match3/Match3ActuatorComponent.cs rename to com.unity.ml-agents/Runtime/Integrations/Match3/Match3ActuatorComponent.cs index 5b45970681..9d5f17afbc 100644 --- a/com.unity.ml-agents.extensions/Runtime/Match3/Match3ActuatorComponent.cs +++ b/com.unity.ml-agents/Runtime/Integrations/Match3/Match3ActuatorComponent.cs @@ -2,7 +2,7 @@ using UnityEngine; using UnityEngine.Serialization; -namespace Unity.MLAgents.Extensions.Match3 +namespace Unity.MLAgents.Integrations.Match3 { /// /// Actuator component for a Match3 game. Generates a Match3Actuator at runtime. diff --git a/com.unity.ml-agents.extensions/Runtime/Match3/Match3ActuatorComponent.cs.meta b/com.unity.ml-agents/Runtime/Integrations/Match3/Match3ActuatorComponent.cs.meta similarity index 100% rename from com.unity.ml-agents.extensions/Runtime/Match3/Match3ActuatorComponent.cs.meta rename to com.unity.ml-agents/Runtime/Integrations/Match3/Match3ActuatorComponent.cs.meta diff --git a/com.unity.ml-agents.extensions/Runtime/Match3/Match3Sensor.cs b/com.unity.ml-agents/Runtime/Integrations/Match3/Match3Sensor.cs similarity index 99% rename from com.unity.ml-agents.extensions/Runtime/Match3/Match3Sensor.cs rename to com.unity.ml-agents/Runtime/Integrations/Match3/Match3Sensor.cs index fdb8807ce7..4252bd9b50 100644 --- a/com.unity.ml-agents.extensions/Runtime/Match3/Match3Sensor.cs +++ b/com.unity.ml-agents/Runtime/Integrations/Match3/Match3Sensor.cs @@ -3,7 +3,7 @@ using Unity.MLAgents.Sensors; using UnityEngine; -namespace Unity.MLAgents.Extensions.Match3 +namespace Unity.MLAgents.Integrations.Match3 { /// /// Delegate that provides integer values at a given (x,y) coordinate. @@ -164,7 +164,6 @@ public int Write(ObservationWriter writer) } } - return offset; } diff --git a/com.unity.ml-agents.extensions/Runtime/Match3/Match3Sensor.cs.meta b/com.unity.ml-agents/Runtime/Integrations/Match3/Match3Sensor.cs.meta similarity index 100% rename from com.unity.ml-agents.extensions/Runtime/Match3/Match3Sensor.cs.meta rename to com.unity.ml-agents/Runtime/Integrations/Match3/Match3Sensor.cs.meta diff --git a/com.unity.ml-agents.extensions/Runtime/Match3/Match3SensorComponent.cs b/com.unity.ml-agents/Runtime/Integrations/Match3/Match3SensorComponent.cs similarity index 97% rename from com.unity.ml-agents.extensions/Runtime/Match3/Match3SensorComponent.cs rename to com.unity.ml-agents/Runtime/Integrations/Match3/Match3SensorComponent.cs index 31e57cc5e1..69efcfbb7d 100644 --- a/com.unity.ml-agents.extensions/Runtime/Match3/Match3SensorComponent.cs +++ b/com.unity.ml-agents/Runtime/Integrations/Match3/Match3SensorComponent.cs @@ -2,7 +2,7 @@ using Unity.MLAgents.Sensors; using UnityEngine; -namespace Unity.MLAgents.Extensions.Match3 +namespace Unity.MLAgents.Integrations.Match3 { /// /// Sensor component for a Match3 game. diff --git a/com.unity.ml-agents.extensions/Runtime/Match3/Match3SensorComponent.cs.meta b/com.unity.ml-agents/Runtime/Integrations/Match3/Match3SensorComponent.cs.meta similarity index 100% rename from com.unity.ml-agents.extensions/Runtime/Match3/Match3SensorComponent.cs.meta rename to com.unity.ml-agents/Runtime/Integrations/Match3/Match3SensorComponent.cs.meta diff --git a/com.unity.ml-agents.extensions/Runtime/Match3/Move.cs b/com.unity.ml-agents/Runtime/Integrations/Match3/Move.cs similarity index 98% rename from com.unity.ml-agents.extensions/Runtime/Match3/Move.cs rename to com.unity.ml-agents/Runtime/Integrations/Match3/Move.cs index 40c619f48e..3e3da800fa 100644 --- a/com.unity.ml-agents.extensions/Runtime/Match3/Move.cs +++ b/com.unity.ml-agents/Runtime/Integrations/Match3/Move.cs @@ -1,7 +1,7 @@ using System; using UnityEngine; -namespace Unity.MLAgents.Extensions.Match3 +namespace Unity.MLAgents.Integrations.Match3 { /// /// Directions for a Move. @@ -141,7 +141,7 @@ public void Next(BoardSize maxBoardSize) } /// - /// Construct a Move from the row, column, and direction. + /// Construct a Move from the row, column, direction, and board size. /// /// /// diff --git a/com.unity.ml-agents.extensions/Runtime/Match3/Move.cs.meta b/com.unity.ml-agents/Runtime/Integrations/Match3/Move.cs.meta similarity index 100% rename from com.unity.ml-agents.extensions/Runtime/Match3/Move.cs.meta rename to com.unity.ml-agents/Runtime/Integrations/Match3/Move.cs.meta diff --git a/com.unity.ml-agents/Tests/Editor/Integrations.meta b/com.unity.ml-agents/Tests/Editor/Integrations.meta new file mode 100644 index 0000000000..395f71ca51 --- /dev/null +++ b/com.unity.ml-agents/Tests/Editor/Integrations.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 7e89e6f6ab7e4c9397958c0320bd5931 +timeCreated: 1618359633 \ No newline at end of file diff --git a/com.unity.ml-agents.extensions/Tests/Editor/Match3.meta b/com.unity.ml-agents/Tests/Editor/Integrations/Match3.meta similarity index 100% rename from com.unity.ml-agents.extensions/Tests/Editor/Match3.meta rename to com.unity.ml-agents/Tests/Editor/Integrations/Match3.meta diff --git a/com.unity.ml-agents.extensions/Tests/Editor/Match3/AbstractBoardTests.cs b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/AbstractBoardTests.cs similarity index 98% rename from com.unity.ml-agents.extensions/Tests/Editor/Match3/AbstractBoardTests.cs rename to com.unity.ml-agents/Tests/Editor/Integrations/Match3/AbstractBoardTests.cs index fcc0bee38e..b8e9337c1e 100644 --- a/com.unity.ml-agents.extensions/Tests/Editor/Match3/AbstractBoardTests.cs +++ b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/AbstractBoardTests.cs @@ -2,9 +2,9 @@ using System.Collections.Generic; using UnityEngine; using NUnit.Framework; -using Unity.MLAgents.Extensions.Match3; +using Unity.MLAgents.Integrations.Match3; -namespace Unity.MLAgents.Extensions.Tests.Match3 +namespace Unity.MLAgents.Tests.Integrations.Match3 { internal class StringBoard : AbstractBoard { diff --git a/com.unity.ml-agents.extensions/Tests/Editor/Match3/AbstractBoardTests.cs.meta b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/AbstractBoardTests.cs.meta similarity index 100% rename from com.unity.ml-agents.extensions/Tests/Editor/Match3/AbstractBoardTests.cs.meta rename to com.unity.ml-agents/Tests/Editor/Integrations/Match3/AbstractBoardTests.cs.meta diff --git a/com.unity.ml-agents.extensions/Tests/Editor/Match3/Match3ActuatorTests.cs b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/Match3ActuatorTests.cs similarity index 98% rename from com.unity.ml-agents.extensions/Tests/Editor/Match3/Match3ActuatorTests.cs rename to com.unity.ml-agents/Tests/Editor/Integrations/Match3/Match3ActuatorTests.cs index 5949aaded4..dc3a7620f5 100644 --- a/com.unity.ml-agents.extensions/Tests/Editor/Match3/Match3ActuatorTests.cs +++ b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/Match3ActuatorTests.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; using NUnit.Framework; using Unity.MLAgents.Actuators; -using Unity.MLAgents.Extensions.Match3; +using Unity.MLAgents.Integrations.Match3; using UnityEngine; -namespace Unity.MLAgents.Extensions.Tests.Match3 +namespace Unity.MLAgents.Tests.Integrations.Match3 { internal class SimpleBoard : AbstractBoard { diff --git a/com.unity.ml-agents.extensions/Tests/Editor/Match3/Match3ActuatorTests.cs.meta b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/Match3ActuatorTests.cs.meta similarity index 100% rename from com.unity.ml-agents.extensions/Tests/Editor/Match3/Match3ActuatorTests.cs.meta rename to com.unity.ml-agents/Tests/Editor/Integrations/Match3/Match3ActuatorTests.cs.meta diff --git a/com.unity.ml-agents.extensions/Tests/Editor/Match3/Match3SensorTests.cs b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/Match3SensorTests.cs similarity index 97% rename from com.unity.ml-agents.extensions/Tests/Editor/Match3/Match3SensorTests.cs rename to com.unity.ml-agents/Tests/Editor/Integrations/Match3/Match3SensorTests.cs index 28c19259c9..6c1eaa61d9 100644 --- a/com.unity.ml-agents.extensions/Tests/Editor/Match3/Match3SensorTests.cs +++ b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/Match3SensorTests.cs @@ -2,12 +2,12 @@ using System.IO; using System.Reflection; using NUnit.Framework; -using Unity.MLAgents.Extensions.Match3; using UnityEngine; -using Unity.MLAgents.Extensions.Tests.Sensors; +using Unity.MLAgents.Integrations.Match3; using Unity.MLAgents.Sensors; +using Unity.MLAgents.Tests; -namespace Unity.MLAgents.Extensions.Tests.Match3 +namespace Unity.MLAgents.Tests.Integrations.Match3 { public class Match3SensorTests { @@ -373,7 +373,7 @@ void SavePNGs(byte[] concatenatedPngData, string pathPrefix) for (var i = 0; i < splitPngs.Count; i++) { var pngData = splitPngs[i]; - var path = $"Packages/com.unity.ml-agents.extensions/Tests/Editor/Match3/{pathPrefix}{i}.png"; + var path = $"Packages/com.unity.ml-agents/Tests/Editor/Integrations/Match3/{pathPrefix}{i}.png"; using (var sw = File.Create(path)) { foreach (var b in pngData) @@ -389,7 +389,7 @@ byte[] LoadPNGs(string pathPrefix, int numExpected) var bytesOut = new List(); for (var i = 0; i < numExpected; i++) { - var path = $"Packages/com.unity.ml-agents.extensions/Tests/Editor/Match3/{pathPrefix}{i}.png"; + var path = $"Packages/com.unity.ml-agents/Tests/Editor/Integrations/Match3/{pathPrefix}{i}.png"; var res = File.ReadAllBytes(path); bytesOut.AddRange(res); } diff --git a/com.unity.ml-agents.extensions/Tests/Editor/Match3/Match3SensorTests.cs.meta b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/Match3SensorTests.cs.meta similarity index 100% rename from com.unity.ml-agents.extensions/Tests/Editor/Match3/Match3SensorTests.cs.meta rename to com.unity.ml-agents/Tests/Editor/Integrations/Match3/Match3SensorTests.cs.meta diff --git a/com.unity.ml-agents.extensions/Tests/Editor/Match3/MoveTests.cs b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/MoveTests.cs similarity index 96% rename from com.unity.ml-agents.extensions/Tests/Editor/Match3/MoveTests.cs rename to com.unity.ml-agents/Tests/Editor/Integrations/Match3/MoveTests.cs index 334f1e2e98..8174e7e5db 100644 --- a/com.unity.ml-agents.extensions/Tests/Editor/Match3/MoveTests.cs +++ b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/MoveTests.cs @@ -1,8 +1,8 @@ using System; using NUnit.Framework; -using Unity.MLAgents.Extensions.Match3; +using Unity.MLAgents.Integrations.Match3; -namespace Unity.MLAgents.Extensions.Tests.Match3 +namespace Unity.MLAgents.Tests.Integrations.Match3 { public class MoveTests { diff --git a/com.unity.ml-agents.extensions/Tests/Editor/Match3/MoveTests.cs.meta b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/MoveTests.cs.meta similarity index 100% rename from com.unity.ml-agents.extensions/Tests/Editor/Match3/MoveTests.cs.meta rename to com.unity.ml-agents/Tests/Editor/Integrations/Match3/MoveTests.cs.meta diff --git a/com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_0.png b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_0.png similarity index 100% rename from com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_0.png rename to com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_0.png diff --git a/com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_0.png.meta b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_0.png.meta similarity index 100% rename from com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_0.png.meta rename to com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_0.png.meta diff --git a/com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_1.png b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_1.png similarity index 100% rename from com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_1.png rename to com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_1.png diff --git a/com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_1.png.meta b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_1.png.meta similarity index 100% rename from com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_1.png.meta rename to com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_1.png.meta diff --git a/com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_2x2_0.png b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_2x2_0.png similarity index 100% rename from com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_2x2_0.png rename to com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_2x2_0.png diff --git a/com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_2x2_0.png.meta b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_2x2_0.png.meta similarity index 100% rename from com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_2x2_0.png.meta rename to com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_2x2_0.png.meta diff --git a/com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_2x2_1.png b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_2x2_1.png similarity index 100% rename from com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_2x2_1.png rename to com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_2x2_1.png diff --git a/com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_2x2_1.png.meta b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_2x2_1.png.meta similarity index 100% rename from com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_2x2_1.png.meta rename to com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_2x2_1.png.meta diff --git a/com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_special_0.png b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_special_0.png similarity index 100% rename from com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_special_0.png rename to com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_special_0.png diff --git a/com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_special_0.png.meta b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_special_0.png.meta similarity index 100% rename from com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_special_0.png.meta rename to com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_special_0.png.meta diff --git a/com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_special_1.png b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_special_1.png similarity index 100% rename from com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_special_1.png rename to com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_special_1.png diff --git a/com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_special_1.png.meta b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_special_1.png.meta similarity index 100% rename from com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_special_1.png.meta rename to com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_special_1.png.meta diff --git a/com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_special_2x2_0.png b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_special_2x2_0.png similarity index 100% rename from com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_special_2x2_0.png rename to com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_special_2x2_0.png diff --git a/com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_special_2x2_0.png.meta b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_special_2x2_0.png.meta similarity index 100% rename from com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_special_2x2_0.png.meta rename to com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_special_2x2_0.png.meta diff --git a/com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_special_2x2_1.png b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_special_2x2_1.png similarity index 100% rename from com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_special_2x2_1.png rename to com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_special_2x2_1.png diff --git a/com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_special_2x2_1.png.meta b/com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_special_2x2_1.png.meta similarity index 100% rename from com.unity.ml-agents.extensions/Tests/Editor/Match3/match3obs_special_2x2_1.png.meta rename to com.unity.ml-agents/Tests/Editor/Integrations/Match3/match3obs_special_2x2_1.png.meta diff --git a/com.unity.ml-agents/Tests/Editor/Unity.ML-Agents.Editor.Tests.asmdef b/com.unity.ml-agents/Tests/Editor/Unity.ML-Agents.Editor.Tests.asmdef index 041b707e8a..59135591a4 100755 --- a/com.unity.ml-agents/Tests/Editor/Unity.ML-Agents.Editor.Tests.asmdef +++ b/com.unity.ml-agents/Tests/Editor/Unity.ML-Agents.Editor.Tests.asmdef @@ -5,7 +5,8 @@ "Unity.ML-Agents", "Unity.Barracuda", "Unity.ML-Agents.CommunicatorObjects", - "Unity.ML-Agents.Runtime.Utils.Tests" + "Unity.ML-Agents.Runtime.Utils.Tests", + "Unity.ML-Agents.Runtime.Sensor.Tests" ], "optionalUnityReferences": [ "TestAssemblies" diff --git a/com.unity.ml-agents.extensions/Documentation~/Match3.md b/docs/Integrations-Match3.md similarity index 90% rename from com.unity.ml-agents.extensions/Documentation~/Match3.md rename to docs/Integrations-Match3.md index 112c7c76a2..bb053e62a9 100644 --- a/com.unity.ml-agents.extensions/Documentation~/Match3.md +++ b/docs/Integrations-Match3.md @@ -3,14 +3,13 @@ ## Getting started -The C# code for Match-3 exists inside of the extensions package (com.unity.ml-agents.extensions). A good first step -would be to familiarize with the extensions package by reading the document [here](com.unity.ml-agents.extensions.md). -The second step would be to take a look at how we have implemented the C# code in the example Match-3 scene (located +The C# code for Match-3 exists inside of the Unity package (`com.unity.ml-agents`). +The good first step would be to take a look at how we have implemented the C# code in the example Match-3 scene (located under /Project/Assets/ML-Agents/Examples/match3). Once you have some familiarity, then the next step would be to implement the C# code for Match-3 from the extensions package. Additionally, see below for additional technical specifications on the C# code for Match-3. Please note the Match-3 game - isn't human playable as implemented and can be only played via training. +isn't human playable as implemented and can be only played via training. ## Technical specifications for Match-3 with ML-Agents @@ -108,7 +107,3 @@ If you are a Match-3 developer and are trying to leverage ML-Agents for this sce [we want to hear from you](https://forms.gle/TBsB9jc8WshgzViU9). Additionally, we are also looking for interested Match-3 teams to speak with us for 45 minutes. If you are interested, please indicate that in the [form](https://forms.gle/TBsB9jc8WshgzViU9). If selected, we will provide gift cards as a token of appreciation. - -### Interested in more game templates? -Do you have a type of game you are interested for ML-Agents? If so, please post a -[forum issue](https://forum.unity.com/forums/ml-agents.453/) with [GAME TEMPLATE] in the title. diff --git a/docs/Integrations.md b/docs/Integrations.md new file mode 100644 index 0000000000..4a007c1866 --- /dev/null +++ b/docs/Integrations.md @@ -0,0 +1,10 @@ +# Game Integrations +ML-Agents provides some utilities to make it easier to integrate with some common genres of games. + +## Match-3 +The [Match-3 integration](Integrations-Match3.md) provides an abstraction of a match-3 game board and moves, along with +a sensor to observe the game state, and an actuator to translate the ML-Agent actions into game moves. + +## Interested in more game templates? +Do you have a type of game you are interested for ML-Agents? If so, please post a +[forum issue](https://forum.unity.com/forums/ml-agents.453/) with `[GAME TEMPLATE]` in the title. diff --git a/docs/Migrating.md b/docs/Migrating.md index 120bb8c110..b2124fafa0 100644 --- a/docs/Migrating.md +++ b/docs/Migrating.md @@ -95,6 +95,8 @@ public CompressionSpec GetCompressionSpec() - The abstract method `SensorComponent.CreateSensor()` was replaced with `CreateSensors()`, which returns an `ISensor[]`. ### Match3 integration changes +The Match-3 integration utilities were moved from `com.unity.ml-agents.extensions` to `com.unity.ml-agents`. + The `AbstractBoard` interface was changed: * `AbstractBoard` no longer contains `Rows`, `Columns`, `NumCellTypes`, and `NumSpecialTypes` fields. * `public abstract BoardSize GetMaxBoardSize()` was added as an abstract method. `BoardSize` is a new struct that