The Unity Machine Learning Agents Toolkit (ML-Agents) is an open-source Unity3D plugin that enables games and simulations to serve as environments for training intelligent agents. Agents - usually implemented as scripted C# Unity components - can be trained using reinforcement learning, imitation learning, neuroevolution, or other machine learning methods through a Python API.
Questions tagged [ml-agent]
103 questions
2
votes
0 answers
TypeError - Torch.Device RepeatedScalarContainer
I keep getting the error TypeError: new() received an invalid combination of arguments - got (google.protobuf.pyext._message.RepeatedScalarContainer, int).
I've printed the type of device, finding that it's of class torch.device and tested all of…

rafvasq
- 1,512
- 3
- 18
- 48
2
votes
2 answers
error CS1644: Feature `null propagating operator' cannot be used because it is not part of the C# 4.0 language specification
I have Unity 2018.1.9f2 and I downloaded the Unity ml agents and added the folder to my unity project. But When I try to run the '3DBall' scene I get this error in the console:…

Samoeo Molm
- 35
- 2
- 5
2
votes
0 answers
Unity ML Agents - Simple logic "and" gate example - no episode was completed
I am trying to create a really simple example where i train the agent with "and" gate values, i.e
1,0 = 0
1,1 = 1
0,0 = 0
0,1 = 0
I know this a really strange test project but i need to check that i can use the ML for evaluating data without…

user414025
- 105
- 1
- 10
2
votes
1 answer
Tensorflowsharp results getvalue() is very slow
I am using TensorflowSharp to run evaluations using a neural network on an Android phone. I am building the project with Unity.
I am using the tensorflowsharp unity plugin listed under the requirements here:…

the_cheff
- 4,690
- 3
- 15
- 23
2
votes
1 answer
Tensorflow 1.7.1 error with python 3.5
I install tensorflow 1.7.1 to use with Unity ML-Agent. I install tensorflow with the following command:
pip3 install tensorflow==1.7.1
Installation goes fines but when I try to import tensorflow I got this error:
C:\>python
Python 3.5.1…

Jean-Francois Gallant
- 13,583
- 6
- 20
- 24
2
votes
1 answer
Reward Logic out of Unity3D in ml-agents package
Unity3D has a package for Reinforcement Learning called ML-agents that I am playing with to understand its components. For my project, I am in the situation that I need to write my own logic to set the reward out of Unity3D (not 'addReward' using C#…

Guido Salimbeni
- 54
- 4
2
votes
2 answers
What is the purpose of .bytes file in unity?
My friend has sent me the .bytes file from unity for machine learning model.
But I don't know how to open it in python for ML. Could any one able to give me the answer about the .bytes file in unity.
What is the purpose of it?
How to use it for…

EKNATH KULKARNI
- 394
- 1
- 5
- 13
2
votes
1 answer
A script in Tensorflow (1.4.0) needs to import 'reader.py' (which is also located in tensorflow) but fails. Not sure what to do about this
Preface: I am using Python 3.6.5, Tensorflow 1.4.0, and Unity Ml-Agents v0.3
I am using tensorflow(1.4.0) along with the Unity Ml-Agents git repository. In tensorflow there is a file called saved_model_utils.py that needs to import reader.py from a…

sam ulrich
- 29
- 2
1
vote
0 answers
Agent stuck in loop MLAgents in Unity
Goal: The agent need to shoot red dots.
The agent shoots a ball that when it hits a red dot, it removes the dot and himself but when it hits an obstacle, only the ball disappear. (There's no bounce)
Example Level 1
The agent on the first level does…

UniSlay
- 11
- 1
1
vote
0 answers
OnActionReceived not being called
I am trying to override the OnActionReceived method of the Agent class. But I don't think that the function is getting called and it doesn't give me any error.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using…

MaCHeaMaRoBi
- 13
- 3
1
vote
0 answers
Hummingbirds: NullReference
I'm doing the hummingbird course and when I try to do the heuristic test I get the error pictured below: Object reference not set to an instance of an object in the OnEpisodeBegin function on line 76 which reads flowerArea.ResetFlowers(); (see…

ndunn92
- 11
- 1
1
vote
0 answers
Unable to call Reward function in unity ML Agent from external script
I am doing a reinforcement learning test using an ML agent, and I even called the reward function from an external script, but the actual reward and the episode does not end.(only Hello, Agent is printed)
Perhaps there is a conflict with override…

John
- 13
- 3
1
vote
0 answers
(Unity ML-agent) If I change the reward for an action, would it be better to do training all over again?
For example, let's asume that Reward for an action was a negative reward, and Agent was very very well trained to avoid that action.
In this situation, if I change the reward for that action to a positive reward and continue with the previous…

w ing
- 31
- 3
1
vote
1 answer
Ray Perception Sensor 2D gizmos not detecting collision
If I make a new scene with 3d sphere and cube and make the sphere has Ray perception, the gizmos is not detecting any collision.
This doesn't happen when I try using 3d perception in 3d scene instead.
I have read this question, and have tried doing…

Teodorus Nathaniel
- 63
- 5
1
vote
1 answer
Can't find pre-released versions of ML-Agents in Unity
I am trying to use pre-released versions of packages on Unity.
I followed some tutorials and guides, and from my understanding, I should check the "Enable pre-release packages" Check-box as I did here:
But still, when I go to the package manager, I…

Itai Kaplan
- 11
- 4