def logs(self, prefix='<STR_LIT>'):
logs = []<EOL>logs += [('<STR_LIT>', np.mean(self.success_history))]<EOL>if self.compute_Q:<EOL><INDENT>logs += [('<STR_LIT>', np.mean(self.Q_history))]<EOL><DEDENT>logs += [('<STR_LIT>', self.n_episodes)]<EOL>if prefix != '<STR_LIT>' and not prefix.endswith('<STR_LIT:/>'):<EOL><INDENT>return [(prefix + '<STR_LIT:/>' + key, val) for key, val in logs]<EOL><DEDENT>else:<EOL><INDENT>return logs<EOL><DEDENT>
Generates a dictionary that contains all collected statistics.