浏览代码

Update prefabs

/MLA-1734-demo-provider
Arthur Juliani 4 年前
当前提交
b3638ad6
共有 3 个文件被更改,包括 39 次插入16 次删除
  1. 19
      Project/Assets/ML-Agents/Examples/GridWorld/Prefabs/Area.prefab
  2. 31
      Project/Assets/ML-Agents/Examples/GridWorld/Scenes/GridWorld.unity
  3. 5
      Project/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs

19
Project/Assets/ML-Agents/Examples/GridWorld/Prefabs/Area.prefab


m_Name:
m_EditorClassIdentifier:
m_BrainParameters:
vectorObservationSize: 0
numStackedVectorObservations: 1
vectorActionSize: 05000000
vectorActionDescriptions: []
vectorActionSpaceType: 0
m_Model: {fileID: 11400000, guid: a812f1ce7763a4a0c912717f3594fe20, type: 3}
VectorObservationSize: 2
NumStackedVectorObservations: 1
VectorActionSize: 05000000
VectorActionDescriptions: []
VectorActionSpaceType: 0
m_Model: {fileID: 0}
m_UseChildActuators: 1
m_ObservableAttributeHandling: 0
--- !u!114 &114650561397225712
MonoBehaviour:
m_ObjectHideFlags: 0

agentParameters:
maxStep: 0
hasUpgradedFromAgentParameters: 1
maxStep: 100
MaxStep: 100
gridGoal: 0
--- !u!114 &114889700908650620
MonoBehaviour:
m_ObjectHideFlags: 0

m_Width: 84
m_Height: 64
m_Grayscale: 0
m_ObservationStacks: 1
m_Compression: 1
--- !u!114 &7980686505185502968
MonoBehaviour:

m_Script: {fileID: 11500000, guid: 3a6da8f78a394c6ab027688eab81e04d, type: 3}
m_Name:
m_EditorClassIdentifier:
debugCommandLineOverride:
--- !u!1 &1625008366184734
GameObject:
m_ObjectHideFlags: 0

31
Project/Assets/ML-Agents/Examples/GridWorld/Scenes/GridWorld.unity


agentParameters:
maxStep: 100
hasUpgradedFromAgentParameters: 1
maxStep: 100
MaxStep: 100
gridGoal: 0
--- !u!65 &125487788
BoxCollider:
m_ObjectHideFlags: 0

m_Name:
m_EditorClassIdentifier:
m_BrainParameters:
vectorObservationSize: 0
numStackedVectorObservations: 1
vectorActionSize: 05000000
vectorActionDescriptions: []
vectorActionSpaceType: 0
VectorObservationSize: 2
NumStackedVectorObservations: 1
VectorActionSize: 05000000
VectorActionDescriptions: []
VectorActionSpaceType: 0
m_Model: {fileID: 11400000, guid: a812f1ce7763a4a0c912717f3594fe20, type: 3}
m_InferenceDevice: 0
m_BehaviorType: 0

m_UseChildActuators: 1
m_ObservableAttributeHandling: 0
--- !u!114 &125487791
MonoBehaviour:
m_ObjectHideFlags: 0

m_RenderTexture: {fileID: 8400000, guid: 114608d5384404f89bff4b6f88432958, type: 2}
m_SensorName: RenderTextureSensor
m_Grayscale: 0
m_ObservationStacks: 1
m_Compression: 1
--- !u!1 &260425459
GameObject:

type: 3}
propertyPath: compression
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114889700908650620, guid: 5c2bd19e4bbda4991b74387ca5d28156,
type: 3}
propertyPath: m_Compression
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114935253044749092, guid: 5c2bd19e4bbda4991b74387ca5d28156,
type: 3}
propertyPath: m_BrainParameters.VectorObservationSize
value: 2
objectReference: {fileID: 0}
- target: {fileID: 114935253044749092, guid: 5c2bd19e4bbda4991b74387ca5d28156,
type: 3}
propertyPath: m_Model
value:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 5c2bd19e4bbda4991b74387ca5d28156, type: 3}

5
Project/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs


public override void CollectObservations(VectorSensor sensor)
{
Array values = Enum.GetValues(typeof(GridGoal));
sensor.AddOneHotObservation((int)gridGoal, values.Length);
int goalNum = (int)gridGoal;
sensor.AddOneHotObservation(goalNum, values.Length);
}
public override void WriteDiscreteActionMask(IDiscreteActionMask actionMask)

if (gridGoal == hitObject)
{
SetReward(1f);
Debug.Log(1);
Debug.Log(-1);
}
}

正在加载...
取消
保存