GitHub
5 年前
当前提交
24b387d3
共有 29 个文件被更改,包括 291 次插入 和 178 次删除
-
9Project/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DAgent.cs
-
11Project/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerAgent.cs
-
14Project/Assets/ML-Agents/Examples/FoodCollector/Scripts/FoodCollectorAgent.cs
-
12Project/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs
-
18Project/Assets/ML-Agents/Examples/Hallway/Scripts/HallwayAgent.cs
-
18Project/Assets/ML-Agents/Examples/PushBlock/Scripts/PushAgentBasic.cs
-
18Project/Assets/ML-Agents/Examples/Pyramids/Scripts/PyramidAgent.cs
-
16Project/Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs
-
11Project/Assets/ML-Agents/Examples/Tennis/Scripts/TennisAgent.cs
-
14Project/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs
-
4com.unity.ml-agents/CHANGELOG.md
-
57com.unity.ml-agents/Runtime/Agent.cs
-
51com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs
-
8com.unity.ml-agents/Runtime/Policies/BehaviorParameters.cs
-
11com.unity.ml-agents/Runtime/Policies/HeuristicPolicy.cs
-
4com.unity.ml-agents/Tests/Editor/BehaviorParameterTests.cs
-
3com.unity.ml-agents/Tests/Editor/MLAgentsEditModeTest.cs
-
8com.unity.ml-agents/Tests/Runtime/RuntimeAPITest.cs
-
2com.unity.ml-agents/package.json
-
2docs/Getting-Started.md
-
8docs/Learning-Environment-Create-New.md
-
3docs/Learning-Environment-Design-Agents.md
-
12docs/Migrating.md
-
63ml-agents-envs/mlagents_envs/environment.py
-
31ml-agents-envs/mlagents_envs/tests/test_envs.py
-
3com.unity.ml-agents/Tests/Editor/Communicator.meta
-
55com.unity.ml-agents/Tests/Editor/Communicator/RpcCommunicatorTests.cs
-
3com.unity.ml-agents/Tests/Editor/Communicator/RpcCommunicatorTests.cs.meta
|
|||
fileFormatVersion: 2 |
|||
guid: da8f640243c749388a0329393c8fce64 |
|||
timeCreated: 1586386315 |
|
|||
using System; |
|||
using System.Collections; |
|||
using System.Text.RegularExpressions; |
|||
using NUnit.Framework; |
|||
using UnityEngine; |
|||
using UnityEngine.TestTools; |
|||
|
|||
namespace MLAgents.Tests.Communicator |
|||
{ |
|||
[TestFixture] |
|||
public class RpcCommunicatorTests |
|||
{ |
|||
|
|||
[Test] |
|||
public void TestCheckCommunicationVersionsAreCompatible() |
|||
{ |
|||
var unityVerStr = "1.0.0"; |
|||
var pythonVerStr = "1.0.0"; |
|||
var pythonPackageVerStr = "0.16.0"; |
|||
|
|||
Assert.IsTrue(RpcCommunicator.CheckCommunicationVersionsAreCompatible(unityVerStr, |
|||
pythonVerStr, |
|||
pythonPackageVerStr)); |
|||
LogAssert.NoUnexpectedReceived(); |
|||
|
|||
pythonVerStr = "1.1.0"; |
|||
Assert.IsTrue(RpcCommunicator.CheckCommunicationVersionsAreCompatible(unityVerStr, |
|||
pythonVerStr, |
|||
pythonPackageVerStr)); |
|||
|
|||
// Ensure that a warning was printed.
|
|||
LogAssert.Expect(LogType.Warning, new Regex("(.\\s)+")); |
|||
|
|||
unityVerStr = "2.0.0"; |
|||
Assert.IsFalse(RpcCommunicator.CheckCommunicationVersionsAreCompatible(unityVerStr, |
|||
pythonVerStr, |
|||
pythonPackageVerStr)); |
|||
|
|||
unityVerStr = "0.15.0"; |
|||
pythonVerStr = "0.15.0"; |
|||
Assert.IsTrue(RpcCommunicator.CheckCommunicationVersionsAreCompatible(unityVerStr, |
|||
pythonVerStr, |
|||
pythonPackageVerStr)); |
|||
unityVerStr = "0.16.0"; |
|||
Assert.IsFalse(RpcCommunicator.CheckCommunicationVersionsAreCompatible(unityVerStr, |
|||
pythonVerStr, |
|||
pythonPackageVerStr)); |
|||
unityVerStr = "1.15.0"; |
|||
Assert.IsFalse(RpcCommunicator.CheckCommunicationVersionsAreCompatible(unityVerStr, |
|||
pythonVerStr, |
|||
pythonPackageVerStr)); |
|||
|
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 251fab8dff424abb95b2b381c7c924c3 |
|||
timeCreated: 1586386329 |
撰写
预览
正在加载...
取消
保存
Reference in new issue