浏览代码

try curiosity

/develop/dodgeball-tests
HH 4 年前
当前提交
fce83c8a
共有 3 个文件被更改,包括 29 次插入10 次删除
  1. 18
      Project/Assets/ML-Agents/Examples/FPS_Game/Scenes/FPS_Game.unity
  2. 6
      Project/Assets/ML-Agents/Examples/FPS_Game/Scripts/DodgeBallGameController.cs
  3. 15
      config/ppo/DodgeBall.yaml

18
Project/Assets/ML-Agents/Examples/FPS_Game/Scenes/FPS_Game.unity


propertyPath: Cam
value:
objectReference: {fileID: 8697938321410268831}
- target: {fileID: 6960991000376283102, guid: 1c6bcdaf8b76745d8918fc47c464885e,
type: 3}
propertyPath: UseVectorObs
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6960991001359725249, guid: 1c6bcdaf8b76745d8918fc47c464885e,
type: 3}
propertyPath: m_Materials.Array.data[0]

propertyPath: Cam
value:
objectReference: {fileID: 8697938321410268831}
- target: {fileID: 6960991000376283102, guid: 1c6bcdaf8b76745d8918fc47c464885e,
type: 3}
propertyPath: UseVectorObs
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8366924173548761677, guid: 1c6bcdaf8b76745d8918fc47c464885e,
type: 3}
propertyPath: m_LocalPosition.z

- target: {fileID: 9116796388679672956, guid: 1c6bcdaf8b76745d8918fc47c464885e,
type: 3}
propertyPath: m_LocalRotation.x
value: 0.023514416
value: 0.023514433
value: 3.1894046e-10
value: -0.0000000052765476
value: -7.5017536e-12
value: 1.2410933e-10
objectReference: {fileID: 0}
- target: {fileID: 9116796388679672959, guid: 1c6bcdaf8b76745d8918fc47c464885e,
type: 3}

m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8697938321410268827}
m_LocalRotation: {x: -7.5017536e-12, y: 0.9997235, z: -0.023514416, w: -3.1894046e-10}
m_LocalRotation: {x: 1.2410933e-10, y: 0.9997235, z: -0.023514433, w: 0.0000000052765476}
m_LocalPosition: {x: 20.4, y: 3.1269999, z: 4.1}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []

6
Project/Assets/ML-Agents/Examples/FPS_Game/Scripts/DodgeBallGameController.cs


public Color Team0Color;
public List<AgentInfo> Team1Players;
public Color Team1Color;
public List<DodgeBall> dodgeBallsListTeamO;
public List<DodgeBall> dodgeBallsListTeam1;
// public List<DodgeBall> dodgeBallsListTeamO;
// public List<DodgeBall> dodgeBallsListTeam1;
public List<DodgeBall> AllBallsList;
public Dictionary<DodgeBallAgent, AgentInfo> PlayersDict = new Dictionary<DodgeBallAgent, AgentInfo>();

//SET AGENT/TEAM REWARDS HERE
AgentInfo info = PlayersDict[agent];
int hitTeamID = info.TeamID;
var HitTeamList = hitTeamID == 0 ? Team0Players : Team1Players;
// var HitTeamList = hitTeamID == 0 ? Team0Players : Team1Players;
var HitByTeamList = hitTeamID == 1 ? Team0Players : Team1Players;
// int hitByTeamID = hitTeamID == 0? 1: 0; //assumes only 2 teams

15
config/ppo/DodgeBall.yaml


hidden_units: 256
num_layers: 2
vis_encode_type: simple
# reward_signals:
# extrinsic:
# gamma: 0.99
# strength: 1.0
extrinsic:
gamma: 0.99
strength: 1.0
extrinsic:
gamma: 0.99
strength: 1.0
curiosity:
gamma: 0.99
strength: 0.02
encoding_size: 256
learning_rate: 0.0003
keep_checkpoints: 5
max_steps: 2000000
time_horizon: 64
正在加载...
取消
保存