Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Question Adding noise to RayPerceptionSensorComponent3D in ml-agents

Discussion in 'ML-Agents' started by evan-duf, Nov 18, 2020.

  1. evan-duf

    evan-duf

    Joined:
    Oct 12, 2020
    Posts:
    4
    Hi,

    I'm currently working on a school project using your fantastic framework.
    I would need to add some random noise to the agent perception to make some robustness tests, I can't seem to find where the changes should be done... I don't speak C# so maybe there's something I'm missing in the agent scripts, but I 'm not finding it.

    Do you know if it's possible, and do you have any idea of where to look it up ?

    Thank you
     
  2. ShirelJosef

    ShirelJosef

    Joined:
    Nov 11, 2019
    Posts:
    21
    From quick digging I think you might need to change the sensor code:
    ml-agents/com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensor.cs

    which means you will need to install the ml-agents package with local Installation for Development
    https://github.com/Unity-Technologies/ml-agents/blob/release_9_docs/docs/Installation.md

    Hopefully, some unity official will dis/agree with my suggestions, but I think you should check this direction.
     
  3. evan-duf

    evan-duf

    Joined:
    Oct 12, 2020
    Posts:
    4
    Thanks, I'm using Release8 as the project started a while ago, but I think that file is indeed the one I was looking for :)
    I'll see if I can copy and make a new noisy sensor out of it