def select_arm(self):
    epsilon = self.epsilon
    if (epsilon is None):
        t = (sum(self.counts) + 1)
        epsilon = (1 / math.log((t + 1e-07)))
    if (random.random() > epsilon):
        return np.argmax(self.values)
    else:
        return random.randrange(len(self.values))
def select_arm(self):
    epsilon = self.epsilon
    if (epsilon is None):
        t = (sum(self.counts) + 1)
        epsilon = (1 / math.log((t + 1e-07)))
    if (random.random() > epsilon):
        return np.argmax(self.values)
    else:
        return random.randrange(len(self.values))