浏览代码

only rewards for alive agents

/develop/cc-teammanager
HH 4 年前
当前提交
50953504
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 6
      Project/Assets/ML-Agents/Examples/PushBlock/Scripts/ZombiePushBlockDeathEnvController.cs

6
Project/Assets/ML-Agents/Examples/PushBlock/Scripts/ZombiePushBlockDeathEnvController.cs


//Give Agent Rewards
foreach (var item in AgentsList)
{
item.Agent.AddReward(score);
if (item.Agent.gameObject.activeInHierarchy)
{
print($"{item.Agent.name} scored");
item.Agent.AddReward(score);
}
}
// Swap ground material for a bit to indicate we scored.

正在加载...
取消
保存