On Reinforcement Learning, Effect Handlers, and the State Monad

03/29/2022
by   Ugo Dal Lago, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/14/2021

Parallel Algebraic Effect Handlers

Algebraic effects and handlers support composable and structured control...
research
07/17/2020

Smart Choices and the Selection Monad

Describing systems in terms of choices and their resulting costs and rew...
research
05/28/2020

Explicit Effect Subtyping

As popularity of algebraic effects and handlers increases, so does a dem...
research
03/18/2020

Signature restriction for polymorphic algebraic effects

It has been well known that naively combining polymorphic effects and po...
research
10/14/2022

When programs have to watch paint dry

We explore type systems and programming abstractions for the safe use of...
research
09/06/2021

Method for making multi-attribute decisions in wargames by combining intuitionistic fuzzy numbers with reinforcement learning

Researchers are increasingly focusing on intelligent games as a hot rese...
research
04/29/2020

Compilation of Coordinated Choice

Recently, we have proposed coordinated choices, which are nondeterminist...

Please sign up or login with your details

Forgot password? Click here to reset