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

Question How to not implement ISensor.GetCompressedObservation()

Discussion in 'ML-Agents' started by ladinig_lucca, May 4, 2021.

  1. ladinig_lucca

    ladinig_lucca

    Joined:
    Feb 2, 2021
    Posts:
    1
    In my code, I have to implement the ISensor interface. However, one method in particular, GetCompressedObservation(), is causing me trouble in that regard.In the docs, it says "For small observations, this should generally not be implemented". The values I need my agent to observe aren't that big, so I want to follow that, but I have no idea how not to implement an interface method.

    Right now, I left it with the VisualStudio default (throwing a NotImplementedException) and set GetCompressionType() to return SensorCompressionType.None (again, as per the docs). Is this enough? Is there a better way of doing this?
     
  2. mbaske

    mbaske

    Joined:
    Dec 31, 2017
    Posts:
    473