def copy_batch(self): """ Make a copy of the current batch :return: the copied batch """ b2 = Batch() for i in range(self.size): ep = Episode() sep = self.episodes[i] for j in range(self.episodes[i].len): ep.add(sep.state_pool[j], sep.action_pool[j], sep.reward_pool[j], sep.done_pool[j], sep.next_state_pool[j]) b2.add_episode(ep) return b2
def _update_episodes(self): for entry in self._rss.entries: Episode.add(entry, self)