浏览代码

bonus to single agent

/asymm-envs
Andrew Cohen 5 年前
当前提交
033b58ba
共有 1 个文件被更改,包括 9 次插入1 次删除
  1. 10
      Project/Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs

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


public override void OnActionReceived(float[] vectorAction)
{
// Existential penalty for strikers.
AddReward(-1f / 3000f);
if (team == Team.Purple)
{
AddReward(1f / 3000f);
}
else
{
AddReward(-1f / 3000f);
}
MoveAgent(vectorAction);
}

正在加载...
取消
保存