Questions tagged [ml-agent]

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.

103 questions
0
votes
0 answers

How to build a Multiagent RL model with MLAgents toolkit in Unity3D?

I am building a multiagent RL model with MLAgents toolkit in Unity3D. The idea is, the model will have 2 agents(spheres) and 1 target(cube) on a platform(floor). Both agent need to reach the target before each other, if an agent will reach the goal…
0
votes
0 answers

Heuristic function when it will run? unity ml agent

This is my Heuristic funtion, public override void Heuristic(in ActionBuffers actionsOut) { base.Heuristic(actionsOut); ActionSegment continuousActionsOut = actionsOut.ContinuousActions; continuousActionsOut[0] =…
Taha Halabi
  • 155
  • 7
0
votes
0 answers

Unity ML Agents - My Trained Agent is not moving towards all Checkpoints. Instead stuck in between

I am creating a bike racing game in which I want a AI to race as a opponent with me. So I decided and created a model by training the agent for Left turns, right turns, both left and right turns in a simple track. The model was trained very good…
0
votes
0 answers

Python: Avoid duplication of objects not used during multiprocessing

I am implementing NEAT (evolutionary algorithm for NN topology), and want to run feed forward network evaluations in parallel as it is the bottleneck during training. I am using the MLAgents library to connect with Unity where simulations are ran to…
Kristian T
  • 30
  • 4
0
votes
1 answer

Switiching to ML Agent script from another script in Unity

I want to train 2 ml agents (same script, using self play) in unity. I want the agent to follow a path following script initially until it detects an enemy player(other agent). Once detected, path following script is disabled and agent script is…
0
votes
2 answers

Mlagents-learn giving errors

version information: ml-agents: 0.29.0, ml-agents-envs: 0.29.0, Communicator API: 1.5.0, PyTorch: 1.7.1+cpu When I run mlagents-learn it gives me this huge error. A similar error appears also if I use --force, just without the last part. Traceback…
0
votes
0 answers

Can agents in Unity ML-agents collect observations asynchronously?

The vision sensor I use for each agent is quite processing intensive, so I figured it would improve the frame rate if the agents didn't all collect their observations on the same environment step, but I haven't found a way to accomplish this. Is it…
Mary Jane
  • 1
  • 1
0
votes
0 answers

Trouble implementing ml-agents in a Unity snooker game

I'm trying to implement a Reinforcement Learning snooker player and I want to train it using ml-agents in Unity. The thing is that I am not used to this library and I am not sure how should I do it. So when I try to train it, the agent does nothing.…
0
votes
1 answer

"RuntimeError: Could not infer dtype of numpy.float32" When trying to learn ml-agents

Every thing works fine, i can start up ml-agents with no problem, but every time i click play in the unity editor i get "RuntimeError: Could not infer dtype of numpy.float32"? I have tried every thing to resolve this error... I hvae python 1.10.0 …
0
votes
2 answers

pip3 install mlagents causing error because of h5py>=2.9.0

I'm trying to install this package to use it with unity mlagents 0.29.0 https://pypi.org/project/mlagents/ pip3 install mlagents Note: i have a mac I'm getting this error ERROR: Some build dependencies for h5py>=2.9.0 from…
Taha Halabi
  • 155
  • 7
0
votes
0 answers

Issues with camera sensor in ML agents

I am trying to make an AI using ML agents but I can't seem to get the camera sensor to actually give input. I have followed several tutorials but none of them go in depth enough for what I want and if they do they are very outdated. Here is my…
Ian Weed
  • 64
  • 8
0
votes
1 answer

Unity, ML-Agents "'Actionbuffers' could not be found" error

Recently I've been struggling with the ML-Agents Unity error - "error CS0246: The type or namespace name 'Actionbuffers' could not be found (are you missing a using directive or an assembly reference?)". I've downloaded the latest package version of…
smonk
  • 45
  • 3
0
votes
1 answer

During ML agent training, If I want to change observations, do I have to run the training from the beginning again?

During ML agent training, If I want to change observations(sensor shape, number of sensors, etc), do I have to run the training from the beginning again?
w ing
  • 31
  • 3
0
votes
1 answer

Compiler Error in Unity v2020.3 when trying to run Unity ML Agents package, what is the issue?

Issue I have no idea what's the issue I'm using Unity 2020.3, i'd narrowed down the error to the MLagents package manager download (depending on the version I get a whole different # of errors like when I install mlagetns 2.00 I get 30 errros…
0
votes
0 answers

OnActionReceived is not invoked after RequestDecision is called

I am working on a simulation game where you need to place a medical station somewhere on the map. Thenthe simulation run and compute the effectiveness of the position (it can't be too far or too close some other building). I want to train a MLAgent…
Eloi
  • 101
  • 10