Epsilon-greedy explores uniformly: it is as likely to try a terrible arm as a nearly-best one. Softmax exploration instead picks arms with probability that grows with their estimated value, so promising arms are tried more and clearly bad ones rarely.
Implement softmax_probabilities(q_values, temperature) returning the probability of choosing each arm.
q_values is a one-dimensional float array; temperature is a positive float.q_values / temperature: subtract the maximum before exponentiating.Open one at a time. Each gives away a little more than the last.
Divide the values by the temperature, subtract the maximum, exponentiate, then normalise.
Subtracting a constant from every logit does not change the softmax, but it keeps exp from overflowing.
No results yet
Run your code to check it against the examples, or submit to run every test.