Due:
Write a program that attempts to play a multi-armed bandit as well as possible. Your code will be a subclass of MultiArmedBanditPlayer, which specifies two methods:
MultiArmedBanditSimulation contains a main method that will test your player. Your player should not assume that the payouts will always be as given in the supplied test driver. You can create different test machines by creating instances of BinomialBandit and CompositeBandit. A BinomialBandit has a payout table that is determined by the outcome of flipping any number of possibly unfair coins all of the same value. For example, new BinomialBandit(2, 0.25, 0.5) creates a one-armed bandit that flips two fair (probability 0.5 of coming up heads) quarters (value 0.25) and pays the player the ones that came up heads. So 1/4 of the time the payout is nothing, 1/2 of the time the payout is 25 cents, and 1/4 of the time the payout is 50 cents. CompositeBandit allows you to combine multiple one-armed bandits into a single one-armed bandit. The payout of the composite machines is the average of the payouts of the component machines. For example, new CompositeBandit(new BinomialBandit(1, 1.00, 0.25), new BinomialBandit(1, 10.00, 0.05)) creates a machine that pays $1 19/80 of the time (when the 1st coin is heads and the second one us tails), $10 3/80 of the time (tails/heads), $11 1/80 of the time (heads/heads), and nothing the rest of the time (tails/tails).
Your player should outperform the random player defined by the RandomPlayer class. There will be a small prize for the player that consistently performs the best over many different multi-armed bandits.