浏览代码

update striker vs goalie brain/retrain

/asymm-envs
Andrew Cohen 5 年前
当前提交
e5c62cb8
共有 6 个文件被更改,包括 592 次插入1431 次删除
  1. 3
      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

3
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:

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

正在加载...
取消
保存