浏览代码

Add a script to record videos every X seconds or academy steps (#1414)

* Add GetTotalStepCount to the Academy

This will allow the RecordVideos plugin to record based on the current academy step
/develop-generalizationTraining-TrainerController
Jonathan Harper 6 年前
当前提交
655482bf
共有 2 个文件被更改,包括 21 次插入2 次删除
  1. 3
      .gitignore
  2. 20
      UnitySDK/Assets/ML-Agents/Scripts/Academy.cs

3
.gitignore


/UnitySDK/Assets/ML-Agents/Plugins/System.Numerics*
/UnitySDK/Assets/ML-Agents/Plugins/System.ValueTuple*
# Plugins
/UnitySDK/Assets/ML-Agents/VideoRecorder*
# Generated doc folders
/docs/html

20
UnitySDK/Assets/ML-Agents/Scripts/Academy.cs


/// <see cref="AcademyReset"/>.
int stepCount;
/// The number of total number of steps completed during the whole simulation. Incremented
/// each time a step is taken in the environment.
int totalStepCount;
/// Flag that indicates whether the inference/training mode of the
/// environment was switched by the external Brain. This impacts the
/// engine settings at the next environment step.

}
/// <summary>
/// Returns the current step counter (within the current epside).
/// Returns the current step counter (within the current episode).
/// Current episode number.
/// Current step count.
}
/// <summary>
/// Returns the total step counter.
/// </summary>
/// <returns>
/// Total step count.
/// </returns>
public int GetTotalStepCount()
{
return totalStepCount;
}
/// <summary>

AgentAct();
stepCount += 1;
totalStepCount += 1;
}
/// <summary>

正在加载...
取消
保存