浏览代码

add local reward to plot

/develop/coma2
Andrew Cohen 4 年前
当前提交
74885bab
共有 1 个文件被更改,包括 14 次插入0 次删除
  1. 14
      ml-agents/mlagents/trainers/ppo/trainer.py

14
ml-agents/mlagents/trainers/ppo/trainer.py


gamma=self.optimizer.reward_signals[name].gamma,
lambd=self.hyperparameters.lambd,
)
test_v, _ = get_team_returns(
rewards=local_rewards,
baseline_estimates=baseline_estimates,
v_estimates=v_estimates,
value_next=value_next[name],
gamma=1,
lambd=1,
)
#print("loc", local_rewards[-1])
#print("tdlam", returns_v)

# gamma=self.optimizer.reward_signals[name].gamma,
# lambd=self.hyperparameters.lambd,
#)
self._stats_reporter.add_stat(
f"Policy/{self.optimizer.reward_signals[name].name.capitalize()} Sum Rewards",
np.mean(test_v),
)
self._stats_reporter.add_stat(
f"Policy/{self.optimizer.reward_signals[name].name.capitalize()} TD Lam",
np.mean(returns_v),

正在加载...
取消
保存