Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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?