浏览代码

add 2 zombie scene

/develop/cc-teammanager
HH 4 年前
当前提交
011ab9e5
共有 7 个文件被更改,包括 2019 次插入1007 次删除
  1. 10
      Project/Assets/ML-Agents/Examples/Hallway/Scripts/HallwayAgent.cs
  2. 4
      Project/Assets/ML-Agents/Examples/PushBlock/Scripts/ZombiePushBlockDeathEnvController.cs
  3. 1001
      Project/Assets/ML-Agents/Examples/PushBlock/Scenes/1ZombieVs2AgentsPushBlock.unity
  4. 1001
      Project/Assets/ML-Agents/Examples/PushBlock/Scenes/2ZombieVs3AgentsPushBlock.unity
  5. 9
      Project/Assets/ML-Agents/Examples/PushBlock/Scenes/2ZombieVs3AgentsPushBlock.unity.meta
  6. 1001
      Project/Assets/ML-Agents/Examples/PushBlock/Scenes/ZombieEatsPushBlock2Agents.unity
  7. 0
      /Project/Assets/ML-Agents/Examples/PushBlock/Scenes/1ZombieVs2AgentsPushBlock.unity.meta

10
Project/Assets/ML-Agents/Examples/Hallway/Scripts/HallwayAgent.cs


m_AgentRb = GetComponent<Rigidbody>();
m_GroundRenderer = ground.GetComponent<Renderer>();
m_GroundMaterial = m_GroundRenderer.material;
m_statsRecorder = Academy.Instance.StatsRecorder;
// m_statsRecorder = Academy.Instance.StatsRecorder;
}
public override void CollectObservations(VectorSensor sensor)

{
SetReward(1f);
StartCoroutine(GoalScoredSwapGroundMaterial(m_HallwaySettings.goalScoredMaterial, 0.5f));
m_statsRecorder.Add("Goal/Correct", 1, StatAggregationMethod.Sum);
// m_statsRecorder.Add("Goal/Correct", 1, StatAggregationMethod.Sum);
m_statsRecorder.Add("Goal/Wrong", 1, StatAggregationMethod.Sum);
// m_statsRecorder.Add("Goal/Wrong", 1, StatAggregationMethod.Sum);
}
EndEpisode();
}

symbolXGoal.transform.position = new Vector3(7f, 0.5f, 22.29f) + area.transform.position;
symbolOGoal.transform.position = new Vector3(-7f, 0.5f, 22.29f) + area.transform.position;
}
m_statsRecorder.Add("Goal/Correct", 0, StatAggregationMethod.Sum);
m_statsRecorder.Add("Goal/Wrong", 0, StatAggregationMethod.Sum);
// m_statsRecorder.Add("Goal/Correct", 0, StatAggregationMethod.Sum);
// m_statsRecorder.Add("Goal/Wrong", 0, StatAggregationMethod.Sum);
}
}

4
Project/Assets/ML-Agents/Examples/PushBlock/Scripts/ZombiePushBlockDeathEnvController.cs


public Quaternion StartingRot;
[HideInInspector]
public Rigidbody Rb;
[HideInInspector]
public Collider Col;
}

public Quaternion StartingRot;
[HideInInspector]
public Rigidbody Rb;
[HideInInspector]
public Collider Col;
}

//Kill/disable an agent
public void KillAgent(Collision col, Transform t)
{
print($"killed by {col.collider.name} by {t.name}");
print($"zombie {t.name} ate {col.collider.name}");
//End Episode
foreach (var item in AgentsList)
{

1001
Project/Assets/ML-Agents/Examples/PushBlock/Scenes/1ZombieVs2AgentsPushBlock.unity
文件差异内容过多而无法显示
查看文件

1001
Project/Assets/ML-Agents/Examples/PushBlock/Scenes/2ZombieVs3AgentsPushBlock.unity
文件差异内容过多而无法显示
查看文件

9
Project/Assets/ML-Agents/Examples/PushBlock/Scenes/2ZombieVs3AgentsPushBlock.unity.meta


fileFormatVersion: 2
guid: 473dc7cfdb610468983d530a0fb29bdc
timeCreated: 1506808980
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

1001
Project/Assets/ML-Agents/Examples/PushBlock/Scenes/ZombieEatsPushBlock2Agents.unity
文件差异内容过多而无法显示
查看文件

/Project/Assets/ML-Agents/Examples/PushBlock/Scenes/ZombieEatsPushBlock2Agents.unity.meta → /Project/Assets/ML-Agents/Examples/PushBlock/Scenes/1ZombieVs2AgentsPushBlock.unity.meta

正在加载...
取消
保存