浏览代码

Merge branch 'soccer-2v1' into asymm-envs

/asymm-envs
Andrew Cohen 5 年前
当前提交
1d020fa7
共有 6 个文件被更改,包括 597 次插入1436 次删除
  1. 13
      Project/Assets/ML-Agents/Examples/Soccer/Prefabs/StrikersVsGoalieField.prefab
  2. 4
      Project/Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs
  3. 10
      Project/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerFieldArea.cs
  4. 1001
      Project/Assets/ML-Agents/Examples/Soccer/TFModels/Goalie.nn
  5. 1001
      Project/Assets/ML-Agents/Examples/Soccer/TFModels/Striker.nn
  6. 4
      config/trainer_config.yaml

13
Project/Assets/ML-Agents/Examples/Soccer/Prefabs/StrikersVsGoalieField.prefab


team: 0
area: {fileID: 114559182131992928}
position: 1
timePenalty: 0
agentRb: {fileID: 0}
--- !u!114 &114320493772006642
MonoBehaviour:

team: 1
area: {fileID: 114559182131992928}
position: 0
timePenalty: 0
agentRb: {fileID: 0}
--- !u!114 &114516244030127556
MonoBehaviour:

m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 65
m_IsActive: 0
m_IsActive: 1
--- !u!4 &4320016866705494
Transform:
m_ObjectHideFlags: 0

m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 65
m_IsActive: 0
m_IsActive: 1
--- !u!4 &4422946662457316
Transform:
m_ObjectHideFlags: 0

m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 65
m_IsActive: 0
m_IsActive: 1
--- !u!4 &4816505641171472
Transform:
m_ObjectHideFlags: 0

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7710644083894658244}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -1524, y: 160, z: 0}
m_LocalScale: {x: 50, y: 420, z: 820}
m_LocalPosition: {x: -1550, y: 150, z: 0}
m_LocalScale: {x: 100, y: 400, z: 800}
m_Children: []
m_Father: {fileID: 4109868016055942}
m_RootOrder: 0

team: 1
area: {fileID: 114559182131992928}
position: 0
timePenalty: 0
agentRb: {fileID: 0}
--- !u!114 &2562571719799803906
MonoBehaviour:

4
Project/Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs


team = Team.Purple;
m_Transform = new Vector3(transform.position.x + 4f, .5f, transform.position.z);
}
m_Power = 2000f;
m_Power = 2000f;
m_Power = 3000f;
m_Power = 2000f;
m_LateralSpeed = 0.3f;
m_ForwardSpeed = 1.0f;
}

10
Project/Assets/ML-Agents/Examples/Soccer/Scripts/SoccerFieldArea.cs


}
}
public Vector3 GetBallSpawnPosition()
{
var randomSpawnPos = ground.transform.position +
new Vector3(0f, 0f, 0f);
randomSpawnPos.y = ground.transform.position.y + .5f;
return randomSpawnPos;
}
ball.transform.position = GetBallSpawnPosition();
ball.transform.position = ballStartingPos;
ballRb.velocity = Vector3.zero;
ballRb.angularVelocity = Vector3.zero;

1001
Project/Assets/ML-Agents/Examples/Soccer/TFModels/Goalie.nn
文件差异内容过多而无法显示
查看文件

1001
Project/Assets/ML-Agents/Examples/Soccer/TFModels/Striker.nn
文件差异内容过多而无法显示
查看文件

4
config/trainer_config.yaml


num_layers: 2
self_play:
window: 10
play_against_latest_model_ratio: 0.5
play_against_latest_model_ratio: 0.25
save_steps: 50000
swap_steps: 25000
team_change: 200000

num_layers: 2
self_play:
window: 10
play_against_latest_model_ratio: 0.5
play_against_latest_model_ratio: 0.25
save_steps: 50000
swap_steps: 100000
team_change: 200000

正在加载...
取消
保存