Finding structure in multi-armed bandits