-
Notifications
You must be signed in to change notification settings - Fork 1
/
plot_wins.py
55 lines (43 loc) · 1.46 KB
/
plot_wins.py
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import matplotlib.pyplot as plt
import numpy as np
def plot(file):
try:
plt.style.use('ggplot')
data = np.loadtxt(f"{file}.csv", delimiter=',', skiprows=0)
fig, ax = plt.subplots(figsize=(16, 9))
x = data[:, 0]
for i in range(1, data.shape[1]):
ax.plot(x, data[:, i], label=f"Times {i} th place")
ax.legend()
plt.savefig(f"{file}.png", bbox_inches='tight')
plt.close()
except Exception as e:
print(e)
filename = 'data/saves/%s/results/%s' # without extension
# for i in range(17):
# plot(filename % (i, 'wins-0'))
# plot(filename % (i, 'wins-benchmark'))
#
# plot(filename % (17, 'wins-0'))
# plot(filename % (17, 'wins-1'))
# plot(filename % (17, 'wins-benchmark-0'))
# plot(filename % (17, 'wins-benchmark-1'))
#for i in range(18, 30):
# plot(filename % (i, 'wins-0'))
# plot(filename % (i, 'wins-benchmark'))
#
#plot('data/saves/34/results/wins-0')
#plot('data/saves/34/results/wins-benchmark')
#
#plot('data/saves/10-bis/results/wins-0')
#plot('data/saves/10-bis/results/wins-benchmark')
#
#plot('data/saves/35/after-1-game/results/wins-0')
#plot('data/saves/35/after-1-game/results/wins-benchmark')
#
#for i in range(2, 6):
# plot(f'data/saves/35/after-{i}-games/results/wins-0')
# plot(f'data/saves/35/after-{i}-games/results/wins-benchmark')
for i in range(4):
plot(plot(filename % (36, f'wins-{i}')))
plot(plot(filename % (36, f'wins-benchmark-{i}')))