The Exp3 algorithm of Auer, Cesa-Bianchi, Freund and Schapire (2002), figure 1: weights start at 1; at each trial \(p_i(t) = (1-\gamma) w_i(t) / \sum_j w_j(t) + \gamma/K,\) an action is drawn from p(t), and only the chosen action updates its weight with the importance-weighted reward: \(w_i(t+1) = w_i(t) \exp(\gamma (x_i(t)/p_i(t)) / K).\) Theorem 3.1 of the source bounds the expected weak regret. The draw consumes exactly one uniform per trial, by inverse CDF on the probabilities in index order, mirroring the Python arm bit-exactly.
Value
List with estimate (0-based action with the largest
final weight), actions, rewards, probs
((T, K) matrix), weights, total_reward,
method.
