(This article was first published on

**Random Miner**, and kindly contributed to R-bloggers)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:

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

To

**leave a comment**for the author, please follow the link and comment on his blog:**Random Miner**.R-bloggers.com offers

**daily e-mail updates**about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...