<jupyter_start><jupyter_text>Algorithms  training_env: smoothed_completion & smoothed_score<jupyter_code>downsample = 20
dddqn_sc = get_item(dddqn_path, 'training/smoothed_completion', downsample).reshape([-1])
dddqn_ss = get_item(dddqn_path, 'training/smoothed_score', downsample).reshape([-1])
dddqn_per_sc = get_item(dddqn_per_path, 'training/smoothed_completion', downsample).reshape([-1])
dddqn_per_ss = get_item(dddqn_per_path, 'training/smoothed_score', downsample).reshape([-1])
maddpg_sc = get_item(maddpg, 'training/smoothed_completion', downsample).reshape([-1])
maddpg_ss = get_item(maddpg, 'training/smoothed_score', downsample).reshape([-1])
maddpg_ps_sc = get_item(maddpg_ps, 'training/smoothed_completion', downsample).reshape([-1])
maddpg_ps_ss = get_item(maddpg_ps, 'training/smoothed_score', downsample).reshape([-1])
plt.figure(figsize=[9, 3])
plt.subplot(1, 2, 1)
idx = np.arange(0, len(dddqn_sc) // 3) * downsample
x = np.concatenate([idx for _ in range(12)])
y = np.concatenate([dddqn_sc, dddqn_per_sc, maddpg_sc, maddpg_ps_sc])
h = np.repeat([0, 1, 2, 4], dddqn_sc.shape[0])
ax = sns.lineplot(x=x, y=y, hue=h, palette=sns.color_palette()[:4])
ax.set_xlim([0, idx[-1]])
ax.set_ylim([0, 0.8])
ax.set_xlabel('Episodes')
ax.set_title('Smoothed Completion')
plt.legend(['DDDQN', 'DDDQN+PER', 'MADDPG', 'MADDPG+PS'], loc=4)
plt.subplot(1, 2, 2)
y = np.concatenate([dddqn_ss, dddqn_per_ss, maddpg_ss, maddpg_ps_ss])
ax = sns.lineplot(x=x, y=y, hue=h, palette=sns.color_palette()[:4])
ax.set_xlim([0, idx[-1]])
ax.set_ylim([-1., -0.2])
ax.set_xlabel('Episodes')
ax.set_title('Smoothed Score')
ax.legend_.remove()
plt.savefig('training.png', dpi=300, bbox_inches='tight')
plt.savefig('training.pdf', bbox_inches='tight')<jupyter_output><empty_output><jupyter_text>Evaluation_env: completion & score<jupyter_code>downsample = 1
dddqn_e_sc = get_item(dddqn_path, 'evaluation/completions_mean', downsample).reshape([-1])
dddqn_e_ss = get_item(dddqn_path, 'evaluation/scores_mean', downsample).reshape([-1])
dddqn_e_per_sc = get_item(dddqn_per_path, 'evaluation/completions_mean', downsample).reshape([-1])
dddqn_e_per_ss = get_item(dddqn_per_path, 'evaluation/scores_mean', downsample).reshape([-1])
maddpg_e_sc = get_item(maddpg, 'evaluation/completions_mean', downsample).reshape([-1])
maddpg_e_ss = get_item(maddpg, 'evaluation/scores_mean', downsample).reshape([-1])
maddpg_e_ps_sc = get_item(maddpg_ps, 'evaluation/completions_mean', downsample).reshape([-1])
maddpg_e_ps_ss = get_item(maddpg_ps, 'evaluation/scores_mean', downsample).reshape([-1])
plt.figure(figsize=[9, 3])
plt.subplot(1, 2, 1)
idx = np.arange(0, len(dddqn_e_sc) // 3) * downsample * 100
x = np.concatenate([idx for _ in range(12)])
y = np.concatenate([dddqn_e_sc, dddqn_e_per_sc, maddpg_e_sc, maddpg_e_ps_sc])
h = np.repeat([0, 1, 2, 4], dddqn_e_sc.shape[0])
ax = sns.lineplot(x=x, y=y, hue=h, palette=sns.color_palette()[:4])
ax.set_xlim([0, idx[-1]])
ax.set_ylim([0, 0.9])
ax.set_xlabel('Episodes')
ax.set_title('Completion')
plt.legend(['DDDQN', 'DDDQN+PER', 'MADDPG', 'MADDPG+PS'], loc=4)
plt.subplot(1, 2, 2)
y = np.concatenate([dddqn_e_ss, dddqn_e_per_ss, maddpg_e_ss, maddpg_e_ps_ss])
ax = sns.lineplot(x=x, y=y, hue=h, palette=sns.color_palette()[:4])
ax.set_xlim([0, idx[-1]])
ax.set_ylim([-1., -0.2])
ax.set_xlabel('Episodes')
ax.set_title('Score')
ax.legend_.remove()
plt.savefig('evaluation.png', dpi=300, bbox_inches='tight')
plt.savefig('evaluation.pdf', bbox_inches='tight')<jupyter_output><empty_output><jupyter_text>Local v.s. Global  training_env: smoothed_completion & smoothed_score<jupyter_code>downsample = 20
maddpg_lc_sc = get_item(maddpg_lc, 'training/smoothed_completion', downsample).reshape([-1])
maddpg_lc_ss = get_item(maddpg_lc, 'training/smoothed_score', downsample).reshape([-1])
maddpg_lc_ps_sc = get_item(maddpg_lc_ps, 'training/smoothed_completion', downsample).reshape([-1])
maddpg_lc_ps_ss = get_item(maddpg_lc_ps, 'training/smoothed_score', downsample).reshape([-1])
plt.figure(figsize=[9, 3])
plt.subplot(1, 2, 1)
idx = np.arange(0, len(dddqn_sc) // 3) * downsample
x = np.concatenate([idx for _ in range(12)])
y = np.concatenate([maddpg_sc, maddpg_lc_sc, maddpg_ps_sc, maddpg_lc_ps_sc])
h = np.repeat([0, 1, 2, 4], dddqn_sc.shape[0])
ax = sns.lineplot(x=x, y=y, hue=h, palette=sns.color_palette()[:4])
ax.set_xlim([0, idx[-1]])
ax.set_ylim([0, 0.8])
ax.set_xlabel('Episodes')
ax.set_title('Smoothed Completion')
plt.legend(['MADDPG_gc', 'MADDPG_lc', 'MADDPG_gc+PS', 'MADDPG_lc+PS'], loc=4)
plt.subplot(1, 2, 2)
y = np.concatenate([maddpg_ss, maddpg_lc_ss, maddpg_ps_ss, maddpg_lc_ps_ss])
ax = sns.lineplot(x=x, y=y, hue=h, palette=sns.color_palette()[:4])
ax.set_xlim([0, idx[-1]])
ax.set_ylim([-1., -0.2])
ax.set_xlabel('Episodes')
ax.set_title('Smoothed Score')
ax.legend_.remove()
plt.savefig('gl_training.png', dpi=300, bbox_inches='tight')
plt.savefig('gl_training.pdf', bbox_inches='tight')
downsample = 1
maddpg_lc_e_sc = get_item(maddpg_lc, 'evaluation/completions_mean', downsample).reshape([-1])
maddpg_lc_e_ss = get_item(maddpg_lc, 'evaluation/scores_mean', downsample).reshape([-1])
maddpg_lc_e_ps_sc = get_item(maddpg_lc_ps, 'evaluation/completions_mean', downsample).reshape([-1])
maddpg_lc_e_ps_ss = get_item(maddpg_lc_ps, 'evaluation/scores_mean', downsample).reshape([-1])
plt.figure(figsize=[9, 3])
plt.subplot(1, 2, 1)
idx = np.arange(0, len(dddqn_e_sc) // 3) * downsample
x = np.concatenate([idx for _ in range(12)])
y = np.concatenate([maddpg_e_sc, maddpg_lc_e_sc, maddpg_e_ps_sc, maddpg_lc_e_ps_sc])
h = np.repeat([0, 1, 2, 4], dddqn_e_sc.shape[0])
ax = sns.lineplot(x=x, y=y, hue=h, palette=sns.color_palette()[:4])
ax.set_xlim([0, idx[-1]])
ax.set_ylim([0, 0.8])
ax.set_xlabel('Episodes')
ax.set_title('Completion')
plt.legend(['MADDPG_gc', 'MADDPG_lc', 'MADDPG_gc+PS', 'MADDPG_lc+PS'], loc=4)
plt.subplot(1, 2, 2)
y = np.concatenate([maddpg_e_ss, maddpg_lc_e_ss, maddpg_e_ps_ss, maddpg_lc_e_ps_ss])
ax = sns.lineplot(x=x, y=y, hue=h, palette=sns.color_palette()[:4])
ax.set_xlim([0, idx[-1]])
ax.set_ylim([-1., -0.2])
ax.set_xlabel('Episodes')
ax.set_title('Score')
ax.legend_.remove()
plt.savefig('gl_evaluation.png', dpi=300, bbox_inches='tight')
plt.savefig('gl_evaluation.pdf', bbox_inches='tight')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.18758949880668258, 'fraction_numerical': 0.026252983293556086, 'mean_word_length': 8.230543318649046, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '409785', 'license': 'MIT', 'n_tokens_mistral': 3046, 'n_tokens_neox': 2871, 'n_words': 385, 'path': 'plot.ipynb', 'repo_name': 'SigmaBM/neurips2020-flatland-starter-kit', 'size': '6285'}