浏览代码

soccertwos config

/asymm-envs
Andrew Cohen 4 年前
当前提交
5a5e13fa
共有 2 个文件被更改,包括 8 次插入9 次删除
  1. 13
      Project/Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs
  2. 4
      config/trainer_config.yaml

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


public override void OnActionReceived(float[] vectorAction)
{
// Generic gets nothing
if (position == Position.Striker)
if (position == Position.Goalie)
// Existential penalty for Strikers.
AddReward(-1f / 3000f);
// Existential bonus for Goalies.
AddReward(1f / 3000f);
else if (position == Position.Goalie)
else
// Existential bonus for Goalies.
AddReward(1f / 3000f);
// Existential penalty for Strikers/Generic.
AddReward(-1f / 3000f);
}
MoveAgent(vectorAction);
}

4
config/trainer_config.yaml


Goalie:
normalize: false
max_steps: 3.0e7
max_steps: 5.0e7
learning_rate_schedule: constant
batch_size: 2048
buffer_size: 20480

Striker:
normalize: false
max_steps: 3.0e7
max_steps: 5.0e7
learning_rate_schedule: constant
batch_size: 2048
buffer_size: 20480

正在加载...
取消
保存