浏览代码

move outside loop

/active-variablespeed
HH 4 年前
当前提交
3b07fb7d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      Project/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAgent.cs

2
Project/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAgent.cs


// velSum += item.rb.velocity;
// velSum += Mathf.Clamp(item.rb.velocity.magnitude, 0, m_maxWalkingSpeed);
velSum += Vector3.ClampMagnitude(item.rb.velocity, m_maxWalkingSpeed);
avgVelValue = velSum/counter;
avgVelValue = velSum/counter;
//This reward will approach 1 if it matches and approach zero as it deviates
matchSpeedReward =
Mathf.Exp(-0.1f * (cubeForward * walkingSpeed -

正在加载...
取消
保存