Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

Which observation works better?

Discussion in 'ML-Agents' started by i-make-robots, Aug 23, 2022.

  1. i-make-robots

    i-make-robots

    Joined:
    Aug 27, 2017
    Posts:
    17
    Hi!

    Which is better for observing distance?
    a)
    Code (CSharp):
    1. sensor.AddObservation(diff.magnitude);
    b)
    Code (CSharp):
    1. float m = diff.magnitude;
    2. sensor.AddObservation(Math.Max(1f,m));
    3. sensor.AddObservation(Math.Max(10f, m)/10f);
    4. sensor.AddObservation(Math.Max(100f, m)/100f);
    My understanding is that observations should be normalized to [-1,1], especially if
    network_settings > normalize: false
    . My feeling is throw every observation at the network and let it figure out what is relevant.
     
  2. Soulkata

    Soulkata

    Joined:
    Nov 15, 2015
    Posts:
    6
    Deppends on your case...
    The direction is important? In every axis?