- improved scalability
- Plot: added proper Achsenbeschriftung and Title
This commit is contained in:
+4
-1
@@ -50,7 +50,7 @@ if __name__ == '__main__':
|
||||
|
||||
# init bandits with different biases for shifting reward probability
|
||||
# -> expected reward q*(a)
|
||||
ql_star = np.array([-0.4, -0.3, -0.2, -0.1, 0.0, +0.1, +0.2, +0.3, +0.4, +0.5])
|
||||
ql_star = np.array(np.linspace(-0.5, +0.5, K))
|
||||
|
||||
num_realisations = 10
|
||||
episode_len = 10000
|
||||
@@ -68,6 +68,9 @@ if __name__ == '__main__':
|
||||
|
||||
pl.plot(r_mean/num_realisations)
|
||||
pl.grid()
|
||||
pl.title(f"Norm. E(R), num. realizations: Z={num_realisations}, num. bandits: K={K}")
|
||||
pl.xlabel("Episode")
|
||||
pl.ylabel("E(R)/Z")
|
||||
ax = pl.gca()
|
||||
ax.set_xlim([-episode_len/10, episode_len])
|
||||
ax.set_ylim([0, 1])
|
||||
|
||||
Reference in New Issue
Block a user