On multi-armed bandits theory and applications