浏览代码

Prevent rewards added to disabled agents

/develop/teammanager/cubewar-nocycle
Ervin Teng 4 年前
当前提交
a4ead881
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 5
      Project/Assets/ML-Agents/Examples/CubeWars/Scripts/CubeWarArea.cs

5
Project/Assets/ML-Agents/Examples/CubeWars/Scripts/CubeWarArea.cs


Debug.Log("Small Agents Win");
foreach (var smallAgent in smallAgents)
{
smallAgent.SetReward(1.0f / numLiveAgents);
if (smallAgent.gameObject.activeInHierarchy)
{
smallAgent.SetReward(1.0f / numLiveAgents);
}
}
foreach (var largeAgent in largeAgents)
{

正在加载...
取消
保存