Search Unity

SensorComponents

Discussion in 'ML-Agents' started by James_Initus, Jun 23, 2020.

  1. James_Initus

    James_Initus

    Joined:
    May 26, 2015
    Posts:
    75
    I've added a Ray Perception Sensor 3D to an agent. I understand the use case for this component however I have a question.

    I assume that there is no need to interface with this component, let's say, if it detects a wall we don't need to decrease reward values or increase them when near a goal?

    These become part of the observation details and I assume the algorithm will make decisions based solely on them just being reported on?

    thanks
     
  2. MrWetsnow

    MrWetsnow

    Joined:
    Jan 5, 2020
    Posts:
    60
    You are correct that you don't need to do anything. The observations from the Perception Sensor will be added to your other observations (if you have them). If you want it to understand when it sees specific objects, make sure to set the Detectable Tags array and list out all the tags that it should care about. Then, of course, make sure your elements are tagged in Unity. For example, if you care about walls, make sure all your walls have a 'Wall' tag and then add that to the Sensor component.
     
    ervteng_unity likes this.