ReinforcementLearning
ReinforcementLearning: A Package to Perform Model-Free Reinforcement Learning in R - Published in JOSS (2019)
Science Score: 93.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 4 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org -
○Committers with academic emails
-
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
experience-sampling
r
reinforcement-learning
Scientific Fields
Engineering
Computer Science -
40% confidence
Last synced: 6 months ago
·
JSON representation
Repository
This package performs model-free reinforcement learning in R.
Basic Info
- Host: GitHub
- Owner: nproellochs
- License: other
- Language: R
- Default Branch: master
- Size: 1.33 MB
Statistics
- Stars: 69
- Watchers: 8
- Forks: 15
- Open Issues: 2
- Releases: 3
Topics
experience-sampling
r
reinforcement-learning
Created almost 9 years ago
· Last pushed almost 6 years ago
Metadata Files
Readme
Changelog
License
README.Rmd
---
output: github_document
---
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
```{r, include=FALSE}
set.seed(0)
```
# Reinforcement Learning
[](https://travis-ci.org/nproellochs/ReinforcementLearning)
[](https://cran.r-project.org/package=ReinforcementLearning)
[](https://doi.org/10.21105/joss.01087)
**ReinforcementLearning** performs model-free reinforcement learning in R. This implementation enables the learning of
an optimal policy based on sample sequences consisting of states, actions and rewards. In
addition, it supplies multiple predefined reinforcement learning algorithms, such as experience
replay.
## Overview
The most important functions of **ReinforcementLearning** are:
- Learning an optimal policy from a fixed set of a priori known transition samples
- Predefined learning rules and action selection modes
- A highly customizable framework for model-free reinforcement learning tasks
## Installation
You can easily install the latest version of **ReinforcementLearning** with
```{r,eval=FALSE}
# Recommended option: download and install latest version from CRAN
install.packages("ReinforcementLearning")
# Alternatively, install the development version from GitHub:
# install.packages("devtools")
devtools::install_github("nproellochs/ReinforcementLearning")
```
## Usage
This section shows the basic functionality of how to perform reinforcement learning. First, load the corresponding package **ReinforcementLearning**.
```{r, message=FALSE}
library(ReinforcementLearning)
```
The following example shows how to learn a reinforcement learning agent using input data in the form of sample sequences
consisting of states, actions and rewards. The result of the learning process is a state-action table and an optimal
policy that defines the best possible action in each state.
```{r, message=FALSE}
# Generate sample experience in the form of state transition tuples
data <- sampleGridSequence(N = 1000)
head(data)
# Define reinforcement learning parameters
control <- list(alpha = 0.1, gamma = 0.1, epsilon = 0.1)
# Perform reinforcement learning
model <- ReinforcementLearning(data, s = "State", a = "Action", r = "Reward",
s_new = "NextState", control = control)
# Print result
print(model)
```
## Learning Reinforcement Learning
If you are new to reinforcement learning, you are better off starting with a systematic introduction, rather than trying to learn from reading individual documentation pages. There are three good places to start:
1. A thorough introduction to reinforcement learning is provided in [Sutton (1998)](https://www.semanticscholar.org/paper/Reinforcement-Learning%3A-An-Introduction-Sutton-Barto/dd90dee12840f4e700d8146fb111dbc863a938ad).
2. The package [vignette](https://github.com/nproellochs/ReinforcementLearning/blob/master/vignettes/ReinforcementLearning.Rmd) demonstrates the main functionalities of the ReinforcementLearning R package by drawing upon common examples from the literature (e.g. finding optimal game strategies).
3. Multiple blog posts on [R-bloggers](https://www.r-bloggers.com/reinforcement-learning-q-learning-with-the-hopping-robot/) demonstrate the capabilities of the ReinforcementLearning package using practical examples.
## Contributing
If you experience any difficulties with the package, or have suggestions, or want to contribute directly, you have the following options:
* Contact the [maintainer](mailto:nicolas.proellochs@wi.jlug.de) by email.
* Issues and bug reports: [File a GitHub issue](https://github.com/nproellochs/ReinforcementLearning/issues).
* Fork the source code, modify, and issue a [pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) through the [project GitHub page](https://github.com/nproellochs/ReinforcementLearning).
## License
**ReinforcementLearning** is released under the [MIT License](https://opensource.org/licenses/MIT)
Copyright (c) 2019 Nicolas Pröllochs & Stefan Feuerriegel
Owner
- Name: Nicolas Pröllochs
- Login: nproellochs
- Kind: user
- Website: http://www.nproellochs.com
- Repositories: 6
- Profile: https://github.com/nproellochs
JOSS Publication
ReinforcementLearning: A Package to Perform Model-Free Reinforcement Learning in R
Published
June 12, 2019
Volume 4, Issue 38, Page 1087
Authors
Nicolas Pröellochs
University of Giessen, University of Oxford
University of Giessen, University of Oxford
Stefan Feuerriegel
ETH Zurich
ETH Zurich
Tags
Reinforcement Learning Batch Learning Experience Replay Q-LearningGitHub Events
Total
- Watch event: 3
Last Year
- Watch event: 3
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 12
- Total pull requests: 1
- Average time to close issues: 11 months
- Average time to close pull requests: N/A
- Total issue authors: 10
- Total pull request authors: 1
- Average comments per issue: 1.83
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- vzhomeexperiments (2)
- salma-daoud (2)
- b-rodrigues (1)
- p2004r (1)
- Anis-Hoayek (1)
- mohanr (1)
- yipcma (1)
- mg64ve (1)
- xavicall00 (1)
- ff137 (1)
Pull Request Authors
- arfon (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
DESCRIPTION
cran
- R >= 3.2.0 depends
- data.table * imports
- ggplot2 * imports
- hash >= 2.0 imports
- knitr * suggests
- rmarkdown * suggests
- testthat * suggests
