浏览代码

[Added the unity side code]

/develop-generalizationTraining-TrainerController
vincentpierre 6 年前
当前提交
d993c549
共有 3 个文件被更改,包括 18 次插入0 次删除
  1. 1
      unity-environment/Assets/ML-Agents/Scripts/Academy.cs
  2. 15
      unity-environment/Assets/ML-Agents/Scripts/Agent.cs
  3. 2
      unity-environment/Assets/ML-Agents/Scripts/Batcher.cs

1
unity-environment/Assets/ML-Agents/Scripts/Academy.cs


(MLAgents.CommunicatorObjects.BrainTypeProto)
brain.brainType));
}
academyParameters.EnvironmentParameters =
new MLAgents.CommunicatorObjects.EnvironmentParametersProto();

15
unity-environment/Assets/ML-Agents/Scripts/Agent.cs


public float[] vectorActions;
public string textActions;
public List<float> memories;
public float value;
}
/// <summary>

public void UpdateTextAction(string textActions)
{
action.textActions = textActions;
}
/// <summary>
/// Updates the value of the agent.
/// </summary>
/// <param name="textActions">Text actions.</param>
public void UpdateValueAction(float value)
{
action.value = value;
}
protected float GetValueEstimate()
{
return action.value;
}
/// <summary>

2
unity-environment/Assets/ML-Agents/Scripts/Batcher.cs


action.Memories.ToList());
agent.UpdateTextAction(
action.TextActions);
agent.UpdateValueAction(
action.Value);
}
}

正在加载...
取消
保存