Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

As i learn more and more about machine learning and AI algorithms in general, i came across this book by Sutton & Barto, which is all about reinforcement learning. As i read through the action-value topic, it seemed a nice R-challenge, so here’s the complete code:

To test one greedy player and two epsilon players, for example, just run
 do.simulation(N = 500, plays = 1000, eps = c(0, 0.01, 0.1))
A quick explanation of some key parameters:
• N: the number of replications for each simulation
• plays: the number of moves for each player
• eps: the probability of make a exploratory (random) move, for each player
That’s it, any comments or improvements are welcome, enjoy it!