Added UCB algorithm decision function.