浏览代码

fix the basic decision to return 1 instead of null

/develop-generalizationTraining-TrainerController
vincentpierre 7 年前
当前提交
b237e6c2
共有 1 个文件被更改,包括 11 次插入10 次删除
  1. 21
      unity-environment/Assets/ML-Agents/Examples/Basic/Scripts/BasicDecision.cs

21
unity-environment/Assets/ML-Agents/Examples/Basic/Scripts/BasicDecision.cs


using System.Collections.Generic;
using UnityEngine;
public class BasicDecision : MonoBehaviour, Decision {
public class BasicDecision : MonoBehaviour, Decision
{
public float[] Decide(List<float> state, List<Camera> observation, float reward, bool done, float[] memory)
{
return new float[1]{ 1f };
public float[] Decide (List<float> state, List<Camera> observation, float reward, bool done, float[] memory)
{
return default(float[]);
}
}
public float[] MakeMemory(List<float> state, List<Camera> observation, float reward, bool done, float[] memory)
{
return new float[0];
public float[] MakeMemory (List<float> state, List<Camera> observation, float reward, bool done, float[] memory)
{
return default(float[]);
}
}
}
正在加载...
取消
保存