Based on the 10-armed testbed as described in chapter 2 of the textbook,
Reinforcement Learning: An Introduction by Richard S. Sutton and Andrew G. Barto
(2nd edition). The testbed, all the algorithms of the chapter, and the two programming
exercises are there in this repository. I have used Python's multiprocessing
module
to make it possible to run the algorithms in parallel.
I have tested the code with Python 3, though it could also work with Python 2 with some minor tweaks.