def get_epsilon_k(self):
'''
Get $\epsilon_k$ according to the exploration schedule
'''
trial = self.env.count_trials - 2 # ?
if self.decayfun == 'tpower':
# e = a^t, where 0 < z < 1
# self.f_epsilon = math.pow(0.9675, trial) # for 100 trials
self.f_epsilon = math.pow(0.9333, trial) # for 50 trials
elif self.decayfun == 'trig':
# e = cos(at), where 0 < z < 1
# self.f_epsilon = math.cos(0.0168 * trial) # for 100 trials
self.f_epsilon = math.cos(0.03457 * trial) # for 50 trials
else:
# self.f_epsilon = max(0., 1. - (1./45. * trial)) # for 50 trials
self.f_epsilon = max(0., 1. - (1./95. * trial)) # for 100 trials
return self.f_epsilon
评论列表
文章目录