Simulation of n-armed bandit