浏览代码

fix deleted observations (#4366)

/MLA-1734-demo-provider
GitHub 4 年前
当前提交
8bbcfc28
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 5
      Project/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DAgent.cs

5
Project/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DAgent.cs


public override void CollectObservations(VectorSensor sensor)
{
sensor.AddObservation(gameObject.transform.rotation.z);
sensor.AddObservation(gameObject.transform.rotation.x);
sensor.AddObservation(ball.transform.position - gameObject.transform.position);
sensor.AddObservation(m_BallRb.velocity);
public override void OnActionReceived(ActionBuffers actionBuffers)
{
var actionZ = 2f * Mathf.Clamp(actionBuffers.ContinuousActions[0], -1f, 1f);

正在加载...
取消
保存