浏览代码

resolved the comments

/develop-generalizationTraining-TrainerController
Vincent Gao 6 年前
当前提交
3946d7a2
共有 1 个文件被更改,包括 20 次插入19 次删除
  1. 39
      unity-environment/Assets/ML-Agents/Scripts/CoreBrainHeuristic.cs

39
unity-environment/Assets/ML-Agents/Scripts/CoreBrainHeuristic.cs


/// Uses the Decision Component to decide that action to take
public void DecideAction(Dictionary<Agent, AgentInfo> agentInfo)
{
if (coord!=null)
{
if (coord!=null)
{
}
if (decision == null)
}
if (decision == null)
agent.UpdateVectorAction(decision.Decide(
agent.UpdateVectorAction(decision.Decide(
agentInfo[agent].stackedVectorObservation,
agentInfo[agent].visualObservations,
agentInfo[agent].reward,

}
agentInfo[agent].stackedVectorObservation,
agentInfo[agent].visualObservations,
agentInfo[agent].reward,
agentInfo[agent].done,
agentInfo[agent].memories));
agentInfo[agent].stackedVectorObservation,
agentInfo[agent].visualObservations,
agentInfo[agent].reward,
agentInfo[agent].done,
agentInfo[agent].memories));
}
}

#if UNITY_EDITOR
EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);
broadcast = EditorGUILayout.Toggle(new GUIContent("Broadcast",
"If checked, the brain will broadcast states and actions to Python."), broadcast);
if (brain.gameObject.GetComponent<Decision>() == null)
{
#if UNITY_EDITOR
EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);
broadcast = EditorGUILayout.Toggle(new GUIContent("Broadcast",
"If checked, the brain will broadcast states and actions to Python."), broadcast);
if (brain.gameObject.GetComponent<Decision>() == null)
{
}
#endif
}
#endif
}
}
正在加载...
取消
保存