浏览代码

Convert Academy to a singleton (#3210)

/asymm-envs
GitHub 5 年前
当前提交
4269447e
共有 61 个文件被更改,包括 1379 次插入2360 次删除
  1. 19
      UnitySDK/Assets/ML-Agents/Editor/Tests/DemonstrationTests.cs
  2. 16
      UnitySDK/Assets/ML-Agents/Editor/Tests/EditModeTestInternalBrainTensorGenerator.cs
  3. 204
      UnitySDK/Assets/ML-Agents/Editor/Tests/MLAgentsEditModeTest.cs
  4. 2
      UnitySDK/Assets/ML-Agents/Editor/Tests/Sensor/WriterAdapterTests.cs
  5. 16
      UnitySDK/Assets/ML-Agents/Examples/3DBall/Scenes/3DBall.unity
  6. 533
      UnitySDK/Assets/ML-Agents/Examples/3DBall/Scenes/3DBallHard.unity
  7. 3
      UnitySDK/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DAgent.cs
  8. 3
      UnitySDK/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DHardAgent.cs
  9. 94
      UnitySDK/Assets/ML-Agents/Examples/Basic/Scenes/Basic.unity
  10. 4
      UnitySDK/Assets/ML-Agents/Examples/Basic/Scripts/BasicAgent.cs
  11. 16
      UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scenes/Bouncer.unity
  12. 3
      UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerAgent.cs
  13. 17
      UnitySDK/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerDynamicTarget.unity
  14. 17
      UnitySDK/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerStaticTarget.unity
  15. 15
      UnitySDK/Assets/ML-Agents/Examples/FoodCollector/Scenes/FoodCollector.unity
  16. 15
      UnitySDK/Assets/ML-Agents/Examples/FoodCollector/Scenes/VisualFoodCollector.unity
  17. 6
      UnitySDK/Assets/ML-Agents/Examples/FoodCollector/Scripts/FoodCollectorAgent.cs
  18. 4
      UnitySDK/Assets/ML-Agents/Examples/FoodCollector/Scripts/FoodCollectorSettings.cs
  19. 15
      UnitySDK/Assets/ML-Agents/Examples/GridWorld/Scenes/GridWorld.unity
  20. 6
      UnitySDK/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs
  21. 2
      UnitySDK/Assets/ML-Agents/Examples/GridWorld/Scripts/GridArea.cs
  22. 4
      UnitySDK/Assets/ML-Agents/Examples/GridWorld/Scripts/GridSettings.cs
  23. 17
      UnitySDK/Assets/ML-Agents/Examples/Hallway/Scenes/Hallway.unity
  24. 17
      UnitySDK/Assets/ML-Agents/Examples/Hallway/Scenes/VisualHallway.unity
  25. 17
      UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scenes/PushBlock.unity
  26. 17
      UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scenes/VisualPushBlock.unity
  27. 6
      UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scripts/PushAgentBasic.cs
  28. 81
      UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scenes/Pyramids.unity
  29. 61
      UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scenes/VisualPyramids.unity
  30. 17
      UnitySDK/Assets/ML-Agents/Examples/Reacher/Scenes/Reacher.unity
  31. 4
      UnitySDK/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherAgent.cs
  32. 5
      UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/ProjectSettingsOverrides.cs
  33. 17
      UnitySDK/Assets/ML-Agents/Examples/Soccer/Scenes/SoccerTwos.unity
  34. 4
      UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerFieldArea.cs
  35. 17
      UnitySDK/Assets/ML-Agents/Examples/Tennis/Scenes/Tennis.unity
  36. 3
      UnitySDK/Assets/ML-Agents/Examples/Tennis/Scripts/TennisAgent.cs
  37. 17
      UnitySDK/Assets/ML-Agents/Examples/Walker/Scenes/Walker.unity
  38. 3
      UnitySDK/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAgent.cs
  39. 17
      UnitySDK/Assets/ML-Agents/Examples/WallJump/Scenes/WallJump.unity
  40. 10
      UnitySDK/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs
  41. 159
      UnitySDK/Assets/ML-Agents/Scripts/Academy.cs
  42. 41
      UnitySDK/Assets/ML-Agents/Scripts/Agent.cs
  43. 7
      UnitySDK/Assets/ML-Agents/Scripts/ICommunicator.cs
  44. 4
      UnitySDK/Assets/ML-Agents/Scripts/Policy/BarracudaPolicy.cs
  45. 6
      UnitySDK/Assets/ML-Agents/Scripts/Policy/BehaviorParameters.cs
  46. 6
      UnitySDK/Assets/ML-Agents/Scripts/Policy/RemotePolicy.cs
  47. 2
      docs/FAQ.md
  48. 3
      docs/Getting-Started-with-Balance-Ball.md
  49. 4
      docs/Glossary.md
  50. 28
      docs/Learning-Environment-Create-New.md
  51. 15
      docs/Learning-Environment-Design.md
  52. 7
      docs/Limitations.md
  53. 6
      docs/ML-Agents-Overview.md
  54. 4
      docs/Migrating.md
  55. 3
      docs/Python-API.md
  56. 4
      docs/Training-Curriculum-Learning.md
  57. 2
      docs/Training-Generalized-Reinforcement-Learning-Agents.md
  58. 2
      docs/Training-ML-Agents.md
  59. 999
      docs/images/mlagents-3DBallHierarchy.png
  60. 999
      docs/images/mlagents-Open3DBall.png
  61. 94
      docs/images/mlagents-NewTutHierarchy.png

19
UnitySDK/Assets/ML-Agents/Editor/Tests/DemonstrationTests.cs


namespace MLAgents.Tests
{
[TestFixture]
[SetUp]
public void SetUp()
{
if (Academy.IsInitialized)
{
Academy.Instance.Dispose();
}
}
[Test]
public void TestSanitization()

demoRecorder.record = true;
demoRecorder.InitializeDemoStore(fileSystem);
var acaGo = new GameObject("TestAcademy");
acaGo.AddComponent<Academy>();
var aca = acaGo.GetComponent<Academy>();
var academyInitializeMethod = typeof(Academy).GetMethod("InitializeEnvironment",
BindingFlags.Instance | BindingFlags.NonPublic);
var agentEnableMethod = typeof(Agent).GetMethod("OnEnable",
BindingFlags.Instance | BindingFlags.NonPublic);
var agentSendInfo = typeof(Agent).GetMethod("SendInfo",

academyInitializeMethod?.Invoke(aca, new object[] { });
// Step the agent
agent1.RequestDecision();

Assert.AreEqual((float)i + 1, vecObs[i]);
}
}
}
}
}

16
UnitySDK/Assets/ML-Agents/Editor/Tests/EditModeTestInternalBrainTensorGenerator.cs


namespace MLAgents.Tests
{
[TestFixture]
static List<Agent> GetFakeAgents()
[SetUp]
public void SetUp()
var acaGo = new GameObject("TestAcademy");
acaGo.AddComponent<Academy>();
var aca = acaGo.GetComponent<Academy>();
if (Academy.IsInitialized)
{
Academy.Instance.Dispose();
}
}
static List<Agent> GetFakeAgents()
{
var goA = new GameObject("goA");
var bpA = goA.AddComponent<BehaviorParameters>();
bpA.brainParameters.vectorObservationSize = 3;

{
var agentEnableMethod = typeof(Agent).GetMethod("OnEnableHelper",
BindingFlags.Instance | BindingFlags.NonPublic);
agentEnableMethod?.Invoke(agent, new object[] { aca });
agentEnableMethod?.Invoke(agent, new object[] { });
}
agentA.collectObservationsSensor.AddObservation(new Vector3(1, 2, 3));
agentB.collectObservationsSensor.AddObservation(new Vector3(4, 5, 6));

204
UnitySDK/Assets/ML-Agents/Editor/Tests/MLAgentsEditModeTest.cs


public void Update() { }
}
[TestFixture]
[SetUp]
public void SetUp()
{
if (Academy.IsInitialized)
{
Academy.Instance.Dispose();
}
}
// Use the Assert class to test conditions.
var acaGo = new GameObject("TestAcademy");
acaGo.AddComponent<Academy>();
var aca = acaGo.GetComponent<Academy>();
var aca = Academy.Instance;
Assert.AreNotEqual(null, aca);
Assert.AreEqual(0, aca.GetEpisodeCount());
Assert.AreEqual(0, aca.GetStepCount());

}
}
[TestFixture]
[SetUp]
public void SetUp()
{
if (Academy.IsInitialized)
{
Academy.Instance.Dispose();
}
}
var acaGo = new GameObject("TestAcademy");
acaGo.AddComponent<Academy>();
var aca = acaGo.GetComponent<Academy>();
Assert.AreEqual(0, aca.GetStepCount());
Assert.AreEqual(0, aca.GetEpisodeCount());
Assert.AreEqual(0, aca.GetTotalStepCount());
Assert.AreEqual(null, aca.FloatProperties);
//This will call the method even though it is private
var academyInitializeMethod = typeof(Academy).GetMethod("InitializeEnvironment",
BindingFlags.Instance | BindingFlags.NonPublic);
academyInitializeMethod?.Invoke(aca, new object[] { });
Assert.AreEqual(false, Academy.IsInitialized);
var aca = Academy.Instance;
Assert.AreEqual(true, Academy.IsInitialized);
// Check that init is idempotent
aca.LazyInitialization();
aca.LazyInitialization();
// Check that Dispose is idempotent
aca.Dispose();
Assert.AreEqual(false, Academy.IsInitialized);
aca.Dispose();
}
[Test]
public void TestAcademyDispose()
{
var floatProperties1 = Academy.Instance.FloatProperties;
Academy.Instance.Dispose();
var floatProperties2 = Academy.Instance.FloatProperties;
Academy.Instance.Dispose();
Assert.AreNotEqual(floatProperties1, floatProperties2);
}
[Test]

var agentGo2 = new GameObject("TestAgent");
agentGo2.AddComponent<TestAgent>();
var agent2 = agentGo2.GetComponent<TestAgent>();
var acaGo = new GameObject("TestAcademy");
acaGo.AddComponent<Academy>();
var aca = acaGo.GetComponent<Academy>();
Assert.AreEqual(false, agent1.IsDone());
Assert.AreEqual(false, agent2.IsDone());

var agentEnableMethod = typeof(Agent).GetMethod("OnEnableHelper",
BindingFlags.Instance | BindingFlags.NonPublic);
var academyInitializeMethod = typeof(Academy).GetMethod("InitializeEnvironment",
BindingFlags.Instance | BindingFlags.NonPublic);
agentEnableMethod?.Invoke(agent2, new object[] { aca });
academyInitializeMethod?.Invoke(aca, new object[] { });
agentEnableMethod?.Invoke(agent1, new object[] { aca });
agentEnableMethod?.Invoke(agent2, new object[] { });
agentEnableMethod?.Invoke(agent1, new object[] { });
Assert.AreEqual(false, agent1.IsDone());
Assert.AreEqual(false, agent2.IsDone());

}
}
[TestFixture]
[SetUp]
public void SetUp()
{
if (Academy.IsInitialized)
{
Academy.Instance.Dispose();
}
}
var acaGo = new GameObject("TestAcademy");
acaGo.AddComponent<Academy>();
var aca = acaGo.GetComponent<Academy>();
var academyInitializeMethod = typeof(Academy).GetMethod("InitializeEnvironment",
BindingFlags.Instance | BindingFlags.NonPublic);
academyInitializeMethod?.Invoke(aca, new object[] { });
var academyStepMethod = typeof(Academy).GetMethod("EnvironmentStep",
BindingFlags.Instance | BindingFlags.NonPublic);
var aca = Academy.Instance;
var numberReset = 0;
for (var i = 0; i < 10; i++)

{
numberReset += 1;
}
academyStepMethod?.Invoke(aca, new object[] { });
Academy.Instance.EnvironmentStep();
public void TestAcademyAutostep()
{
var aca = Academy.Instance;
Assert.IsTrue(aca.IsAutomaticSteppingEnabled);
aca.DisableAutomaticStepping(true);
Assert.IsFalse(aca.IsAutomaticSteppingEnabled);
aca.EnableAutomaticStepping();
Assert.IsTrue(aca.IsAutomaticSteppingEnabled);
}
[Test]
public void TestAgent()
{
var agentGo1 = new GameObject("TestAgent");

agentGo2.AddComponent<TestAgent>();
var agent2 = agentGo2.GetComponent<TestAgent>();
var acaGo = new GameObject("TestAcademy");
acaGo.AddComponent<Academy>();
var aca = acaGo.GetComponent<Academy>();
var aca = Academy.Instance;
var academyInitializeMethod = typeof(Academy).GetMethod(
"InitializeEnvironment", BindingFlags.Instance | BindingFlags.NonPublic);
agent1.agentParameters = new AgentParameters();
agent2.agentParameters = new AgentParameters();

agent2.agentParameters.onDemandDecision = true;
// agent2 will request decisions only when RequestDecision is called
agentEnableMethod?.Invoke(agent1, new object[] { aca });
academyInitializeMethod?.Invoke(aca, new object[] { });
var academyStepMethod = typeof(Academy).GetMethod(
"EnvironmentStep", BindingFlags.Instance | BindingFlags.NonPublic);
agentEnableMethod?.Invoke(agent1, new object[] { });
var numberAgent1Reset = 0;
var numberAgent2Initialization = 0;

//Agent 2 is only initialized at step 2
if (i == 2)
{
agentEnableMethod?.Invoke(agent2, new object[] { aca });
agentEnableMethod?.Invoke(agent2, new object[] { });
numberAgent2Initialization += 1;
}

requestAction += 1;
agent2.RequestAction();
}
academyStepMethod?.Invoke(aca, new object[] { });
aca.EnvironmentStep();
[TestFixture]
[SetUp]
public void SetUp()
{
if (Academy.IsInitialized)
{
Academy.Instance.Dispose();
}
}
var acaGo = new GameObject("TestAcademy");
acaGo.AddComponent<Academy>();
var aca = acaGo.GetComponent<Academy>();
var academyInitializeMethod = typeof(Academy).GetMethod(
"InitializeEnvironment", BindingFlags.Instance | BindingFlags.NonPublic);
academyInitializeMethod?.Invoke(aca, new object[] { });
var academyStepMethod = typeof(Academy).GetMethod(
"EnvironmentStep", BindingFlags.Instance | BindingFlags.NonPublic);
var aca = Academy.Instance;
var numberReset = 0;
var stepsSinceReset = 0;

}
stepsSinceReset += 1;
academyStepMethod.Invoke(aca, new object[] { });
aca.EnvironmentStep();
}
}

var agentGo2 = new GameObject("TestAgent");
agentGo2.AddComponent<TestAgent>();
var agent2 = agentGo2.GetComponent<TestAgent>();
var acaGo = new GameObject("TestAcademy");
acaGo.AddComponent<Academy>();
var aca = acaGo.GetComponent<Academy>();
var aca = Academy.Instance;
var academyInitializeMethod = typeof(Academy).GetMethod(
"InitializeEnvironment", BindingFlags.Instance | BindingFlags.NonPublic);
var academyStepMethod = typeof(Academy).GetMethod(
"EnvironmentStep", BindingFlags.Instance | BindingFlags.NonPublic);
agent1.agentParameters = new AgentParameters();
agent2.agentParameters = new AgentParameters();

// agent1 will take an action at every step and request a decision every 2 steps
agent2.agentParameters.onDemandDecision = true;
agentEnableMethod?.Invoke(agent2, new object[] { aca });
academyInitializeMethod?.Invoke(aca, new object[] { });
agentEnableMethod?.Invoke(agent2, new object[] { });
var numberAgent1Reset = 0;
var numberAgent2Reset = 0;

//Agent 1 is only initialized at step 2
if (i == 2)
{
agentEnableMethod?.Invoke(agent1, new object[] { aca });
agentEnableMethod?.Invoke(agent1, new object[] { });
}
// Set agent 1 to done every 11 steps to test behavior
if (i % 11 == 5)

//Agent 1 is only initialized at step 2
if (i < 2)
{ }
academyStepMethod?.Invoke(aca, new object[] { });
aca.EnvironmentStep();
[TestFixture]
[SetUp]
public void SetUp()
{
if (Academy.IsInitialized)
{
Academy.Instance.Dispose();
}
}
[Test]
public void TestResetOnDone()
{

var agentGo2 = new GameObject("TestAgent");
agentGo2.AddComponent<TestAgent>();
var agent2 = agentGo2.GetComponent<TestAgent>();
var acaGo = new GameObject("TestAcademy");
acaGo.AddComponent<Academy>();
var aca = acaGo.GetComponent<Academy>();
var aca = Academy.Instance;
var academyInitializeMethod = typeof(Academy).GetMethod(
"InitializeEnvironment", BindingFlags.Instance | BindingFlags.NonPublic);
var academyStepMethod = typeof(Academy).GetMethod(
"EnvironmentStep", BindingFlags.Instance | BindingFlags.NonPublic);
agent1.agentParameters = new AgentParameters();
agent2.agentParameters = new AgentParameters();

agent1.agentParameters.resetOnDone = false;
agent2.agentParameters.resetOnDone = false;
agentEnableMethod?.Invoke(agent2, new object[] { aca });
academyInitializeMethod?.Invoke(aca, new object[] { });
agentEnableMethod?.Invoke(agent1, new object[] { aca });
agentEnableMethod?.Invoke(agent2, new object[] { });
agentEnableMethod?.Invoke(agent1, new object[] { });
var agent1ResetOnDone = 0;
var agent2ResetOnDone = 0;

agent2.Done();
}
academyStepMethod?.Invoke(aca, new object[] { });
aca.EnvironmentStep();
}
}

var agentGo2 = new GameObject("TestAgent");
agentGo2.AddComponent<TestAgent>();
var agent2 = agentGo2.GetComponent<TestAgent>();
var acaGo = new GameObject("TestAcademy");
acaGo.AddComponent<Academy>();
var aca = acaGo.GetComponent<Academy>();
var aca = Academy.Instance;
var academyInitializeMethod = typeof(Academy).GetMethod(
"InitializeEnvironment", BindingFlags.Instance | BindingFlags.NonPublic);
var academyStepMethod = typeof(Academy).GetMethod(
"EnvironmentStep", BindingFlags.Instance | BindingFlags.NonPublic);
agent1.agentParameters = new AgentParameters();
agent2.agentParameters = new AgentParameters();
// We use event based so the agent will now try to send anything to the brain

// agent2 will request decisions only when RequestDecision is called
agent1.agentParameters.maxStep = 20;
agentEnableMethod?.Invoke(agent2, new object[] { aca });
academyInitializeMethod?.Invoke(aca, new object[] { });
agentEnableMethod?.Invoke(agent1, new object[] { aca });
agentEnableMethod?.Invoke(agent2, new object[] { });
agentEnableMethod?.Invoke(agent1, new object[] { });
var j = 0;

Assert.LessOrEqual(Mathf.Abs(i * 0.1f - agent2.GetCumulativeReward()), 0.05f);
academyStepMethod?.Invoke(aca, new object[] { });
aca.EnvironmentStep();
agent1.AddReward(10f);
if ((i % 21 == 0) && (i > 0))

2
UnitySDK/Assets/ML-Agents/Editor/Tests/Sensor/WriterAdapterTests.cs


data = new Tensor(2, 2, 2, 3)
};
var shape = new[] { 2, 2, 3 };
writer.SetTarget(t, 0, 0);
writer[1, 0, 1] = 1f;
Assert.AreEqual(1f, t.data[0, 1, 0, 1]);

16
UnitySDK/Assets/ML-Agents/Examples/3DBall/Scenes/3DBall.unity


serializedVersion: 6
m_Component:
- component: {fileID: 1583402088}
- component: {fileID: 1583402089}
m_Name: Ball3DAcademy
m_Name: Ball3DSettings
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

m_Father: {fileID: 0}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1583402089
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1583402087}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b1fc0029fee784d9cb9854f8912bfd07, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &1583402090
MonoBehaviour:
m_ObjectHideFlags: 0

m_Name:
m_EditorClassIdentifier:
gravityMultiplier: 1
monitorVerticalOffset: 0
fixedDeltaTime: 0.02
maximumDeltaTime: 0.33333334
solverIterations: 6

533
UnitySDK/Assets/ML-Agents/Examples/3DBall/Scenes/3DBallHard.unity


--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 8
serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3

m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.44971162, g: 0.49977726, b: 0.5756362, a: 1}
m_IndirectSpecularColor: {r: 0.4497121, g: 0.49977785, b: 0.57563704, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0

m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_TemporalCoherenceThreshold: 1
serializedVersion: 9
serializedVersion: 10
m_TextureWidth: 1024
m_TextureHeight: 1024
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1

m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1001 &83714371
Prefab:
PrefabInstance:
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 1753668517859216, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
propertyPath: m_Name
value: 3DBallHardPlatformNew (10)
objectReference: {fileID: 0}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 1753668517859216, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
propertyPath: m_Name
value: 3DBallHardPlatformNew (10)
objectReference: {fileID: 0}
m_ParentPrefab: {fileID: 100100000, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
m_IsPrefabParent: 0
m_SourcePrefab: {fileID: 100100000, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
Prefab:
PrefabInstance:
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 1753668517859216, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
propertyPath: m_Name
value: 3DBallHardPlatformNew (7)
objectReference: {fileID: 0}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 1753668517859216, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
propertyPath: m_Name
value: 3DBallHardPlatformNew (7)
objectReference: {fileID: 0}
m_ParentPrefab: {fileID: 100100000, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
m_IsPrefabParent: 0
m_SourcePrefab: {fileID: 100100000, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
Prefab:
PrefabInstance:
- target: {fileID: 1537641056927260, guid: 3ce107b4a79bc4eef83afde434932a68, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
type: 2}
type: 3}
type: 2}
type: 3}
type: 2}
type: 3}
type: 2}
type: 3}
type: 2}
type: 3}
type: 2}
type: 3}
type: 2}
type: 3}
type: 2}
type: 3}
type: 2}
type: 3}
type: 2}
type: 3}
type: 2}
type: 3}
type: 2}
type: 3}
type: 2}
type: 3}
type: 2}
type: 3}
type: 2}
type: 3}
type: 2}
type: 3}
type: 2}
type: 3}
type: 2}
type: 3}
- target: {fileID: 1537641056927260, guid: 3ce107b4a79bc4eef83afde434932a68, type: 2}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
m_ParentPrefab: {fileID: 100100000, guid: 3ce107b4a79bc4eef83afde434932a68, type: 2}
m_IsPrefabParent: 0
m_SourcePrefab: {fileID: 100100000, guid: 3ce107b4a79bc4eef83afde434932a68, type: 3}
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 807556627}
- component: {fileID: 807556626}

--- !u!81 &807556623
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_projectionMatrixMode: 1
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_GateFitMode: 2
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0

--- !u!4 &807556627
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 807556622}
m_LocalRotation: {x: 0.13052616, y: 0, z: 0, w: 0.9914449}
m_LocalPosition: {x: 4.5, y: 15, z: -45}

m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 15, y: 0, z: 0}
--- !u!1001 &1039166859
Prefab:
PrefabInstance:
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 1753668517859216, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
propertyPath: m_Name
value: 3DBallHardPlatformNew (9)
objectReference: {fileID: 0}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 1753668517859216, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
propertyPath: m_Name
value: 3DBallHardPlatformNew (9)
objectReference: {fileID: 0}
m_ParentPrefab: {fileID: 100100000, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
m_IsPrefabParent: 0
m_SourcePrefab: {fileID: 100100000, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
Prefab:
PrefabInstance:
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 1753668517859216, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
propertyPath: m_Name
value: 3DBallHardPlatformNew (1)
objectReference: {fileID: 0}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
objectReference: {fileID: 0}
- target: {fileID: 1753668517859216, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
propertyPath: m_Name
value: 3DBallHardPlatformNew (1)
m_ParentPrefab: {fileID: 100100000, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
m_IsPrefabParent: 0
m_SourcePrefab: {fileID: 100100000, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
Prefab:
PrefabInstance:
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 1753668517859216, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
propertyPath: m_Name
value: 3DBallHardPlatformNew (2)
objectReference: {fileID: 0}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
objectReference: {fileID: 0}
- target: {fileID: 1753668517859216, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
propertyPath: m_Name
value: 3DBallHardPlatformNew (2)
m_ParentPrefab: {fileID: 100100000, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
m_IsPrefabParent: 0
m_SourcePrefab: {fileID: 100100000, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
Prefab:
PrefabInstance:
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 1753668517859216, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
propertyPath: m_Name
value: 3DBallHardPlatformNew (8)
objectReference: {fileID: 0}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 1753668517859216, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
propertyPath: m_Name
value: 3DBallHardPlatformNew (8)
objectReference: {fileID: 0}
m_ParentPrefab: {fileID: 100100000, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
m_IsPrefabParent: 0
m_SourcePrefab: {fileID: 100100000, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
Prefab:
PrefabInstance:
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 1753668517859216, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
propertyPath: m_Name
value: 3DBallHardPlatformNew (5)
objectReference: {fileID: 0}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 1753668517859216, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
propertyPath: m_Name
value: 3DBallHardPlatformNew (5)
objectReference: {fileID: 0}
m_ParentPrefab: {fileID: 100100000, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
m_IsPrefabParent: 0
m_SourcePrefab: {fileID: 100100000, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
m_PrefabParentObject: {fileID: 1408885610532680, guid: 00a1ebe742cf2394d8c21484e3a02412,
m_CorrespondingSourceObject: {fileID: 1408885610532680, guid: 00a1ebe742cf2394d8c21484e3a02412,
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Name: Ball3DHardAcademy
m_Name: Ball3DHardSettings
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 4673284961943764, guid: 00a1ebe742cf2394d8c21484e3a02412,
m_CorrespondingSourceObject: {fileID: 4673284961943764, guid: 00a1ebe742cf2394d8c21484e3a02412,
m_PrefabInternal: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1583402087}
m_LocalRotation: {x: -0.069583125, y: 0.0049145464, z: 0.0702813, w: 0.99508524}
m_LocalPosition: {x: 0, y: 0, z: 0}

--- !u!114 &1583402089
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 114659680214172868, guid: 00a1ebe742cf2394d8c21484e3a02412,
type: 2}
m_PrefabInternal: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Script: {fileID: 11500000, guid: eb15e3c3d55e54abaafb74c635b6a458, type: 3}
m_Script: {fileID: 11500000, guid: ec51f47c5ed0478080c449c74fd9c154, type: 3}
broadcastHub:
brainsToControl:
- {fileID: 11400000, guid: 4f74e089fbb75455ebf6f0495e30be6e, type: 2}
m_TrainingConfiguration:
width: 300
height: 200
qualityLevel: 0
timeScale: 20
targetFrameRate: 60
m_InferenceConfiguration:
width: 1280
height: 720
qualityLevel: 5
timeScale: 1
targetFrameRate: -1
resetParameters:
m_ResetParameters:
- key: mass
value: 1
- key: gravity
value: 9.81
- key: scale
value: 1
gravityMultiplier: 1
monitorVerticalOffset: 0
fixedDeltaTime: 0.02
maximumDeltaTime: 0.33333334
solverIterations: 6
solverVelocityIterations: 1
Prefab:
PrefabInstance:
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 1753668517859216, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
propertyPath: m_Name
value: 3DBallHardPlatformNew (4)
objectReference: {fileID: 0}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 1753668517859216, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
propertyPath: m_Name
value: 3DBallHardPlatformNew (4)
objectReference: {fileID: 0}
m_ParentPrefab: {fileID: 100100000, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
m_IsPrefabParent: 0
m_SourcePrefab: {fileID: 100100000, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
Prefab:
PrefabInstance:
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 1753668517859216, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
propertyPath: m_Name
value: 3DBallHardPlatformNew (6)
objectReference: {fileID: 0}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 1753668517859216, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
propertyPath: m_Name
value: 3DBallHardPlatformNew (6)
objectReference: {fileID: 0}
m_ParentPrefab: {fileID: 100100000, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
m_IsPrefabParent: 0
m_SourcePrefab: {fileID: 100100000, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
Prefab:
PrefabInstance:
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 1753668517859216, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
propertyPath: m_Name
value: 3DBallHardPlatformNew (11)
objectReference: {fileID: 0}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 1753668517859216, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
propertyPath: m_Name
value: 3DBallHardPlatformNew (11)
objectReference: {fileID: 0}
m_ParentPrefab: {fileID: 100100000, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
m_IsPrefabParent: 0
m_SourcePrefab: {fileID: 100100000, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1746325442}
- component: {fileID: 1746325441}

--- !u!114 &1746325440
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1746325439}
m_Enabled: 1
m_EditorHideFlags: 0

--- !u!114 &1746325441
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1746325439}
m_Enabled: 1
m_EditorHideFlags: 0

--- !u!4 &1746325442
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1746325439}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}

m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1862302804
Prefab:
PrefabInstance:
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 1753668517859216, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
propertyPath: m_Name
value: 3DBallHardPlatformNew (3)
objectReference: {fileID: 0}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 1753668517859216, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
propertyPath: m_Name
value: 3DBallHardPlatformNew (3)
objectReference: {fileID: 0}
m_ParentPrefab: {fileID: 100100000, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
m_IsPrefabParent: 0
m_SourcePrefab: {fileID: 100100000, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
Prefab:
PrefabInstance:
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 2}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 3}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 2}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 3}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 2}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 3}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 2}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 3}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 2}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 3}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 2}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 3}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 2}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 3}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 2}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 3}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 2}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 3}
m_ParentPrefab: {fileID: 100100000, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 2}
m_IsPrefabParent: 0
m_SourcePrefab: {fileID: 100100000, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 3}
Prefab:
PrefabInstance:
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
- target: {fileID: 4133146672945188, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}
m_ParentPrefab: {fileID: 100100000, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 2}
m_IsPrefabParent: 0
m_SourcePrefab: {fileID: 100100000, guid: 0d8ebd51939eb45c88531e9d444bca28, type: 3}

3
UnitySDK/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DAgent.cs


public override void InitializeAgent()
{
m_BallRb = ball.GetComponent<Rigidbody>();
var academy = FindObjectOfType<Academy>();
m_ResetParams = academy.FloatProperties;
m_ResetParams = Academy.Instance.FloatProperties;
SetResetParameters();
}

3
UnitySDK/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DHardAgent.cs


public override void InitializeAgent()
{
m_BallRb = ball.GetComponent<Rigidbody>();
var academy = FindObjectOfType<Academy>();
m_ResetParams = academy.FloatProperties;
m_ResetParams = Academy.Instance.FloatProperties;
SetResetParameters();
}

94
UnitySDK/Assets/ML-Agents/Examples/Basic/Scenes/Basic.unity


- target: {fileID: 224194346362733190, guid: 3ce107b4a79bc4eef83afde434932a68,
type: 3}
propertyPath: m_RootOrder
value: 4
value: 3
objectReference: {fileID: 0}
- target: {fileID: 224194346362733190, guid: 3ce107b4a79bc4eef83afde434932a68,
type: 3}

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 3ce107b4a79bc4eef83afde434932a68, type: 3}
--- !u!1 &1574236047
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1574236049}
- component: {fileID: 1574236048}
m_Layer: 0
m_Name: Academy
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1574236048
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1574236047}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b1fc0029fee784d9cb9854f8912bfd07, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &1574236049
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1574236047}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.71938086, y: 0.27357092, z: 4.1970553}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1715640920
GameObject:
m_ObjectHideFlags: 0

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: c5eb289873aca4f5a8cc59c7464ab7c1, type: 3}
--- !u!1 &1889211226
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1889211228}
- component: {fileID: 1889211227}
m_Layer: 0
m_Name: BasicSettings
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1889211227
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1889211226}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ec51f47c5ed0478080c449c74fd9c154, type: 3}
m_Name:
m_EditorClassIdentifier:
gravityMultiplier: 1
monitorVerticalOffset: 0
fixedDeltaTime: 0.02
maximumDeltaTime: 0.33333334
solverIterations: 6
solverVelocityIterations: 1
--- !u!4 &1889211228
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1889211226}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

4
UnitySDK/Assets/ML-Agents/Examples/Basic/Scripts/BasicAgent.cs


public class BasicAgent : Agent
{
[Header("Specific to Basic")]
Academy m_Academy;
public float timeBetweenDecisionsAtInference;
float m_TimeSinceDecision;
int m_Position;

public override void InitializeAgent()
{
m_Academy = FindObjectOfType(typeof(Academy)) as Academy;
}
public override void CollectObservations()

void WaitTimeInference()
{
if (!m_Academy.IsCommunicatorOn)
if (!Academy.Instance.IsCommunicatorOn)
{
RequestDecision();
}

16
UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scenes/Bouncer.unity


serializedVersion: 6
m_Component:
- component: {fileID: 1453982295}
- component: {fileID: 1453982296}
m_Name: Academy
m_Name: BouncerSettings
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

m_Name:
m_EditorClassIdentifier:
gravityMultiplier: 2
monitorVerticalOffset: 0
fixedDeltaTime: 0.02
maximumDeltaTime: 0.33333334
solverIterations: 6

m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1453982296
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1453982293}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b1fc0029fee784d9cb9854f8912bfd07, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &1526996927
PrefabInstance:
m_ObjectHideFlags: 0

3
UnitySDK/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerAgent.cs


m_Rb = gameObject.GetComponent<Rigidbody>();
m_LookDir = Vector3.zero;
var academy = FindObjectOfType<Academy>();
m_ResetParams = academy.FloatProperties;
m_ResetParams = Academy.Instance.FloatProperties;
SetResetParameters();
}

17
UnitySDK/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerDynamicTarget.unity


m_Component:
- component: {fileID: 2095421679}
- component: {fileID: 2095421681}
- component: {fileID: 2095421682}
m_Name: Academy
m_Name: CrawlerSettings
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

m_Script: {fileID: 11500000, guid: ec51f47c5ed0478080c449c74fd9c154, type: 3}
m_Name:
m_EditorClassIdentifier:
monitorVerticalOffset: 1
monitorVerticalOffset: 1
fixedDeltaTime: 0.01333
maximumDeltaTime: 0.15
solverIterations: 12

m_Script: {fileID: 11500000, guid: 3d6f3eab3776b4fb79724ac4216dfd7b, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &2095421682
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2095421678}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b1fc0029fee784d9cb9854f8912bfd07, type: 3}
m_Name:
m_EditorClassIdentifier:

17
UnitySDK/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerStaticTarget.unity


serializedVersion: 6
m_Component:
- component: {fileID: 2095421679}
- component: {fileID: 2095421681}
m_Name: Academy
m_Name: CrawlerSettings
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

m_Script: {fileID: 11500000, guid: ec51f47c5ed0478080c449c74fd9c154, type: 3}
m_Name:
m_EditorClassIdentifier:
monitorVerticalOffset: 1
monitorVerticalOffset: 1
--- !u!114 &2095421681
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2095421678}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b1fc0029fee784d9cb9854f8912bfd07, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &2129505181
PrefabInstance:
m_ObjectHideFlags: 0

15
UnitySDK/Assets/ML-Agents/Examples/FoodCollector/Scenes/FoodCollector.unity


serializedVersion: 6
m_Component:
- component: {fileID: 1574236049}
- component: {fileID: 1574236051}
m_Name: Academy
m_Name: FoodCollectorSettings
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1574236051
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1574236047}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b1fc0029fee784d9cb9854f8912bfd07, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1799584680
GameObject:
m_ObjectHideFlags: 0

15
UnitySDK/Assets/ML-Agents/Examples/FoodCollector/Scenes/VisualFoodCollector.unity


serializedVersion: 6
m_Component:
- component: {fileID: 1574236049}
- component: {fileID: 1574236050}
m_Name: Academy
m_Name: FoodCollectorSettings
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

m_Father: {fileID: 0}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1574236050
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1574236047}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b1fc0029fee784d9cb9854f8912bfd07, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1799584680
GameObject:
m_ObjectHideFlags: 0

6
UnitySDK/Assets/ML-Agents/Examples/FoodCollector/Scripts/FoodCollectorAgent.cs


public class FoodCollectorAgent : Agent
{
FoodCollectorSettings m_FoodCollecterSettings;
Academy m_Academy;
public GameObject area;
FoodCollectorArea m_MyArea;
bool m_Frozen;

Monitor.verticalOffset = 1f;
m_MyArea = area.GetComponent<FoodCollectorArea>();
m_FoodCollecterSettings = FindObjectOfType<FoodCollectorSettings>();
m_Academy = FindObjectOfType<Academy>();
SetResetParameters();
}

public void SetLaserLengths()
{
m_LaserLength = m_Academy.FloatProperties.GetPropertyWithDefault("laser_length", 1.0f);
m_LaserLength = Academy.Instance.FloatProperties.GetPropertyWithDefault("laser_length", 1.0f);
float agentScale = m_Academy.FloatProperties.GetPropertyWithDefault("agent_scale", 1.0f);
float agentScale = Academy.Instance.FloatProperties.GetPropertyWithDefault("agent_scale", 1.0f);
gameObject.transform.localScale = new Vector3(agentScale, agentScale, agentScale);
}

4
UnitySDK/Assets/ML-Agents/Examples/FoodCollector/Scripts/FoodCollectorSettings.cs


public void Awake()
{
var academy = FindObjectOfType<Academy>();
academy.LazyInitialization();
academy.OnEnvironmentReset += EnvironmentReset;
Academy.Instance.OnEnvironmentReset += EnvironmentReset;
}
public void EnvironmentReset()

15
UnitySDK/Assets/ML-Agents/Examples/GridWorld/Scenes/GridWorld.unity


serializedVersion: 6
m_Component:
- component: {fileID: 2047664}
- component: {fileID: 2047665}
m_Name: GridAcademy
m_Name: GridSettings
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

m_Father: {fileID: 0}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2047665
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2047662}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b1fc0029fee784d9cb9854f8912bfd07, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &99095112
GameObject:
m_ObjectHideFlags: 0

6
UnitySDK/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs


public class GridAgent : Agent
{
Academy m_Academy;
[FormerlySerializedAs("m_Area")]
[Header("Specific to GridWorld")]
public GridArea area;

public override void InitializeAgent()
{
m_Academy = FindObjectOfType<Academy>();
}
public override void CollectObservations()

// Prevents the agent from picking an action that would make it collide with a wall
var positionX = (int)transform.position.x;
var positionZ = (int)transform.position.z;
var maxPosition = (int)m_Academy.FloatProperties.GetPropertyWithDefault("gridSize", 5f) - 1;
var maxPosition = (int)Academy.Instance.FloatProperties.GetPropertyWithDefault("gridSize", 5f) - 1;
if (positionX == 0)
{

renderCamera.Render();
}
if (m_Academy.IsCommunicatorOn)
if (Academy.Instance.IsCommunicatorOn)
{
RequestDecision();
}

2
UnitySDK/Assets/ML-Agents/Examples/GridWorld/Scripts/GridArea.cs


public void Start()
{
m_ResetParameters = FindObjectOfType<Academy>().FloatProperties;
m_ResetParameters = Academy.Instance.FloatProperties;
m_Objects = new[] { goalPref, pitPref };

4
UnitySDK/Assets/ML-Agents/Examples/GridWorld/Scripts/GridSettings.cs


public void Awake()
{
var academy = FindObjectOfType<Academy>();
academy.LazyInitialization();
academy.FloatProperties.RegisterCallback("gridSize", f =>
Academy.Instance.FloatProperties.RegisterCallback("gridSize", f =>
{
MainCamera.transform.position = new Vector3(-(f - 1) / 2f, f * 1.25f, -(f - 1) / 2f);
MainCamera.orthographicSize = (f + 5f) / 2f;

17
UnitySDK/Assets/ML-Agents/Examples/Hallway/Scenes/Hallway.unity


serializedVersion: 6
m_Component:
- component: {fileID: 1574236049}
- component: {fileID: 1574236052}
m_Name: Academy
m_Name: HallwaySettings
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

m_Script: {fileID: 11500000, guid: ec51f47c5ed0478080c449c74fd9c154, type: 3}
m_Name:
m_EditorClassIdentifier:
monitorVerticalOffset: 0
monitorVerticalOffset: 0
fixedDeltaTime: 0.02
maximumDeltaTime: 0.33333334
solverIterations: 6

agentRotationSpeed: 1
goalScoredMaterial: {fileID: 2100000, guid: df32cc593804f42df97464dc455057b8, type: 2}
failMaterial: {fileID: 2100000, guid: a1daf31cdf41e484ca9ac33a5c6f524a, type: 2}
--- !u!114 &1574236052
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1574236047}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b1fc0029fee784d9cb9854f8912bfd07, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &1781369655
PrefabInstance:
m_ObjectHideFlags: 0

17
UnitySDK/Assets/ML-Agents/Examples/Hallway/Scenes/VisualHallway.unity


serializedVersion: 6
m_Component:
- component: {fileID: 1574236049}
- component: {fileID: 1574236052}
m_Name: Academy
m_Name: VisualHallwaySettings
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

m_Script: {fileID: 11500000, guid: ec51f47c5ed0478080c449c74fd9c154, type: 3}
m_Name:
m_EditorClassIdentifier:
monitorVerticalOffset: 0
monitorVerticalOffset: 0
fixedDeltaTime: 0.02
maximumDeltaTime: 0.33333334
solverIterations: 6

agentRotationSpeed: 1
goalScoredMaterial: {fileID: 2100000, guid: df32cc593804f42df97464dc455057b8, type: 2}
failMaterial: {fileID: 2100000, guid: a1daf31cdf41e484ca9ac33a5c6f524a, type: 2}
--- !u!114 &1574236052
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1574236047}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b1fc0029fee784d9cb9854f8912bfd07, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &1746153506
PrefabInstance:
m_ObjectHideFlags: 0

17
UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scenes/PushBlock.unity


serializedVersion: 6
m_Component:
- component: {fileID: 1574236049}
- component: {fileID: 1574236051}
m_Name: Academy
m_Name: PushBlockSettings
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

m_Script: {fileID: 11500000, guid: ec51f47c5ed0478080c449c74fd9c154, type: 3}
m_Name:
m_EditorClassIdentifier:
monitorVerticalOffset: 0
monitorVerticalOffset: 0
fixedDeltaTime: 0.02
maximumDeltaTime: 0.33333334
solverIterations: 6

spawnAreaMarginMultiplier: 0.5
goalScoredMaterial: {fileID: 2100000, guid: df32cc593804f42df97464dc455057b8, type: 2}
failMaterial: {fileID: 2100000, guid: a1daf31cdf41e484ca9ac33a5c6f524a, type: 2}
--- !u!114 &1574236051
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1574236047}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b1fc0029fee784d9cb9854f8912bfd07, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &1646905052
PrefabInstance:
m_ObjectHideFlags: 0

17
UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scenes/VisualPushBlock.unity


serializedVersion: 6
m_Component:
- component: {fileID: 1574236049}
- component: {fileID: 1574236051}
m_Name: Academy
m_Name: PushBlockSettings
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

m_Script: {fileID: 11500000, guid: ec51f47c5ed0478080c449c74fd9c154, type: 3}
m_Name:
m_EditorClassIdentifier:
monitorVerticalOffset: 0
monitorVerticalOffset: 0
fixedDeltaTime: 0.02
maximumDeltaTime: 0.33333334
solverIterations: 6

spawnAreaMarginMultiplier: 0.5
goalScoredMaterial: {fileID: 2100000, guid: df32cc593804f42df97464dc455057b8, type: 2}
failMaterial: {fileID: 2100000, guid: a1daf31cdf41e484ca9ac33a5c6f524a, type: 2}
--- !u!114 &1574236051
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1574236047}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b1fc0029fee784d9cb9854f8912bfd07, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &1878756099
PrefabInstance:
m_ObjectHideFlags: 0

6
UnitySDK/Assets/ML-Agents/Examples/PushBlock/Scripts/PushAgentBasic.cs


public Bounds areaBounds;
PushBlockSettings m_PushBlockSettings;
Academy m_Academy;
/// <summary>
/// The goal to push the block to.

void Awake()
{
m_Academy = FindObjectOfType<Academy>(); //cache the academy
m_PushBlockSettings = FindObjectOfType<PushBlockSettings>();
}

public void SetGroundMaterialFriction()
{
var resetParams = m_Academy.FloatProperties;
var resetParams = Academy.Instance.FloatProperties;
var groundCollider = ground.GetComponent<Collider>();

public void SetBlockProperties()
{
var resetParams = m_Academy.FloatProperties;
var resetParams = Academy.Instance.FloatProperties;
var scale = resetParams.GetPropertyWithDefault("block_scale", 2);
//Set the scale of the block

81
UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scenes/Pyramids.unity


objectReference: {fileID: 0}
- target: {fileID: 4603070702628152, guid: bd804431e808a492bb5658bcd296e58e, type: 3}
propertyPath: m_RootOrder
value: 17
value: 16
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: bd804431e808a492bb5658bcd296e58e, type: 3}

objectReference: {fileID: 0}
- target: {fileID: 4603070702628152, guid: bd804431e808a492bb5658bcd296e58e, type: 3}
propertyPath: m_RootOrder
value: 13
value: 12
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: bd804431e808a492bb5658bcd296e58e, type: 3}

- target: {fileID: 224194346362733190, guid: 3ce107b4a79bc4eef83afde434932a68,
type: 3}
propertyPath: m_RootOrder
value: 20
value: 19
objectReference: {fileID: 0}
- target: {fileID: 224194346362733190, guid: 3ce107b4a79bc4eef83afde434932a68,
type: 3}

objectReference: {fileID: 0}
- target: {fileID: 4603070702628152, guid: bd804431e808a492bb5658bcd296e58e, type: 3}
propertyPath: m_RootOrder
value: 6
value: 5
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: bd804431e808a492bb5658bcd296e58e, type: 3}

objectReference: {fileID: 0}
- target: {fileID: 4603070702628152, guid: bd804431e808a492bb5658bcd296e58e, type: 3}
propertyPath: m_RootOrder
value: 5
value: 4
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: bd804431e808a492bb5658bcd296e58e, type: 3}

objectReference: {fileID: 0}
- target: {fileID: 4603070702628152, guid: bd804431e808a492bb5658bcd296e58e, type: 3}
propertyPath: m_RootOrder
value: 8
value: 7
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: bd804431e808a492bb5658bcd296e58e, type: 3}

objectReference: {fileID: 0}
- target: {fileID: 4603070702628152, guid: bd804431e808a492bb5658bcd296e58e, type: 3}
propertyPath: m_RootOrder
value: 18
value: 17
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: bd804431e808a492bb5658bcd296e58e, type: 3}

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &520016803
PrefabInstance:

objectReference: {fileID: 0}
- target: {fileID: 4603070702628152, guid: bd804431e808a492bb5658bcd296e58e, type: 3}
propertyPath: m_RootOrder
value: 10
value: 9
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: bd804431e808a492bb5658bcd296e58e, type: 3}

objectReference: {fileID: 0}
- target: {fileID: 4603070702628152, guid: bd804431e808a492bb5658bcd296e58e, type: 3}
propertyPath: m_RootOrder
value: 16
value: 15
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: bd804431e808a492bb5658bcd296e58e, type: 3}

objectReference: {fileID: 0}
- target: {fileID: 4603070702628152, guid: bd804431e808a492bb5658bcd296e58e, type: 3}
propertyPath: m_RootOrder
value: 12
value: 11
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: bd804431e808a492bb5658bcd296e58e, type: 3}

objectReference: {fileID: 0}
- target: {fileID: 4603070702628152, guid: bd804431e808a492bb5658bcd296e58e, type: 3}
propertyPath: m_RootOrder
value: 7
value: 6
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: bd804431e808a492bb5658bcd296e58e, type: 3}

objectReference: {fileID: 0}
- target: {fileID: 4603070702628152, guid: bd804431e808a492bb5658bcd296e58e, type: 3}
propertyPath: m_RootOrder
value: 14
value: 13
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: bd804431e808a492bb5658bcd296e58e, type: 3}

objectReference: {fileID: 0}
- target: {fileID: 4943719350691982, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 3}
propertyPath: m_RootOrder
value: 2
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 5889392e3f05b448a8a06c5def6c2dec, type: 3}

objectReference: {fileID: 0}
- target: {fileID: 4603070702628152, guid: bd804431e808a492bb5658bcd296e58e, type: 3}
propertyPath: m_RootOrder
value: 9
value: 8
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: bd804431e808a492bb5658bcd296e58e, type: 3}

objectReference: {fileID: 0}
- target: {fileID: 4603070702628152, guid: bd804431e808a492bb5658bcd296e58e, type: 3}
propertyPath: m_RootOrder
value: 15
value: 14
--- !u!1 &1574236047
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1574236049}
- component: {fileID: 1574236048}
m_Layer: 0
m_Name: Academy
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1574236048
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1574236047}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b1fc0029fee784d9cb9854f8912bfd07, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &1574236049
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1574236047}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.71938086, y: 0.27357092, z: 4.1970553}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1613855850
PrefabInstance:
m_ObjectHideFlags: 0

objectReference: {fileID: 0}
- target: {fileID: 4603070702628152, guid: bd804431e808a492bb5658bcd296e58e, type: 3}
propertyPath: m_RootOrder
value: 19
value: 18
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: bd804431e808a492bb5658bcd296e58e, type: 3}

objectReference: {fileID: 0}
- target: {fileID: 4603070702628152, guid: bd804431e808a492bb5658bcd296e58e, type: 3}
propertyPath: m_RootOrder
value: 11
value: 10
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: bd804431e808a492bb5658bcd296e58e, type: 3}

objectReference: {fileID: 0}
- target: {fileID: 4603070702628152, guid: bd804431e808a492bb5658bcd296e58e, type: 3}
propertyPath: m_RootOrder
value: 4
value: 3
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: bd804431e808a492bb5658bcd296e58e, type: 3}

61
UnitySDK/Assets/ML-Agents/Examples/Pyramids/Scenes/VisualPyramids.unity


objectReference: {fileID: 0}
- target: {fileID: 4502082515322846, guid: 0567215293abe487b932aec366b57c8e, type: 3}
propertyPath: m_RootOrder
value: 5
value: 4
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 0567215293abe487b932aec366b57c8e, type: 3}

objectReference: {fileID: 0}
- target: {fileID: 4502082515322846, guid: 0567215293abe487b932aec366b57c8e, type: 3}
propertyPath: m_RootOrder
value: 10
value: 9
objectReference: {fileID: 0}
- target: {fileID: 114538851081060382, guid: 0567215293abe487b932aec366b57c8e,
type: 3}

objectReference: {fileID: 0}
- target: {fileID: 4502082515322846, guid: 0567215293abe487b932aec366b57c8e, type: 3}
propertyPath: m_RootOrder
value: 11
value: 10
objectReference: {fileID: 0}
- target: {fileID: 114538851081060382, guid: 0567215293abe487b932aec366b57c8e,
type: 3}

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &714012435
PrefabInstance:

objectReference: {fileID: 0}
- target: {fileID: 4502082515322846, guid: 0567215293abe487b932aec366b57c8e, type: 3}
propertyPath: m_RootOrder
value: 8
value: 7
objectReference: {fileID: 0}
- target: {fileID: 114538851081060382, guid: 0567215293abe487b932aec366b57c8e,
type: 3}

objectReference: {fileID: 0}
- target: {fileID: 4502082515322846, guid: 0567215293abe487b932aec366b57c8e, type: 3}
propertyPath: m_RootOrder
value: 6
value: 5
objectReference: {fileID: 0}
- target: {fileID: 114538851081060382, guid: 0567215293abe487b932aec366b57c8e,
type: 3}

objectReference: {fileID: 0}
- target: {fileID: 4502082515322846, guid: 0567215293abe487b932aec366b57c8e, type: 3}
propertyPath: m_RootOrder
value: 7
value: 6
objectReference: {fileID: 0}
- target: {fileID: 114538851081060382, guid: 0567215293abe487b932aec366b57c8e,
type: 3}

type: 3}
m_PrefabInstance: {fileID: 714012435}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1574236047
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1574236049}
- component: {fileID: 1574236048}
m_Layer: 0
m_Name: Academy
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1574236048
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1574236047}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b1fc0029fee784d9cb9854f8912bfd07, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &1574236049
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1574236047}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.71938086, y: 0.27357092, z: 4.1970553}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1728325040
PrefabInstance:
m_ObjectHideFlags: 0

objectReference: {fileID: 0}
- target: {fileID: 4502082515322846, guid: 0567215293abe487b932aec366b57c8e, type: 3}
propertyPath: m_RootOrder
value: 12
value: 11
objectReference: {fileID: 0}
- target: {fileID: 114538851081060382, guid: 0567215293abe487b932aec366b57c8e,
type: 3}

objectReference: {fileID: 0}
- target: {fileID: 4502082515322846, guid: 0567215293abe487b932aec366b57c8e, type: 3}
propertyPath: m_RootOrder
value: 9
value: 8
objectReference: {fileID: 0}
- target: {fileID: 114538851081060382, guid: 0567215293abe487b932aec366b57c8e,
type: 3}

17
UnitySDK/Assets/ML-Agents/Examples/Reacher/Scenes/Reacher.unity


serializedVersion: 6
m_Component:
- component: {fileID: 1574236049}
- component: {fileID: 1574236048}
m_Name: Academy
m_Name: ReacherAcademy
--- !u!114 &1574236048
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1574236047}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b1fc0029fee784d9cb9854f8912bfd07, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &1574236049
Transform:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: ec51f47c5ed0478080c449c74fd9c154, type: 3}
m_Name:
m_EditorClassIdentifier:
monitorVerticalOffset: 0
monitorVerticalOffset: 0
fixedDeltaTime: 0.02
maximumDeltaTime: 0.33333334
solverIterations: 6

4
UnitySDK/Assets/ML-Agents/Examples/Reacher/Scripts/ReacherAgent.cs


public GameObject pendulumB;
public GameObject hand;
public GameObject goal;
Academy m_MyAcademy;
float m_GoalDegree;
Rigidbody m_RbA;
Rigidbody m_RbB;

{
m_RbA = pendulumA.GetComponent<Rigidbody>();
m_RbB = pendulumB.GetComponent<Rigidbody>();
m_MyAcademy = GameObject.Find("Academy").GetComponent<Academy>();
SetResetParameters();
}

public void SetResetParameters()
{
var fp = m_MyAcademy.FloatProperties;
var fp = Academy.Instance.FloatProperties;
m_GoalSize = fp.GetPropertyWithDefault("goal_size", 5);
m_GoalSpeed = Random.Range(-1f, 1f) * fp.GetPropertyWithDefault("goal_speed", 1);
m_Deviation = fp.GetPropertyWithDefault("deviation", 0);

5
UnitySDK/Assets/ML-Agents/Examples/SharedAssets/Scripts/ProjectSettingsOverrides.cs


Physics.defaultSolverIterations = solverIterations;
Physics.defaultSolverVelocityIterations = solverVelocityIterations;
var academy = FindObjectOfType<Academy>();
academy.LazyInitialization();
academy.FloatProperties.RegisterCallback("gravity", f => { Physics.gravity = new Vector3(0, -f, 0); });
Academy.Instance.FloatProperties.RegisterCallback("gravity", f => { Physics.gravity = new Vector3(0, -f, 0); });
}
public void OnDestroy()

17
UnitySDK/Assets/ML-Agents/Examples/Soccer/Scenes/SoccerTwos.unity


serializedVersion: 6
m_Component:
- component: {fileID: 1574236049}
- component: {fileID: 1574236052}
m_Name: Academy
m_Name: SoccerSettings
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

m_Script: {fileID: 11500000, guid: ec51f47c5ed0478080c449c74fd9c154, type: 3}
m_Name:
m_EditorClassIdentifier:
monitorVerticalOffset: 0
monitorVerticalOffset: 0
fixedDeltaTime: 0.02
maximumDeltaTime: 0.33333334
solverIterations: 6

strikerReward: 1
goaliePunish: -1
goalieReward: 0.1
--- !u!114 &1574236052
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1574236047}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b1fc0029fee784d9cb9854f8912bfd07, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &1606160104
PrefabInstance:
m_ObjectHideFlags: 0

4
UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerFieldArea.cs


Renderer m_GroundRenderer;
SoccerSettings m_SoccerSettings;
Academy m_Academy;
public IEnumerator GoalScoredSwapGroundMaterial(Material mat, float time)
{

void Awake()
{
m_SoccerSettings = FindObjectOfType<SoccerSettings>();
m_Academy = FindObjectOfType<Academy>();
m_GroundRenderer = centerPitch.GetComponent<Renderer>();
m_GroundMaterial = m_GroundRenderer.material;
canResetBall = true;

ballRb.velocity = Vector3.zero;
ballRb.angularVelocity = Vector3.zero;
var ballScale = m_Academy.FloatProperties.GetPropertyWithDefault("ball_scale", 0.015f);
var ballScale = Academy.Instance.FloatProperties.GetPropertyWithDefault("ball_scale", 0.015f);
ballRb.transform.localScale = new Vector3(ballScale, ballScale, ballScale);
}
}

17
UnitySDK/Assets/ML-Agents/Examples/Tennis/Scenes/Tennis.unity


serializedVersion: 6
m_Component:
- component: {fileID: 1022397857}
- component: {fileID: 1022397859}
m_Name: Academy
m_Name: TennisSettings
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

m_Script: {fileID: 11500000, guid: ec51f47c5ed0478080c449c74fd9c154, type: 3}
m_Name:
m_EditorClassIdentifier:
monitorVerticalOffset: 0
monitorVerticalOffset: 0
--- !u!114 &1022397859
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1022397856}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b1fc0029fee784d9cb9854f8912bfd07, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &1065879750
PrefabInstance:
m_ObjectHideFlags: 0

3
UnitySDK/Assets/ML-Agents/Examples/Tennis/Scripts/TennisAgent.cs


m_BallRb = ball.GetComponent<Rigidbody>();
var canvas = GameObject.Find(k_CanvasName);
GameObject scoreBoard;
var academy = FindObjectOfType<Academy>();
m_ResetParams = academy.FloatProperties;
m_ResetParams = Academy.Instance.FloatProperties;
if (invertX)
{
scoreBoard = canvas.transform.Find(k_ScoreBoardBName).gameObject;

17
UnitySDK/Assets/ML-Agents/Examples/Walker/Scenes/Walker.unity


serializedVersion: 6
m_Component:
- component: {fileID: 1409355322}
- component: {fileID: 1409355324}
m_Name: WalkerAcademy
m_Name: WalkerSettings
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

m_Script: {fileID: 11500000, guid: ec51f47c5ed0478080c449c74fd9c154, type: 3}
m_Name:
m_EditorClassIdentifier:
monitorVerticalOffset: 1
monitorVerticalOffset: 1
fixedDeltaTime: 0.01333
maximumDeltaTime: 0.15
solverIterations: 12

m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3d6f3eab3776b4fb79724ac4216dfd7b, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &1409355324
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1409355320}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b1fc0029fee784d9cb9854f8912bfd07, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &1427385246

3
UnitySDK/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAgent.cs


m_ChestRb = chest.GetComponent<Rigidbody>();
m_SpineRb = spine.GetComponent<Rigidbody>();
var academy = FindObjectOfType<Academy>();
m_ResetParams = academy.FloatProperties;
m_ResetParams = Academy.Instance.FloatProperties;
SetResetParameters();
}

17
UnitySDK/Assets/ML-Agents/Examples/WallJump/Scenes/WallJump.unity


serializedVersion: 6
m_Component:
- component: {fileID: 1574236049}
- component: {fileID: 1574236052}
m_Name: Academy
m_Name: WallJumpSettings
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

m_Script: {fileID: 11500000, guid: ec51f47c5ed0478080c449c74fd9c154, type: 3}
m_Name:
m_EditorClassIdentifier:
monitorVerticalOffset: 0
monitorVerticalOffset: 0
fixedDeltaTime: 0.02
maximumDeltaTime: 0.33333334
solverIterations: 6

failMaterial: {fileID: 2100000, guid: a1daf31cdf41e484ca9ac33a5c6f524a, type: 2}
agentJumpVelocity: 777
agentJumpVelocityMaxChange: 10
--- !u!114 &1574236052
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1574236047}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b1fc0029fee784d9cb9854f8912bfd07, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &1813512988
PrefabInstance:
m_ObjectHideFlags: 0

10
UnitySDK/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs


Rigidbody m_AgentRb;
Material m_GroundMaterial;
Renderer m_GroundRenderer;
Academy m_Academy;
WallJumpSettings m_WallJumpSettings;
public float jumpingTime;

public override void InitializeAgent()
{
m_Academy = FindObjectOfType<Academy>();
m_WallJumpSettings = FindObjectOfType<WallJumpSettings>();
m_Configuration = Random.Range(0, 5);

{
localScale = new Vector3(
localScale.x,
m_Academy.FloatProperties.GetPropertyWithDefault("no_wall_height", 0),
Academy.Instance.FloatProperties.GetPropertyWithDefault("no_wall_height", 0),
localScale.z);
wall.transform.localScale = localScale;
GiveModel("SmallWallJump", noWallBrain);

localScale = new Vector3(
localScale.x,
m_Academy.FloatProperties.GetPropertyWithDefault("small_wall_height", 4),
Academy.Instance.FloatProperties.GetPropertyWithDefault("small_wall_height", 4),
localScale.z);
wall.transform.localScale = localScale;
GiveModel("SmallWallJump", smallWallBrain);

var min = m_Academy.FloatProperties.GetPropertyWithDefault("big_wall_min_height", 8);
var max = m_Academy.FloatProperties.GetPropertyWithDefault("big_wall_max_height", 8);
var min = Academy.Instance.FloatProperties.GetPropertyWithDefault("big_wall_min_height", 8);
var max = Academy.Instance.FloatProperties.GetPropertyWithDefault("big_wall_max_height", 8);
var height = min + Random.value * (max - min);
localScale = new Vector3(
localScale.x,

159
UnitySDK/Assets/ML-Agents/Scripts/Academy.cs


using System;
using UnityEngine;
using System.Collections.Generic;
#if UNITY_EDITOR

namespace MLAgents
{
/// <summary>
/// Helper class to step the Academy during FixedUpdate phase.
/// </summary>
public class AcademyFixedUpdateStepper : MonoBehaviour
{
void FixedUpdate()
{
Academy.Instance.EnvironmentStep();
}
}
/// <summary>
/// Currently, this class is expected to be extended to
/// implement the desired academy behavior.
/// </summary>
/// <remarks>
/// When an academy is run, it can either be in inference or training mode.

/// </remarks>
[HelpURL("https://github.com/Unity-Technologies/ml-agents/blob/master/" +
"docs/Learning-Environment-Design-Academy.md")]
public class Academy : MonoBehaviour
public class Academy : IDisposable
// Lazy initializer pattern, see https://csharpindepth.com/articles/singleton#lazy
static Lazy<Academy> lazy = new Lazy<Academy>(() => new Academy());
public static bool IsInitialized
{
get { return lazy.IsValueCreated; }
}
public static Academy Instance { get { return lazy.Value; } }
public IFloatProperties FloatProperties;

/// The number of steps completed within the current episode. Incremented
/// each time a step is taken in the environment. Is reset to 0 during
/// <see cref="AcademyReset"/>.
/// <see cref="EnvironmentReset"/>.
int m_StepCount;
/// The number of total number of steps completed during the whole simulation. Incremented

// Signals that the Academy has been reset by the training process
public event System.Action OnEnvironmentReset;
AcademyFixedUpdateStepper m_FixedUpdateStepper;
GameObject m_StepperObject;
/// MonoBehavior function called at the very beginning of environment
/// creation. Academy uses this time to initialize internal data
/// Private constructor called the first time the Academy is used.
/// Academy uses this time to initialize internal data
void Awake()
Academy()
Application.quitting += Dispose;
/// <summary>
/// Initialize the Academy if it hasn't already been initialized.
/// This method is always safe to call; it will have no effect if the Academy is already initialized.
/// </summary>
public void LazyInitialization()
{
if (!m_Initialized)

}
}
/// <summary>
/// Enable stepping of the Academy during the FixedUpdate phase. This is done by creating a temporary
/// GameObject with a MonoBehavior that calls Academy.EnvironmentStep().
/// </summary>
public void EnableAutomaticStepping()
{
if (m_FixedUpdateStepper != null)
{
return;
}
m_StepperObject = new GameObject("AcademyFixedUpdateStepper");
// Don't show this object in the hierarchy
m_StepperObject.hideFlags = HideFlags.HideInHierarchy;
m_FixedUpdateStepper = m_StepperObject.AddComponent<AcademyFixedUpdateStepper>();
}
/// <summary>
/// Disable stepping of the Academy during the FixedUpdate phase. If this is called, the Academy must be
/// stepped manually by the user by calling Academy.EnvironmentStep().
/// </summary>
public void DisableAutomaticStepping(bool destroyImmediate = false)
{
if (m_FixedUpdateStepper == null)
{
return;
}
m_FixedUpdateStepper = null;
if (destroyImmediate)
{
UnityEngine.Object.DestroyImmediate(m_StepperObject);
}
else
{
UnityEngine.Object.Destroy(m_StepperObject);
}
m_StepperObject = null;
}
/// <summary>
/// Returns whether or not the Academy is automatically stepped during the FixedUpdate phase.
/// </summary>
public bool IsAutomaticSteppingEnabled
{
get { return m_FixedUpdateStepper != null; }
}
var args = System.Environment.GetCommandLineArgs();
var args = Environment.GetCommandLineArgs();
var inputPort = "";
for (var i = 0; i < args.Length; i++)
{

return -1;
#endif
}
}
/// <summary>

{
EnableAutomaticStepping();
// Try to launch the communicator by using the arguments passed at launch
var port = ReadPortFromArgs();

new CommunicatorInitParameters
{
version = k_ApiVersion,
name = gameObject.name,
name = "AcademySingleton",
Random.InitState(unityRLInitParameters.seed);
UnityEngine.Random.InitState(unityRLInitParameters.seed);
}
catch
{

// training mode. In the absence of a communicator, we assume we are
// in inference mode.
DecideAction += () => { };
DestroyAction += () => { };
AgentSetStatus += i => { };
AgentResetIfDone += () => { };
AgentSendState += () => { };
AgentAct += () => { };
AgentForceReset += () => { };
OnEnvironmentReset += () => { };
ResetActions();
}
void ResetActions()
{
DecideAction = () => { };
DestroyAction = () => { };
AgentSetStatus = i => { };
AgentResetIfDone = () => { };
AgentSendState = () => { };
AgentAct = () => { };
AgentForceReset = () => { };
OnEnvironmentReset = () => { };
}
static void OnQuitCommandReceived()

/// Performs a single environment update to the Academy, and Agent
/// objects within the environment.
/// </summary>
void EnvironmentStep()
public void EnvironmentStep()
{
if (!m_FirstAcademyReset)
{

}
/// <summary>
/// MonoBehaviour function that dictates each environment step.
/// </summary>
void FixedUpdate()
{
EnvironmentStep();
}
/// <summary>
/// Creates or retrieves an existing ModelRunner that uses the same
/// NNModel and the InferenceDevice as provided.
/// </summary>

}
/// <summary>
/// Cleanup function
/// Shut down the Academy.
protected void OnDestroy()
public void Dispose()
DisableAutomaticStepping(true);
foreach (var mr in m_ModelRunners)
Communicator?.Dispose();
Communicator = null;
if (m_ModelRunners != null)
mr.Dispose();
foreach (var mr in m_ModelRunners)
{
mr.Dispose();
}
m_ModelRunners = null;
// Clear out the actions so we're not keeping references to any old objects
ResetActions();
FloatProperties = null;
m_Initialized = false;
// Reset the Lazy instance
lazy = new Lazy<Academy>(() => new Academy());
}
}
}

41
UnitySDK/Assets/ML-Agents/Scripts/Agent.cs


void OnEnable()
{
m_Id = gameObject.GetInstanceID();
var academy = FindObjectOfType<Academy>();
academy.LazyInitialization();
OnEnableHelper(academy);
OnEnableHelper();
m_Recorder = GetComponent<DemonstrationRecorder>();
}

void OnEnableHelper(Academy academy)
void OnEnableHelper()
if (academy == null)
{
throw new UnityAgentsException(
"No Academy Component could be found in the scene.");
}
academy.AgentSetStatus += SetStatus;
academy.AgentResetIfDone += ResetIfDone;
academy.AgentSendState += SendInfo;
academy.DecideAction += DecideAction;
academy.AgentAct += AgentStep;
academy.AgentForceReset += _AgentReset;
Academy.Instance.AgentSetStatus += SetStatus;
Academy.Instance.AgentResetIfDone += ResetIfDone;
Academy.Instance.AgentSendState += SendInfo;
Academy.Instance.DecideAction += DecideAction;
Academy.Instance.AgentAct += AgentStep;
Academy.Instance.AgentForceReset += _AgentReset;
m_PolicyFactory = GetComponent<BehaviorParameters>();
m_Brain = m_PolicyFactory.GeneratePolicy(Heuristic);
ResetData();

/// becomes disabled or inactive.
void OnDisable()
{
var academy = FindObjectOfType<Academy>();
if (academy != null)
// If Academy.Dispose has already been called, we don't need to unregister with it.
// We don't want to even try, because this will lazily create a new Academy!
if (Academy.IsInitialized)
academy.AgentSetStatus -= SetStatus;
academy.AgentResetIfDone -= ResetIfDone;
academy.AgentSendState -= SendInfo;
academy.DecideAction -= DecideAction;
academy.AgentAct -= AgentStep;
academy.AgentForceReset -= _AgentReset;
Academy.Instance.AgentSetStatus -= SetStatus;
Academy.Instance.AgentResetIfDone -= ResetIfDone;
Academy.Instance.AgentSendState -= SendInfo;
Academy.Instance.DecideAction -= DecideAction;
Academy.Instance.AgentAct -= AgentStep;
Academy.Instance.AgentForceReset -= _AgentReset;
}
m_Brain?.Dispose();
}

7
UnitySDK/Assets/ML-Agents/Scripts/ICommunicator.cs


UnityOutput and UnityInput can be extended to provide functionalities beyond RL
UnityRLOutput and UnityRLInput can be extended to provide new RL functionalities
*/
public interface ICommunicator
public interface ICommunicator : IDisposable
/// <summary>
/// Reset command sent back from the communicator.

void SubscribeBrain(string name, BrainParameters brainParameters);
/// <summary>
/// Sends the observations of one Agent.
/// Sends the observations of one Agent.
/// </summary>
/// <param name="brainKey">Batch Key.</param>
/// <param name="info">Agent info.</param>

Dictionary<int, AgentAction> GetActions(string key);
/// <summary>
/// Registers a side channel to the communicator. The side channel will exchange
/// Registers a side channel to the communicator. The side channel will exchange
/// messages with its Python equivalent.
/// </summary>
/// <param name="sideChannel"> The side channel to be registered.</param>

4
UnitySDK/Assets/ML-Agents/Scripts/Policy/BarracudaPolicy.cs


NNModel model,
InferenceDevice inferenceDevice)
{
var aca = GameObject.FindObjectOfType<Academy>();
aca.LazyInitialization();
var modelRunner = aca.GetOrCreateModelRunner(model, brainParameters, inferenceDevice);
var modelRunner = Academy.Instance.GetOrCreateModelRunner(model, brainParameters, inferenceDevice);
m_ModelRunner = modelRunner;
}

6
UnitySDK/Assets/ML-Agents/Scripts/Policy/BehaviorParameters.cs


public string behaviorName
{
get { return m_BehaviorName + "?team=" + m_TeamID;}
get { return m_BehaviorName + "?team=" + m_TeamID;}
}

case BehaviorType.InferenceOnly:
return new BarracudaPolicy(m_BrainParameters, m_Model, m_InferenceDevice);
case BehaviorType.Default:
if (FindObjectOfType<Academy>().IsCommunicatorOn)
if (Academy.Instance.IsCommunicatorOn)
{
return new RemotePolicy(m_BrainParameters, behaviorName);
}

6
UnitySDK/Assets/ML-Agents/Scripts/Policy/RemotePolicy.cs


string behaviorName)
{
m_BehaviorName = behaviorName;
var aca = GameObject.FindObjectOfType<Academy>();
aca.LazyInitialization();
m_Communicator = aca.Communicator;
aca.Communicator.SubscribeBrain(m_BehaviorName, brainParameters);
m_Communicator = Academy.Instance.Communicator;
m_Communicator.SubscribeBrain(m_BehaviorName, brainParameters);
}
/// <inheritdoc />

2
docs/FAQ.md


If you receive a message `Mean reward : nan` when attempting to train a model
using PPO, this is due to the episodes of the Learning Environment not
terminating. In order to address this, set `Max Steps` for either the Academy or
terminating. In order to address this, set `Max Steps` for the
Agents within the Scene Inspector to a value greater than 0. Alternatively, it
is possible to manually set `done` conditions for episodes from within scripts
for custom episode-terminating events.

3
docs/Getting-Started-with-Balance-Ball.md


independent agent, but they all share the same Behavior. 3D Balance Ball does this
to speed up training since all twelve agents contribute to training in parallel.
### Academy
The Academy object for the scene is placed on the Ball3DAcademy GameObject.
### Agent

4
docs/Glossary.md


# ML-Agents Toolkit Glossary
* **Academy** - Unity Component which controls timing, reset, and
* **Academy** - Singleton object which controls timing, reset, and
training/inference settings of the environment.
* **Action** - The carrying-out of a decision on the part of an agent within the
environment.

carried out given an observation.
* **Editor** - The Unity Editor, which may include any pane (e.g. Hierarchy,
Scene, Inspector).
* **Environment** - The Unity scene which contains Agents and the Academy.
* **Environment** - The Unity scene which contains Agents.
* **FixedUpdate** - Unity method called each time the game engine is
stepped. ML-Agents logic should be placed here.
* **Frame** - An instance of rendering the main camera for the display.

28
docs/Learning-Environment-Create-New.md


1. Create an environment for your agents to live in. An environment can range
from a simple physical simulation containing a few objects to an entire game
or ecosystem.
2. Add an Academy MonoBehaviour to a GameObject in the Unity scene
containing the environment.
3. Implement your Agent subclasses. An Agent subclass defines the code an Agent
2. Implement your Agent subclasses. An Agent subclass defines the code an Agent
4. Add your Agent subclasses to appropriate GameObjects, typically, the object
3. Add your Agent subclasses to appropriate GameObjects, typically, the object
in the scene that represents the Agent in the simulation.
**Note:** If you are unfamiliar with Unity, refer to

Note that we will create an Agent subclass to add to this GameObject as a
component later in the tutorial.
### Add an Empty GameObject to Hold the Academy
1. Right click in Hierarchy window, select Create Empty.
2. Name the GameObject "Academy"
![The scene hierarchy](images/mlagents-NewTutHierarchy.png)
You can adjust the camera angles to give a better view of the scene at runtime.
The next steps will be to create and add the ML-Agent components.
## Add an Academy
The Academy object coordinates the ML-Agents in the scene and drives the
decision-making portion of the simulation loop. Every ML-Agent scene needs one
(and only one) Academy instance.
First, add an Academy component to the Academy GameObject created earlier:
1. Select the Academy GameObject to view it in the Inspector window.
2. Click **Add Component**.
3. Select **Academy** in the list of components.
## Implement an Agent

Keep in mind:
* There can only be one Academy game object in a scene.
* If you are using multiple training areas, make sure all the Agents have the same `Behavior Name`
and `Behavior Parameters`

15
docs/Learning-Environment-Design.md


an Agent to restart if it finishes before the end of an episode. In this
case, the Academy calls the `AgentReset()` function.
To create a training environment, extend the Academy and Agent classes to
To create a training environment, extend the Agent class to
implement the above methods. The `Agent.CollectObservations()` and
`Agent.AgentAction()` functions are required; the other methods are optional —
whether you need to implement them or not depends on your specific scenario.

## Organizing the Unity Scene
To train and use the ML-Agents toolkit in a Unity scene, the scene must contain
a single Academy and as many Agent subclasses as you need.
To train and use the ML-Agents toolkit in a Unity scene, the scene as many Agent subclasses as you need.
The Academy object orchestrates Agents and their decision making processes. Only
place a single Academy object in a scene.
The Academy is a singleton which orchestrates Agents and their decision making processes. Only
a single Academy exists at a time.
#### Academy resetting
To alter the environment at the start of each episode, add your method to the Academy's OnEnvironmentReset action.

{
public void Awake()
{
var academy = FindObjectOfType<Academy>();
academy.LazyInitialization();
academy.OnEnvironmentReset += EnvironmentReset;
Academy.Instance.OnEnvironmentReset += EnvironmentReset;
}
void EnvironmentReset()

operate in a complex game or simulation. In this case, it might be more
efficient and practical to create a purpose-built training scene.
Both training and testing (or normal game) scenes must contain an Academy object
to control the agent decision making process.
When you create a training environment in Unity, you must set up the scene so
that it can be controlled by the external training process. Considerations
include:

7
docs/Limitations.md


[Execution Order of Event Functions](https://docs.unity3d.com/Manual/ExecutionOrder.html)
for more information.
You can control the frequency of Academy stepping by calling
`Academy.Instance.DisableAutomaticStepping()`, and then calling
`Academy.Instance.EnvironmentStep()`
## Python API
### Python version

### TensorFlow support
Currently the Ml-Agents toolkit uses TensorFlow 1.7.1 only.

6
docs/ML-Agents-Overview.md


_Simplified block diagram of ML-Agents._
The Learning Environment contains two additional components that help
The Learning Environment contains an additional component that help
organize the Unity scene:
- **Agents** - which is attached to a Unity GameObject (any character within a

- **Academy** - which orchestrates the observation and decision making process.
The External Communicator lives within the Academy.
Every Learning Environment will always have one global Academy and one Agent for
Every Learning Environment will always have one Agent for
every character in the scene. While each Agent must be linked to a Policy, it is
possible for Agents that have similar observations and actions to have
the same Policy type. In our sample game, we have two teams each with their own medic.

4
docs/Migrating.md


## Migrating from 0.13 to latest
### Important changes
* The Academy class was changed to be sealed and its virtual methods were removed.
* The Academy class was changed to a singleton, and its virtual methods were removed.
* Trainer steps are now counted per-Agent, not per-environment as in previous versions. For instance, if you have 10 Agents in the scene, 20 environment steps now corresponds to 200 steps as printed in the terminal and in Tensorboard.
* Curriculum config files are now YAML formatted and all curricula for a training run are combined into a single file.
* The `--num-runs` command-line option has been removed.

* If the class didn't override any of the virtual methods and didn't store any additional data, you can just replace the instance of it in the scene with an Academy.
* If the class didn't override any of the virtual methods and didn't store any additional data, you can just remove the old script from the scene.
* If the class had additional data, create a new MonoBehaviour and store the data on this instead.
* If the class overrode the virtual methods, create a new MonoBehaviour and move the logic to it:
* Move the InitializeAcademy code to MonoBehaviour.OnAwake

3
docs/Python-API.md


Once a property has been modified in Python, you can access it in C# after the next call to `step` as follows:
```csharp
var academy = FindObjectOfType<Academy>();
var sharedProperties = academy.FloatProperties;
var sharedProperties = Academy.Instance.FloatProperties;
float property1 = sharedProperties.GetPropertyWithDefault("parameter_1", 0.0f);
```

4
docs/Training-Curriculum-Learning.md


In order to define the curricula, the first step is to decide which parameters of
the environment will vary. In the case of the Wall Jump environment,
the height of the wall is what varies. We define this as a `Shared Float Property`
that can be accessed in `Academy.FloatProperties`, and by doing so it becomes
adjustable via the Python API.
that can be accessed in `Academy.Instance.FloatProperties`, and by doing
so it becomes adjustable via the Python API.
Rather than adjusting it by hand, we will create a YAML file which
describes the structure of the curricula. Within it, we can specify which
points in the training process our wall height will change, either based on the

2
docs/Training-Generalized-Reinforcement-Learning-Agents.md


## Introducing Generalization Using Reset Parameters
To enable variations in the environments, we implemented `Reset Parameters`.
`Reset Parameters` are `Academy.FloatProperties` that are used only when
`Reset Parameters` are `Academy.Instance.FloatProperties` that are used only when
resetting the environment. We
also included different sampling methods and the ability to create new kinds of
sampling methods for each `Reset Parameter`. In the 3D ball environment example displayed

2
docs/Training-ML-Agents.md


The ML-Agents toolkit conducts training using an external Python training
process. During training, this external process communicates with the Academy
object in the Unity scene to generate a block of agent experiences. These
to generate a block of agent experiences. These
experiences become the training set for a neural network used to optimize the
agent's policy (which is essentially a mathematical function mapping
observations to actions). In reinforcement learning, the neural network

999
docs/images/mlagents-3DBallHierarchy.png
文件差异内容过多而无法显示
查看文件

999
docs/images/mlagents-Open3DBall.png
文件差异内容过多而无法显示
查看文件

94
docs/images/mlagents-NewTutHierarchy.png

之前 之后
正在加载...
取消
保存