The upper confidence bound algorithm