# NOT RUN {
horizon <- 100
sims <- 100
policy <- EpsilonGreedyPolicy$new(epsilon = 0.1)
bandit <- BasicBernoulliBandit$new(weights = c(0.6, 0.1, 0.1))
agent <- Agent$new(policy,bandit)
history <- Simulator$new(agent, horizon, sims)$run()
plot(history, type = "cumulative", regret = TRUE)
# }
Run the code above in your browser using DataLab