浏览代码

fix reward calculations (#5418)

/release_18_branch
GitHub 4 年前
当前提交
f5b39734
共有 2 个文件被更改,包括 11 次插入2 次删除
  1. 11
      Project/Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs
  2. 2
      Project/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerEnvController.cs

11
Project/Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs


public override void Initialize()
{
m_Existential = 1f / MaxStep;
SoccerEnvController envController = GetComponentInParent<SoccerEnvController>();
if (envController != null)
{
m_Existential = 1f / envController.MaxEnvironmentSteps;
}
else
{
m_Existential = 1f / MaxStep;
}
m_BehaviorParameters = gameObject.GetComponent<BehaviorParameters>();
if (m_BehaviorParameters.TeamId == (int)Team.Blue)
{

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


/// Max Academy steps before this platform resets
/// </summary>
/// <returns></returns>
[Header("Max Environment Steps")] public int MaxEnvironmentSteps = 25000;
[Tooltip("Max Environment Steps")] public int MaxEnvironmentSteps = 25000;
/// <summary>
/// The area bounds.

正在加载...
取消
保存