Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using Barracuda;
using Unity.Barracuda;
using System.IO;
using Unity.MLAgents;
using Unity.MLAgents.Policies;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Collections;
using UnityEngine;
using Unity.MLAgents;
using Barracuda;
using Unity.Barracuda;
using Unity.MLAgents.Sensors;

public class WallJumpAgent : Agent
Expand Down
2 changes: 1 addition & 1 deletion Project/ProjectSettings/ProjectVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
m_EditorVersion: 2018.4.17f1
m_EditorVersion: 2018.4.18f1
2 changes: 1 addition & 1 deletion com.unity.ml-agents/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ and this project adheres to
C# style conventions. All public fields and properties now use "PascalCase"
instead of "camelCase"; for example, `Agent.maxStep` was renamed to
`Agent.MaxStep`. For a full list of changes, see the pull request. (#3828)
- Updated to Barracuda 0.7.0-preivew which has breaking namespace and assembly name changes.

### Minor Changes

Expand All @@ -83,7 +84,6 @@ and this project adheres to
- `StackingSensor` was changed from `internal` visibility to `public`
- Academy.InferenceSeed property was added. This is used to initialize the
random number generator in ModelRunner, and is incremented for each ModelRunner. (#3823)
- Updated Barracuda to 0.6.3-preview.
- Added `Agent.GetObservations(), which returns a read-only view of the observations
added in `CollectObservations()`. (#3825)
- Model updates can now happen asynchronously with environment steps for better performance. (#3690)
Expand Down
2 changes: 1 addition & 1 deletion com.unity.ml-agents/Editor/BehaviorParametersEditor.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Unity.MLAgents.Sensors;
using UnityEditor;
using Barracuda;
using Unity.MLAgents.Policies;
using Unity.Barracuda;
using UnityEngine;

namespace Unity.MLAgents.Editor
Expand Down
4 changes: 2 additions & 2 deletions com.unity.ml-agents/Editor/Unity.ML-Agents.Editor.asmdef
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Unity.ML-Agents.Editor",
"references": [
"Unity.ML-Agents",
"Barracuda",
"Unity.Barracuda",
"Unity.ML-Agents.CommunicatorObjects"
],
"optionalUnityReferences": [],
Expand All @@ -15,4 +15,4 @@
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": []
}
}
2 changes: 1 addition & 1 deletion com.unity.ml-agents/Runtime/Academy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using Unity.MLAgents.Inference;
using Unity.MLAgents.Policies;
using Unity.MLAgents.SideChannels;
using Barracuda;
using Unity.Barracuda;

/**
* Welcome to Unity Machine Learning Agents (ML-Agents).
Expand Down
2 changes: 1 addition & 1 deletion com.unity.ml-agents/Runtime/Agent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using UnityEngine;
using Barracuda;
using Unity.MLAgents.Sensors;
using Unity.MLAgents.Demonstrations;
using Unity.MLAgents.Policies;
using Unity.Barracuda;
using UnityEngine.Serialization;

namespace Unity.MLAgents
Expand Down
2 changes: 1 addition & 1 deletion com.unity.ml-agents/Runtime/Inference/ApplierImpl.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Barracuda;
using Unity.MLAgents.Inference.Utils;
using Unity.Barracuda;
using UnityEngine;

namespace Unity.MLAgents.Inference
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Barracuda;
using Unity.MLAgents.Sensors;
using Unity.MLAgents.Policies;
using Unity.Barracuda;

namespace Unity.MLAgents.Inference
{
Expand Down Expand Up @@ -590,7 +590,7 @@ static IEnumerable<string> CheckOutputTensorShape(
"suggest Continuous Control.");
return failedModelChecks;
}
var tensorTester = new Dictionary<string, Func<BrainParameters, TensorShape, int, string>>();
var tensorTester = new Dictionary<string, Func<BrainParameters, TensorShape?, int, string>>();
if (brainParameters.VectorActionSpaceType == SpaceType.Continuous)
{
tensorTester[TensorNames.ActionOutput] = CheckContinuousActionOutputShape;
Expand All @@ -604,7 +604,7 @@ static IEnumerable<string> CheckOutputTensorShape(
{
if (tensorTester.ContainsKey(name))
{
var tester = tensorTester[name];
Func<BrainParameters, TensorShape?, int, string> tester = tensorTester[name];
var error = tester.Invoke(brainParameters, model.GetShapeByName(name), modelActionSize);
if (error != null)
{
Expand All @@ -631,7 +631,7 @@ static IEnumerable<string> CheckOutputTensorShape(
/// check failed. If the check passed, returns null.
/// </returns>
static string CheckDiscreteActionOutputShape(
BrainParameters brainParameters, TensorShape shape, int modelActionSize)
BrainParameters brainParameters, TensorShape? shape, int modelActionSize)
{
var bpActionSize = brainParameters.VectorActionSize.Sum();
if (modelActionSize != bpActionSize)
Expand All @@ -656,7 +656,7 @@ static string CheckDiscreteActionOutputShape(
/// <returns>If the Check failed, returns a string containing information about why the
/// check failed. If the check passed, returns null.</returns>
static string CheckContinuousActionOutputShape(
BrainParameters brainParameters, TensorShape shape, int modelActionSize)
BrainParameters brainParameters, TensorShape? shape, int modelActionSize)
{
var bpActionSize = brainParameters.VectorActionSize[0];
if (modelActionSize != bpActionSize)
Expand Down
2 changes: 1 addition & 1 deletion com.unity.ml-agents/Runtime/Inference/GeneratorImpl.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System;
using Barracuda;
using Unity.MLAgents.Inference.Utils;
using Unity.Barracuda;
using UnityEngine;
using Unity.MLAgents.Sensors;

Expand Down
2 changes: 1 addition & 1 deletion com.unity.ml-agents/Runtime/Inference/ModelRunner.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Collections.Generic;
using Barracuda;
using Unity.Barracuda;
using UnityEngine.Profiling;
using Unity.MLAgents.Sensors;
using Unity.MLAgents.Policies;
Expand Down
2 changes: 1 addition & 1 deletion com.unity.ml-agents/Runtime/Inference/TensorApplier.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Collections.Generic;
using Barracuda;
using Unity.MLAgents.Policies;
using Unity.Barracuda;

namespace Unity.MLAgents.Inference
{
Expand Down
2 changes: 1 addition & 1 deletion com.unity.ml-agents/Runtime/Inference/TensorGenerator.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Collections.Generic;
using Barracuda;
using Unity.MLAgents.Sensors;
using Unity.Barracuda;

namespace Unity.MLAgents.Inference
{
Expand Down
2 changes: 1 addition & 1 deletion com.unity.ml-agents/Runtime/Inference/TensorProxy.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using Barracuda;
using Unity.MLAgents.Inference.Utils;
using Unity.Barracuda;

namespace Unity.MLAgents.Inference
{
Expand Down
2 changes: 1 addition & 1 deletion com.unity.ml-agents/Runtime/Policies/BarracudaPolicy.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Barracuda;
using Unity.Barracuda;
using System.Collections.Generic;
using Unity.MLAgents.Inference;
using Unity.MLAgents.Sensors;
Expand Down
2 changes: 1 addition & 1 deletion com.unity.ml-agents/Runtime/Policies/BehaviorParameters.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Barracuda;
using Unity.Barracuda;
using System;
using UnityEngine;
using UnityEngine.Serialization;
Expand Down
2 changes: 1 addition & 1 deletion com.unity.ml-agents/Runtime/Sensors/ObservationWriter.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using Barracuda;
using Unity.MLAgents.Inference;
using Unity.Barracuda;

namespace Unity.MLAgents.Sensors
{
Expand Down
4 changes: 2 additions & 2 deletions com.unity.ml-agents/Runtime/Unity.ML-Agents.asmdef
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Unity.ML-Agents",
"references": [
"Barracuda",
"Unity.Barracuda",
"Unity.ML-Agents.CommunicatorObjects"
],
"optionalUnityReferences": [],
Expand All @@ -16,4 +16,4 @@
],
"autoReferenced": true,
"defineConstraints": []
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System;
using Barracuda;
using Unity.Barracuda;
using NUnit.Framework;
using UnityEngine;
using Unity.MLAgents.Inference;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.Collections.Generic;
using NUnit.Framework;
using Barracuda;
using Unity.MLAgents.Inference;
using Unity.MLAgents.Policies;
using Unity.Barracuda;

namespace Unity.MLAgents.Tests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Collections.Generic;
using Barracuda;
using Unity.Barracuda;
using NUnit.Framework;
using UnityEngine;
using Unity.MLAgents.Inference;
Expand Down
2 changes: 1 addition & 1 deletion com.unity.ml-agents/Tests/Editor/ModelRunnerTest.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using NUnit.Framework;
using UnityEngine;
using UnityEditor;
using Barracuda;
using Unity.MLAgents.Inference;
using Unity.MLAgents.Sensors;
using Unity.Barracuda;
using System.Linq;
using Unity.MLAgents.Policies;

Expand Down
2 changes: 1 addition & 1 deletion com.unity.ml-agents/Tests/Editor/ParameterLoaderTest.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using NUnit.Framework;
using UnityEngine;
using UnityEditor;
using Barracuda;
using Unity.MLAgents.Inference;
using Unity.MLAgents.Sensors;
using Unity.Barracuda;
using System.Linq;
using Unity.MLAgents.Policies;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using NUnit.Framework;
using Unity.MLAgents.Sensors;
using Barracuda;
using Unity.MLAgents.Inference;
using Unity.Barracuda;


namespace Unity.MLAgents.Tests
Expand Down
2 changes: 1 addition & 1 deletion com.unity.ml-agents/Tests/Editor/TensorUtilsTest.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using Barracuda;
using Unity.MLAgents.Inference;
using Unity.MLAgents.Inference.Utils;
using Unity.Barracuda;
using NUnit.Framework;

namespace Unity.MLAgents.Tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"references": [
"Unity.ML-Agents.Editor",
"Unity.ML-Agents",
"Barracuda",
"Unity.Barracuda",
"Unity.ML-Agents.CommunicatorObjects"
],
"optionalUnityReferences": [
Expand All @@ -24,4 +24,4 @@
"defineConstraints": [
"UNITY_INCLUDE_TESTS"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Tests",
"references": [
"Unity.ML-Agents",
"Barracuda",
"Unity.Barracuda",
"Unity.ML-Agents.CommunicatorObjects",
"Unity.ML-Agents.Editor"
],
Expand Down
4 changes: 2 additions & 2 deletions com.unity.ml-agents/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"unity": "2018.4",
"description": "Add interactivity to your game with Machine Learning Agents trained using Deep Reinforcement Learning.",
"dependencies": {
"com.unity.barracuda": "0.6.3-preview"
"com.unity.barracuda": "0.7.0-preview"
}
}
}