浏览代码

add timestep bonus to loss

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

4
Project/Assets/ML-Agents/Examples/Tennis/Scripts/HitWall.cs


void AgentAWins()
{
m_AgentA.SetReward(1 + m_AgentA.timePenalty);
m_AgentB.SetReward(-1);
m_AgentB.SetReward(-1 - m_AgentB.timePenalty);
m_AgentA.score += 1;
Reset();

{
m_AgentA.SetReward(-1);
m_AgentA.SetReward(-1 - m_AgentA.timePenalty);
m_AgentB.SetReward(1 + m_AgentB.timePenalty);
m_AgentB.score += 1;
Reset();

2
config/trainer_config.yaml


time_horizon: 1000
self_play:
window: 10
play_against_latest_model_ratio: 0.1
play_against_latest_model_ratio: 0.5
save_steps: 50000
swap_steps: 50000
team_change: 100000

正在加载...
取消
保存