added thompson sampling code for bandit optimization problem