Unity-Technologies / ml-agents

The Unity Machine Learning Agents Toolkit (ML-Agents) is an open-source project that enables games and simulations to serve as environments for training intelligent agents using deep reinforcement learning and imitation learning.
https://unity.com/products/machine-learning-agents
Other
17.12k stars 4.15k forks source link

OnActionReceived always returns zero values #5672

Closed dimok135 closed 2 years ago

dimok135 commented 2 years ago

When I start training 3DBall demo scene, OnActionReceived always returns zero values, so the cubes never rotate. Neither unity nor python shows any errors. I'm using Unity 2020.3.25f1, ML Release 18 (v2.1.0-exp.1, Python Package 0.27.0) Changing old Input system to the new version didn't help.

P.S. The same python package is working fine with an old version of mlagents on Unity 2018.

Video: https://www.youtube.com/watch?v=eQzFykqW3Ac

Unity project: https://www.dropbox.com/s/ukd64sfjfqtiuw0/mltest2020.7z?dl=0

Environment:

miguelalonsojr commented 2 years ago

From the video it seems like you're using very old version of the ml-agents and ml-agents-env packages (0.17 for both versions.)

image

Version 2.1.0-exp.1 of the ML-Agents Unity package depends on v0.27.0 of the python packages. Also, we no longer support TensorFlow. Please update the python packages, as well as, switch to PyTorch for the best results.

dimok135 commented 2 years ago

miguelalonsojr, Thank you very much! I had a mess in my python environment, so when I updated mlagents to 0.27, pip did something strange. I have checked it and now it works fine!

github-actions[bot] commented 2 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.