From 8371b96a38cb74163665e28752946ba4d2cd2f7e Mon Sep 17 00:00:00 2001 From: vincentpierre Date: Mon, 23 Jul 2018 16:40:27 -0700 Subject: [PATCH 1/3] [Hotfix] Removed the reference to the brain in the OnEnable method of the agent to avoid errors when the agent is initialized without a brain --- unity-environment/Assets/ML-Agents/Scripts/Agent.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/unity-environment/Assets/ML-Agents/Scripts/Agent.cs b/unity-environment/Assets/ML-Agents/Scripts/Agent.cs index 12226ab654..273a43b921 100755 --- a/unity-environment/Assets/ML-Agents/Scripts/Agent.cs +++ b/unity-environment/Assets/ML-Agents/Scripts/Agent.cs @@ -257,10 +257,9 @@ public abstract class Agent : MonoBehaviour void OnEnable() { textureArray = new Texture2D[agentParameters.agentCameras.Count]; - for (int i = 0; i < brain.brainParameters.cameraResolutions.Length; i++) + for (int i = 0; i < agentParameters.agentCameras.Count; i++) { - textureArray[i] = new Texture2D(brain.brainParameters.cameraResolutions[i].width, - brain.brainParameters.cameraResolutions[i].height, TextureFormat.RGB24, false); + textureArray[i] = new Texture2D(1, 1, TextureFormat.RGB24, false); } id = gameObject.GetInstanceID(); Academy academy = Object.FindObjectOfType() as Academy; From c6ea212c3c852b7334cdeb9305a0925453982950 Mon Sep 17 00:00:00 2001 From: Arthur Juliani Date: Mon, 23 Jul 2018 16:50:17 -0700 Subject: [PATCH 2/3] Fix observation size in docs --- docs/Learning-Environment-Examples.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Learning-Environment-Examples.md b/docs/Learning-Environment-Examples.md index dbaedab1c8..84a5132497 100644 --- a/docs/Learning-Environment-Examples.md +++ b/docs/Learning-Environment-Examples.md @@ -99,7 +99,7 @@ If you would like to contribute environments, please see our * -0.0025 for every step. * +1.0 if the block touches the goal. * Brains: One brain with the following observation/action space. - * Vector Observation space: (Continuous) 15 variables corresponding to position and velocities of agent, block, and goal. + * Vector Observation space: (Continuous) 70 variables corresponding to 14 ray-casts each detecting one of three possible objects (wall, goal, or block). * Vector Action space: (Continuous) Size of 2, corresponding to movement in X and Z directions. * Visual Observations (Optional): One first-person camera. Use `VisualPushBlock` scene. * Reset Parameters: None. From a1a7245bb08c492808775bb3b64955e334ab7378 Mon Sep 17 00:00:00 2001 From: vincentpierre Date: Tue, 24 Jul 2018 09:57:44 -0700 Subject: [PATCH 3/3] [Hotfix] Made the Pipe of the grpc communicator an instance property --- python/unityagents/rpc_communicator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/unityagents/rpc_communicator.py b/python/unityagents/rpc_communicator.py index 95303bffe2..985cadd904 100755 --- a/python/unityagents/rpc_communicator.py +++ b/python/unityagents/rpc_communicator.py @@ -15,7 +15,8 @@ class UnityToExternalServicerImplementation(UnityToExternalServicer): - parent_conn, child_conn = Pipe() + def __init__(self): + self.parent_conn, self.child_conn = Pipe() def Initialize(self, request, context): self.child_conn.send(request)