|
|
|
|
|
|
# If any lessons were incremented or the environment is |
|
|
|
# ready to be reset |
|
|
|
if (self.meta_curriculum |
|
|
|
and any(lessons_incremented.values()) |
|
|
|
or self.env.global_done): |
|
|
|
and any(lessons_incremented.values())): |
|
|
|
curr_info = self._reset_env() |
|
|
|
for brain_name, trainer in self.trainers.items(): |
|
|
|
trainer.end_episode() |
|
|
|
|
|
|
elif self.env.global_done: |
|
|
|
curr_info = self._reset_env() |
|
|
|
for brain_name, trainer in self.trainers.items(): |
|
|
|
trainer.end_episode() |
|
|
|
|
|
|
|
# Decide and take an action |
|
|
|
take_action_vector, \ |
|
|
|