Thompson Sampling (TS, probability matching) is a Bayesian exploration algorithm: maintain a posterior over each arm's mean reward; each round sample
θa∼Beta(αa+wa,βa+la) (Beta is the conjugate prior for Bernoulli rewards,
wa/
la being arm
a's cumulative wins/losses) and play the arm with the largest sample. It plays each arm with probability equal to its posterior probability of being optimal — wider (more uncertain) posteriors get explored more, yielding a natural exploration-exploitation trade-off.