perceptual-ai/scala-rl
Functional Reinforcement Learning in Scala.
{ "createdAt": "2019-08-05T19:07:41Z", "defaultBranch": "main", "description": "Functional Reinforcement Learning in Scala.", "fullName": "perceptual-ai/scala-rl", "homepage": "https://www.scalarl.com", "language": "Scala", "name": "scala-rl", "pushedAt": "2025-04-09T19:19:53Z", "stargazersCount": 27, "topics": [ "deep-reinforcement-learning", "functional-programming", "reinforcement-learning", "reinforcement-learning-tutorials" ], "updatedAt": "2025-11-07T22:39:36Z", "url": "https://github.com/perceptual-ai/scala-rl"}Functional RL in Scala
Section titled “Functional RL in Scala”Overview
Section titled “Overview”Reinforcement Learning in Scala, the functional way.
I definitely don’t need to go fully overboard… but the gold standard is to reimplement a bunch of this stuff:
https://github.com/ShangtongZhang/reinforcement-learning-an-introduction
in Scala.
Can we write the update steps in some interesting way? Like, you have a function that you pass an action to, and eventually it returns some reward? I think so!
Blog Series
Section titled “Blog Series”This code supports the blog series on functional reinforcement learning.
Get Involved
Section titled “Get Involved”Want to contribute examples or use this stuff?
Inspiration
Section titled “Inspiration”- the book, Reinforcement Learning.
- https://github.com/ShangtongZhang/reinforcement-learning-an-introduction
To File
Section titled “To File”- I’m using Rainier’s version, but this is a nice article about the probability Monad: https://www.chrisstucchio.com/blog/2016/probability_the_monad.html
- We use ScalaFMT https://scalameta.org/scalafmt/docs/installation.html
- also, wartremover http://www.wartremover.org
License
Section titled “License”Copyright 2019 Sam Ritchie.
Licensed under the Apache License, Version 2.0.