Functional multi-armed bandit and the best function identification problems