UCB1 implementation according to link sent by prof