On Reinforcement Learning, Effect Handlers, and the State Monad
Not on the map. Why?
Abstract (arXiv)
We study the algebraic effects and handlers as a way to support decision-making abstractions in functional programs, whereas a user can ask a learning algorithm to resolve choices without implementing the underlying selection mechanism, and give a feedback by way of rewards. Differently from some recently proposed approach to the problem based on the selection monad [Abadi and Plotkin, LICS 2021], we express the underlying intelligence as a reinforcement learning algorithm implemented as a set of handlers for some of these algebraic operations, including those for choices and rewards. We show how we can in practice use algebraic operations and handlers -- as available in the programming language EFF -- to clearly separate the learning algorithm from its environment, thus allowing for a good level of modularity. We then show how the host language can be taken as a lambda-calculus with handlers, this way showing what the essential linguistic features are. We conclude by hinting at how type and effect systems could ensure safety properties, at the same time pointing at some directions for further work.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 10 of its 41 references that are in the map. First posted on arXiv 29 Mar 2022.
Builds on
10 of 41 references.
References · 10
- 2018Pyro: Deep Universal Probabilistic Programmingcited by 379
- 2018An Introduction to Probabilistic Programmingcited by 62
- 2016Edward: A library for probabilistic modeling, inference, and criticismcited by 28
- 2017Deep Probabilistic Programmingcited by 24
- 2016Design and Implementation of Probabilistic Programming Language Anglicancited by 15
- 2019A Simple Differentiable Programming Languagecited by 11
- 2013Handling Algebraic Effectscited by 5
- 2020Smart Choices and the Selection Monadcited by 2
- 2018SmartChoices: Hybridizing Programming and Machine Learningcited by 1
- 2019Runners in actioncited by 1
Built on by
Not cited yet.