The K-Nearest Neighbour UCB algorithm for multi-armed bandits with covariates