-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot_results.py
More file actions
33 lines (26 loc) · 966 Bytes
/
plot_results.py
File metadata and controls
33 lines (26 loc) · 966 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import pickle
import matplotlib.pyplot as plt
algo = 'dqn_priority'
filename = 'results/' + algo + '_results.pickle'
with open(filename, "rb") as fp:
score_list, max_score_list, running_reward_list, num_episodes_list = pickle.load(fp)
print("Score list:", score_list)
print("Max Score list:", max_score_list)
print("Reward list:", running_reward_list)
print("Num episodes list:", num_episodes_list)
plt.plot(range(1, len(score_list) + 1), running_reward_list)
plt.ylabel("Running Reward")
plt.xlabel("# of frames (in 10,000s)")
plt.show()
plt.plot(range(1, len(score_list) + 1), num_episodes_list)
plt.ylabel("# of episodes")
plt.xlabel("# of frames (in 10,000s)")
plt.show()
plt.plot(range(1, len(score_list) + 1), score_list)
plt.ylabel("Average Score")
plt.xlabel("# of frames (in 10,000s)")
plt.show()
plt.plot(range(1, len(score_list) + 1), max_score_list)
plt.ylabel("Max Score (Over 10 episodes)")
plt.xlabel("# of frames (in 10,000s)")
plt.show()