Skip to content

Commit 5048aa2

Browse files
author
Chris Elion
authored
FoodCollectorAgent - don't convert bool to int (#4169)
1 parent 87f8753 commit 5048aa2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Project/Assets/ML-Agents/Examples/FoodCollector/Scripts/FoodCollectorAgent.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ public override void CollectObservations(VectorSensor sensor)
4646
var localVelocity = transform.InverseTransformDirection(m_AgentRb.velocity);
4747
sensor.AddObservation(localVelocity.x);
4848
sensor.AddObservation(localVelocity.z);
49-
sensor.AddObservation(System.Convert.ToInt32(m_Frozen));
50-
sensor.AddObservation(System.Convert.ToInt32(m_Shoot));
49+
sensor.AddObservation(m_Frozen);
50+
sensor.AddObservation(m_Shoot);
5151
}
5252
}
5353

0 commit comments

Comments
 (0)