Implementation of n-armed Bandit