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
1
vote
1 answer

limit the action value in Unity ML-Agents/Tensorflow

I am using Unity with ML-Agents and their PPO implementation. I have one Action to train my neural network on, which has an Imput of -1 to 1. When I log the action I can see that the Network always tries values like 550, 630,-530 etc. How can I…
ChrizZlyBear
  • 121
  • 2
  • 11
1
vote
0 answers

Unity ML Agent doesn't learn well on default examples

I am trying to understand Unity Machine Learning Beta. I'm trying to train agents on all given example scenes, 3DBall worked fine, but Area and even Basic examples are not learning properly. Problem might be in hyper parameters but I'm not sure. My…
1
vote
1 answer

Why should continuous actions be clamped?

In Deep Reinforcement Learning, using continuous action spaces, why does it seem to be common practice to clamp the action right before the agent's execution? Examples: OpenAI Gym Mountain…
1
vote
1 answer

brain type internal not showing unity3d

I have trained a model with Python(PPO). I got the byte file for brain but when I try to select brain type, it doesn't show any Internal option. I'm using ML-AgentsNoPlugin.unitypackage for this project. Please let me know what's wrong
abhimanyuaryan
  • 3,882
  • 5
  • 41
  • 83
1
vote
1 answer

Unity/ml-agents, calling with right argument for multiple brains

Playing with This. I can successfully train 1 brain, but when I want to train 2 brains I get following error --------------------------------------------------------------------------- UnityActionException Traceback (most recent…
Maximus
  • 21
  • 4
0
votes
1 answer

Unity's ML Agents doesn't call OnActionRecieved() (using Behavioural Cloning only)

I'm creating an Agent script, to park a car for me using exclusively Behavioural Cloning (hence no DecisionRequester(), Reward logic, etc. ). After recording a demonstration, the demo file says it has recorded only 1 step and 2 episodes despite me…
smonk
  • 45
  • 3
0
votes
0 answers

Sensor shape must match. ml-agents, Unity

I am using unity and ml-agents, and have started modifying this project: https://github.com/CoderOneHQ/ultimate-volleyball I have a added more observations to my agents, where it used to have 11 observations and now i added 7 more. The observations…
0
votes
0 answers

mlagent: reset agent pose when falling out of the plane

Just got into ml-agent,I tried to make my own training scene. In order to reset the training scene,I modified the code from the rollerball demo for starter,down below is the reset part of the code: public class forklift : Agent { Rigidbody…
brian2lee
  • 147
  • 1
  • 1
  • 10
0
votes
0 answers

unity random spawn object overlap

Recently I got into ml-agent, however I encounter a problem, that is my agent object(blue) and target object(red) will overlap and break the simulation. I've tried to search for solutions but most of them suggest just avoid it manually(by…
brian2lee
  • 147
  • 1
  • 1
  • 10
0
votes
0 answers

When executing mlagents after 20000 steps an error appears: Use of `x.T` on tensors of dimension other than 2 to reverse their shape is deprecated

Creating a simple ml-agent code (first attempt at this) with an agent who can move in the x or z direction not in the y along a flat plane. Code shows no errors and runs correctly initially (the only condition so far is that if it crosses a certain…
0
votes
1 answer

Is there a way to force Information updates in while training in ML agents Unity?

I Just found out how to train a ML agent in unity (after a lot of errors) and I saw the [INFO] tags pop up in my Command Prompt and give me a bunch of useful info about my agents (Total rewards, average rewards etc.) and this was useful but it was…
user21776029
0
votes
0 answers

Problem Using Sensors in 2D Platformer Game

I am trying to make a 2d platformer game and my agent needs to collect some gems and catch the player, i tried adding a grid sensor to my agent so it sees the gems and collects them but i couldn't figure out how to use the grid sensor and there are…
0
votes
1 answer

Is there a way to know the right time scale for Unity ML Agent Training?

I am training an AI to learn how to play flappy bird. I trained it with a high time scale and it performs well only in that specific pace. When it's applied to the default time scale 1 of the game, it's pretty bad. So now I want to train it at the…
0
votes
0 answers

Unity MlAgents my model jumps unnecessarily

I am new to using Unity and ML-Agents. I have created an environment for my model and started training it there. However, my model keeps jumping at every moment in the script, even when it is not necessary. I have given negative feedback to prevent…
0
votes
0 answers

Install/run errors when trying to train AI model in Unity - Numpy type error

Version information: Python: 3.10.4 ml-agents: 0.30.0, ml-agents-envs: 0.30.0, Communicator API: 1.5.0, PyTorch: 2.0.0+cu118 Environment(Pip) Packages absl-py==1.4.0 attrs==23.1.0 cachetools==5.3.0 cattrs==1.5.0 …
Jakob B
  • 19
  • 1