English

Reinforcement Learning in R

Machine Learning 2018-10-02 v1 Machine Learning

Abstract

Reinforcement learning refers to a group of methods from artificial intelligence where an agent performs learning through trial and error. It differs from supervised learning, since reinforcement learning requires no explicit labels; instead, the agent interacts continuously with its environment. That is, the agent starts in a specific state and then performs an action, based on which it transitions to a new state and, depending on the outcome, receives a reward. Different strategies (e.g. Q-learning) have been proposed to maximize the overall reward, resulting in a so-called policy, which defines the best possible action in each state. Mathematically, this process can be formalized by a Markov decision process and it has been implemented by packages in R; however, there is currently no package available for reinforcement learning. As a remedy, this paper demonstrates how to perform reinforcement learning in R and, for this purpose, introduces the ReinforcementLearning package. The package provides a remarkably flexible framework and is easily applied to a wide range of different problems. We demonstrate its use by drawing upon common examples from the literature (e.g. finding optimal game strategies).

Keywords

Cite

@article{arxiv.1810.00240,
  title  = {Reinforcement Learning in R},
  author = {Nicolas Pröllochs and Stefan Feuerriegel},
  journal= {arXiv preprint arXiv:1810.00240},
  year   = {2018}
}
R2 v1 2026-06-23T04:23:06.054Z