API for implementing multi-armed bandit algorithms