ml-agents icon indicating copy to clipboard operation
ml-agents copied to clipboard

Is buffer sensor observation parameters given wrongly?

Open x-mug opened this issue 3 years ago • 1 comments

Describe the bug the buffer sensor's observation spec is newed in this way: m_ObservationSpec = ObservationSpec.VariableLength(m_MaxNumObs, m_ObsSize); but the function is this public static ObservationSpec VariableLength(int obsSize, int maxNumObs) Does this mean the obsSize and maxNumObs are given reversedly

Environment (please complete the following information):

  • Unity Version: Unity 2021.3.5f
  • OS + version: Windows 10
  • ML-Agents version: MLAgents 2.2.1exp
  • Torch version: 1.7.1
  • Environment: Nothing special

x-mug avatar Sep 06 '22 07:09 x-mug

I think the parameters to the VariableLength function are misnamed but the functionality is correct (i.e. just swapping the parameters in the function declaration and where they are used in the function is the correct fix). I will confirm this. Thank you for pointing out the problem.

jrupert-unity avatar Sep 08 '22 18:09 jrupert-unity