-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathplot.py
15 lines (10 loc) · 2.97 KB
/
plot.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import numpy as np
import matplotlib.pyplot as plt
def plot_reward(total_reward_list):
plt.plot(np.arange(len(total_reward_list)), total_reward_list)
plt.ylabel('Reward')
plt.xlabel('training episode')
plt.show()
if __name__ == '__main__':
reward = [0.375, 0.15000000000000002, 1.15, 0.6000000000000001, 2.2, 0.675, 0.7000000000000001, 0.675, 0.725, 0.7000000000000001, 0.925, 0.4, 0.1, 0.45, 0.85, 0.32499999999999996, 0.425, 1.5499999999999996, 0.35, 0.15000000000000002, 0.675, 0.15000000000000002, 1.5, 0.675, 0.35000000000000003, 0.6000000000000001, 0.8, 0.3, 1.3750000000000002, 0.22500000000000003, 0.7, 0.925, 0.525, 0.8500000000000002, 0.55, 0.175, 0.4, 0.44999999999999996, 0.44999999999999996, 0.6000000000000001, 0.675, 1.0499999999999998, 0.7749999999999999, 0.5, 0.65, 0.4, 0.6000000000000001, 0.875, 0.625, 1.2, 0.275, 0.375, 0.1, 0.1, 0.35, 0.6000000000000001, 0.42500000000000004, 0.675, 0.35, 0.375, 0.175, 0.5750000000000001, 0.625, 0.2, 1.125, 0.9, 0.5750000000000001, 1.05, 1.0250000000000001, 0.6749999999999999, 0.25, 2.125, 0.9, 0.39999999999999997, 0.8250000000000001, 1.125, 0.75, 1.2000000000000002, 0.8250000000000001, 0.30000000000000004, 0.47500000000000003, 0.35000000000000003, 0.5499999999999999, 0.22500000000000003, 0.30000000000000004, 0.275, 0.8, 0.7000000000000001, 0.525, 0.9249999999999999, 1.975, 0.75, 0.45, 1.2999999999999998, 1.05, 0.9, 0.6750000000000002, 0.6499999999999999, 0.625, 0.475, 0.35, 1.15, 1.3, 0.75, 0.44999999999999996, 0.9500000000000002, 0.47500000000000003, 0.725, 0.6000000000000001, 0.6000000000000001, 0.65, 1.0499999999999998, 0.25, 0.7000000000000001, 0.675, 0.35000000000000003, 0.6000000000000001, 1.3, 0.675, 1.3249999999999997, 0.9, 0.5, 0.375, 0.25, 0.5, 0.30000000000000004, 1.2, 0.4, 0.6000000000000001, 1.7249999999999996, 1.3, 0.65, 0.30000000000000004, 0.6, 0.55, 0.2, 0.4, 2.5, 0.5750000000000001, 0.5499999999999999, 1.9749999999999999, 0.7, 0.27499999999999997, 0.30000000000000004, 1.9999999999999998, 2.2249999999999996, 0.525, 0.775, 0.9250000000000002, 0.25, 1.825, 1.0750000000000002, 1.0, 0.7750000000000001, 0.9750000000000001, 0.6, 1.45, 0.1, 1.2, 0.9, 0.30000000000000004, 0.375, 1.05, 2.4499999999999997, 0.8999999999999999, 0.2, 0.525, 2.0, 2.025, 0.45000000000000007, 0.30000000000000004, 1.15, 0.525, 1.25, 1.4249999999999998, 2.0500000000000003, 0.525, 0.25, 1.05, 2.3499999999999996, 1.775, 0.375, 0.525, 2.9499999999999997, 1.05, 0.775, 0.9, 1.3, 0.775, 1.2, 0.55, 0.525, 1.275, 1.05, 0.675, 0.525, 1.275, 0.7250000000000001, 1.6, 0.525, 1.05, 1.3499999999999999, 0.55, 1.05, 0.4, 2.425, 1.05, 1.125, 1.2, 1.05, 1.725, 0.9, 2.05, 1.05, 0.525, 1.0499999999999998, 0.525, 1.075, 0.55, 0.5, 0.55, 0.55, 0.6000000000000001, 0.9000000000000001, 1.55, 1.8499999999999999, 0.7500000000000002, 0.775, 2.3000000000000003, 0.775, 0.475, 0.65, 0.2, 1.05, 0.32500000000000007, 0.35, 0.9, 0.25, 1.225, 1.2, 0.625, 0.17500000000000002, 0.7250000000000001, 0.37500000000000006, 0.675, 0.7250000000000001, 0.95, 0.8]
plot_reward(reward)