How to double check sensor.AddOneHotObservation()

Hi everyone,

I would like to double check whether hot-encoded identity I feed the sensor via sensor.AddOneHotObservation() is correct. Therefore I was wondering whether it is possible to examine the what the values that are being fed to the sensor look like. Print and debug.logs do not work, therefore I was wondering whether there is another method to examine whether the hot-encoding is correct.
In particular, I was wondering whether the AddOneHotObservation, will lead to differences in training since I am currently hot encoding as such:

sensor.AddObservation(nextTarget == 0 ? 1.0f : 0.0f);
sensor.AddObservation(nextTarget == 1 ? 1.0f : 0.0f);
sensor.AddObservation(nextTarget == 2 ? 1.0f : 0.0f);
sensor.AddObservation(nextTarget == 3 ? 1.0f : 0.0f);

Id be happy to hear from you.

1 Like

Hi @weight_theta

You can add an int array with sensor.AddObservation and then Debug.Log/print can be used on the int array

1 Like