浏览代码

Incorporate generalization checks for resetting parameters in take_step

/develop-generalizationTraining-TrainerController
sankalp04 5 年前
当前提交
0b006719
共有 1 个文件被更改,包括 8 次插入10 次删除
  1. 18
      ml-agents/mlagents/trainers/trainer_controller.py

18
ml-agents/mlagents/trainers/trainer_controller.py


}
# Attempt to increment the lessons of the brains who
# were ready.
lessons_incremented = self.meta_curriculum.increment_lessons(
self._get_measure_vals(), reward_buff_sizes=reward_buff_sizes
)
elif (self.sampler_manager is not None):
reward_buff_mean = {
k: np.mean(t.reward_buffer) if len(t.reward_buffer) > 0 else 0.0 for (k, t) in self.trainers.items()
}
lessons_incremented = {
k: (t > self.min_reward) for (k, t) in reward_buff_mean.items()
}
if (self.meta_curriculum):
lessons_incremented = self.meta_curriculum.increment_lessons(
self._get_measure_vals(), reward_buff_sizes=reward_buff_sizes
)
elif ((self.sampler_manager is not None) and (self.lesson_controller is not None)):
lessons_incremented = self.lesson_controller.check_change_lesson(
self._get_measure_vals(), reward_buff_sizes=reward_buff_sizes
)
else:
lessons_incremented = {}

正在加载...
取消
保存