diff --git a/Project/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerEnvController.cs b/Project/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerEnvController.cs index 0b7cd9ce8d..d76d43ef92 100644 --- a/Project/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerEnvController.cs +++ b/Project/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerEnvController.cs @@ -100,12 +100,12 @@ public void GoalTouched(Team scoredTeam) { if (scoredTeam == Team.Blue) { - m_BlueAgentGroup.AddGroupReward(1 - m_ResetTimer / MaxEnvironmentSteps); + m_BlueAgentGroup.AddGroupReward(1 - (float)m_ResetTimer / MaxEnvironmentSteps); m_PurpleAgentGroup.AddGroupReward(-1); } else { - m_PurpleAgentGroup.AddGroupReward(1 - m_ResetTimer / MaxEnvironmentSteps); + m_PurpleAgentGroup.AddGroupReward(1 - (float)m_ResetTimer / MaxEnvironmentSteps); m_BlueAgentGroup.AddGroupReward(-1); } m_PurpleAgentGroup.EndGroupEpisode();