|
|
|
|
|
|
} |
|
|
|
# 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 = {} |
|
|
|
|
|
|
|