浏览代码

ball

/asymm-envs
Andrew Cohen 5 年前
当前提交
f21304a9
共有 2 个文件被更改,包括 5 次插入7 次删除
  1. 10
      Project/Assets/ML-Agents/Examples/Tennis/Scripts/TennisArea.cs
  2. 2
      config/trainer_config.yaml

10
Project/Assets/ML-Agents/Examples/Tennis/Scripts/TennisArea.cs


{
var ballOut = Random.Range(12.5f, 14f);
var flip = Random.Range(0, 2);
var serve = 1f;
ball.transform.position = new Vector3(-ballOut, 1f, 0f) + transform.position;
}
else
{
ball.transform.position = new Vector3(ballOut, 1f, 0f) + transform.position;
serve = -1f;
m_BallRb.velocity = new Vector3(0f, 20f, 0f);
ball.transform.position = new Vector3(serve * ballOut, 1f, 0f) + transform.position;
m_BallRb.velocity = new Vector3(serve * 2f, 20f, 0f);
ball.transform.localScale = new Vector3(.5f, .5f, .5f);
m_BallScript.ResetPoint();
}

2
config/trainer_config.yaml


window: 10
play_against_latest_model_ratio: 0.5
save_steps: 50000
swap_steps: 2000
swap_steps: 50000
team_change: 100000
Goalie:

正在加载...
取消
保存