Reinforcement Learning with Stochastic Reward Machines

Jan Corazza, Ivan Gavran, Daniel Neider
10/16/2025
cs.LGcs.AI

No official code found. Best implementation: corazza/srm (3 stars, last commit 2023-07-29).

Abstract

Reward machines are an established tool for dealing with reinforcement learning problems in which rewards are sparse and depend on complex sequences of actions. However, existing algorithms for learning reward machines assume an overly idealized setting where rewards have to be free of noise. To overcome this practical limitation, we introduce a novel type of reward machines, called stochastic reward machines, and an algorithm for learning them. Our algorithm, based on constraint solving, learns minimal stochastic reward machines from the explorations of a reinforcement learning agent. This algorithm can easily be paired with existing reinforcement learning algorithms for reward machines and guarantees to converge to an optimal policy in the limit. We demonstrate the effectiveness of our algorithm in two case studies and show that it outperforms both existing methods and a naive approach for handling noisy reward functions.

View on arXivView PDF

Code Implementations(1)

corazza/srmCommunity54%

Code for our AAAI-22 paper Reinforcement Learning with Stochastic Reward Machines

31C++, ShellNov 29, 20203 years ago

Similar Papers

Cite this paper

@article{corazza2025reinforcement,
  title  = {Reinforcement Learning with Stochastic Reward Machines},
  author = {Jan Corazza and Ivan Gavran and Daniel Neider},
  year   = {2025},
  eprint = {2510.14837},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.14837v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.14837.svg)](https://codeofpaper.com/paper/2510.14837)

Discussion