In this project, we will use upper confidence limits and Thompson sampling algorithms to solve the MABP. We will compare their performance and strategy in three different situations—standard rewards, standard but more volatile rewards, and somewhat chaotic rewards. Let's prepare the simulation data, and once the data is prepared, we will view the simulated data using the following code:
# loading the required packageslibrary(ggplot2)library(reshape2)# distribution of arms or actions having normally distributed# rewards with small variance# The data represents a standard, ideal situation i.e.# normally distributed rewards, well seperated from each other.mean_reward = c(5, 7.5, 10, ...