UCB1 implementation