Algorithms for the multi-armed bandit problem