Home

Awesome

Hi everyone, this is the repository hosting the R scripts I wrote when self-learning the book "Mathematical Foundations of Reinforcement Learning" by Shiyu (Zhao, 2024). I am Yujun, assistant professor at Jiangxi Normal University. Feel free to contact me if you have any question. This repository is still under development and will be updated to contain more reinforcement learning algorithms. Please star it if you found it helpful, thank you.

All R scripts are stored in the "code" folder, where

  1. Algorithms: reinforcement learning algorithms are in the "functions.R", including:

Algorithms calculating State values are in the "policy_evaluation" function; algorithms calculating action values are in the "action_value" function; algorithms aiming to find optimal policy, i.e. containing policy improvement step, can be found in the "find_optimal_policy" function.

  1. Examples: all algorithms listed above have been tested using selected examples in Shiyu's book, the results are either exactly equal or nearly equal to those in the book. The examples are in the R scripts with identical names to the chapter hosting those examples.