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
0
votes
2 answers
Trying to use OnActionReceived(ActionBuffers action) with MLAgents for Unity
I am trying to override this function. But those are the errors I get when I use them as I saw in some tutorials:
The error messages are
"Using directive is unnecessary"
(for the error in line 3) and
"The type or namespace name 'type/namespace'…

Itai Kaplan
- 11
- 4
0
votes
1 answer
ML-Agents release numbers
I'm totally confused about the release numbering Unity is using. Looking at GitHub, I see that the latest release is referred to as 'Release 17' yet the version numbers when looking at things in Package Manager look like 1.08.
Is Release 17 the same…

djeetee
- 1,799
- 7
- 24
- 36
0
votes
1 answer
Inference on pre-trained ONNX model from Unity ml-agents in Tensorflow
I have a pre-trained model from Unity's ml-agents. Now I'm trying to do inference with that model in python using TensorFlow. For this, I use TensorFlow Backend for ONNX to save the ONNX model as a SavedModel so I can later load this model. The code…

theVortr3x
- 70
- 10
0
votes
1 answer
Do not understand how to use the Ray Perception Sensor 2D component in MLAgents
So i started to learn the MLAgents Package. I wanted to make a little 2D Space game with an AI which detects the environment (Player, other AIs, Asteroids etc.) through Rays.
I figured out that you can add a Ray Perception Sensor 2D Component to…

preuschhi
- 1
- 1
0
votes
1 answer
How would I write a timer, that correctly works as Coroutine, as void?
I want to train a Unity ML Agent and at one part at its functionality, theres a timer written as Coroutine rightnow. I have the feeling that the Coroutine is not performing well within the training so I would like to write it as void instead of the…

Fledermauserl
- 35
- 9
0
votes
1 answer
ML agent not learning a relatively 'simple' task
I've tried to create a simple ML agent (ball) to learn to move towards and collide with a target.
Unfortunately, the agent doesn't appear to be learning and simply moves around in what appears to be random positions the whole time. After 5M steps,…

generated_name
- 13
- 4
0
votes
1 answer
Weird results with unity ml agents python api
I am using the 3DBall example environment, but I am getting some really weird results that I don't understand why they are happening. My code so far is just a for range loop that views the reward and fills in the inputs needed with random values.…

Owen_w
- 17
- 4
0
votes
1 answer
Unity - extracting camera pixel array is incredibly slow
I'm using the below lines of code to extract the pixel array from a camera at every frame, saving it as jpg and then running a python process on the jpg. Although it works, it is incredibly slow. The bottleneck seems to be reading the pixels in…

Ludo
- 2,307
- 2
- 27
- 58
0
votes
1 answer
Unity: Mlagents-learn issue
I'm kinda new to Unity so I may have done something wrong. But I did follow the installation guide from start to finish that can be found on the mlagents GitHub installation guide. My guess is I did something wrong in the part python package…

ChobitsTheZero
- 1
- 2
0
votes
1 answer
Decisions with Mlagent in Unity
I am learning to use Unity and Mlagents. I prepared a training environment in which I have an agent who must recycle objects by type of material (metal, plastic, etc.).
For example:
When the agent collides a plastic bottle and detects that it has a…

buhosiliscodirococo
- 16
- 1
0
votes
1 answer
Why is my AI model trains but doesn't evolve - ML Agents
Created a simple game in unity where ball should hit the targets without hitting the walls. So, started training and the results was too bad. The ball is just collecting one of the 4 targets. But EndEpisode() happens when it collects the last…

Akai Shuichi
- 103
- 5
0
votes
1 answer
How do I know the agents are working together?
I've been using ML-Agents for several months now and have been working on a self-balancing pair of legs. Though, I've had a question that's been itching me since the day I've started: How do I KNOW for a fact that the agents are working together?…

Jaden Williams
- 135
- 9
0
votes
1 answer
How to use tensorflow-gpu in unity mobile
I'm prototyping mobile ml application within Unity engine.
I have trained tensorflow graph (.pb) and I want to run the model in unity mobile. (both android and ios)
With OpenCVForUnity plugin, with dnn module, I can run tensorflow graph in mobile.…

JokyDandy
- 59
- 1
- 8
0
votes
2 answers
The type or namespace 'NModel' could not be found
I'm trying to embed a model that I trained in my c# unity script.
By doing something like this
using UnityEngine;
using UnityEngine.UI;
using MLAgents;
public class loadImage : MonoBehaviour {
public NNModel modelSource;
var model =…

SumakuTension
- 542
- 1
- 9
- 26
0
votes
1 answer
ImportError: cannot import name 'cluster_resolver'
I get this error when trying to setup Unity3d ml-agents
ImportError: cannot import name 'cluster_resolver'
Following https://github.com/Unity-Technologies/ml-agents/blob/master/docs/Installation.md tutorial
from tensorflow.contrib import…

Anup G Prasad
- 246
- 2
- 4
- 14