def make_plots(self, open_plot=True): ''' Summary: Makes plots for the current experiment. ''' if self.is_markov_game: agent_name_ls = [agent_name for agent_name in self.agents.keys()] else: agent_name_ls = [a.get_name() for a in self.agents] if self.experiment_name_prefix != "": plot_file_name = self.experiment_name_prefix + str(self.mdp) else: plot_file_name = "" chart_utils.make_plots(self.exp_directory, agent_name_ls, episodic=self.is_episodic, plot_file_name=plot_file_name, cumulative=self.cumulative_plot, track_disc_reward=self.track_disc_reward, open_plot=open_plot) if self.track_success: chart_utils.make_plots(os.path.join(self.exp_directory, "success"), agent_name_ls, episodic=True, plot_file_name="success_rate", cumulative=False, track_disc_reward=False, open_plot=open_plot, new_title="Success Rate", new_x_label="Episode Number", new_y_label="Avg. Success %")
def make_plots(self, open_plot=True): ''' Summary: Makes plots for the current experiment. ''' if self.is_markov_game: agent_name_ls = [agent_name for agent_name in self.agents.keys()] else: agent_name_ls = [a.get_name() for a in self.agents] if self.experiment_name_prefix != "": plot_file_name = self.experiment_name_prefix + str(self.mdp) else: plot_file_name = "" chart_utils.make_plots(self.exp_directory, agent_name_ls, episodic=self.is_episodic, plot_file_name=plot_file_name, cumulative=self.cumulative_plot, track_disc_reward=self.track_disc_reward, open_plot=open_plot) if self.track_success: print(os.path.join("success", self.exp_directory)) chart_utils.make_plots(os.path.join(self.exp_directory, "success"), agent_name_ls, episodic=True, plot_file_name="success_rate", cumulative=False, track_disc_reward=False, open_plot=open_plot, new_title="Success Rate", new_x_label="Episode Number", new_y_label="Avg. Success %")
def make_beta_val_plot(all_policies, results_dir, is_agent_in_control=False): ''' Args: all_policies (list) results_dir (str) ''' beta_range_file = file(os.path.join(results_dir, "beta_range.csv"), "r") beta_range = [ float(beta) for beta in beta_range_file.read().split(",") if beta != "" ] print beta_range # Set title and axes. chart_utils.CUSTOM_TITLE = "DIBS: Value vs. $\\beta$" if is_agent_in_control: chart_utils.CUSTOM_TITLE = "AC-" + chart_utils.CUSTOM_TITLE chart_utils.X_AXIS_LABEL = "$\\beta$" chart_utils.Y_AXIS_LABEL = "$V^{\\pi}$" chart_utils.X_AXIS_START_VAL = beta_range[0] chart_utils.X_AXIS_INCREMENT = beta_range[1] - beta_range[0] chart_utils.Y_AXIS_END_VAL = None # Val Plot. chart_utils.make_plots(experiment_dir=results_dir, experiment_agents=all_policies, plot_file_name="results_new3", cumulative=False, episodic=False, track_disc_reward=False)
def make_plots(self): ''' Summary: Makes plots for the current experiment. ''' chart_utils.make_plots(self.exp_directory, self.agents, episodic=self.is_episodic)
def make_plots(self, open_plot=True): ''' Summary: Makes plots for the current experiment. ''' chart_utils.make_plots(self.exp_directory, self.agents, episodic=self.is_episodic, cumulative=self.cumulative_plot, is_rec_disc_reward=self.is_rec_disc_reward, open_plot=open_plot)
def make_plots(self, open_plot=True): ''' Summary: Makes plots for the current experiment. ''' if self.is_markov_game: agent_name_ls = [agent_name for agent_name in self.agents.keys()] else: agent_name_ls = [a.get_name() for a in self.agents] chart_utils.make_plots(self.exp_directory, agent_name_ls, episodic=self.is_episodic, cumulative=self.cumulative_plot, is_rec_disc_reward=self.is_rec_disc_reward, open_plot=open_plot)
def make_plots(self, open_plot=True): ''' Summary: Makes plots for the current experiment. ''' if self.is_markov_game: agent_name_ls = [agent_name for agent_name in self.agents.keys()] else: agent_name_ls = [a.get_name() for a in self.agents] if self.experiment_name_prefix != "": plot_file_name = self.experiment_name_prefix + str(self.mdp) else: plot_file_name = "" chart_utils.make_plots(self.exp_directory, agent_name_ls, episodic=self.is_episodic, plot_file_name=plot_file_name, cumulative=self.cumulative_plot, track_disc_reward=self.track_disc_reward, open_plot=open_plot)