浏览代码

cast time penalty to float (#5424) (#5426)

Co-authored-by: andrewcoh <54679309+andrewcoh@users.noreply.github.com>
/release_18_branch
GitHub 4 年前
当前提交
58164635
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 4
      Project/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerEnvController.cs

4
Project/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerEnvController.cs


{
if (scoredTeam == Team.Blue)
{
m_BlueAgentGroup.AddGroupReward(1 - m_ResetTimer / MaxEnvironmentSteps);
m_BlueAgentGroup.AddGroupReward(1 - (float)m_ResetTimer / MaxEnvironmentSteps);
m_PurpleAgentGroup.AddGroupReward(1 - m_ResetTimer / MaxEnvironmentSteps);
m_PurpleAgentGroup.AddGroupReward(1 - (float)m_ResetTimer / MaxEnvironmentSteps);
m_BlueAgentGroup.AddGroupReward(-1);
}
m_PurpleAgentGroup.EndGroupEpisode();

正在加载...
取消
保存