Reinforcement Learning for Long-Horizon Unordered Tasks: From Boolean to Coupled Reward Machines
Kristina Levina, Nikolaos Pappas, Athanasios Karapantelakis, Aneta Vulgarakis Feljan, Jendrik Seipp
TL;DR
This work tackles the challenge of reinforcement learning for long-horizon tasks with unordered subtasks by introducing three generalisations of Reward Machines: Numeric RM for compact task descriptions, Agenda RM that tracks remaining subtasks, and Coupled RM that enables parallel low-level learning. The authors propose Q-learning with Coupled RMs (CoRM), a compositional algorithm that learns per-subtask policies while choosing the next subtask based on observed completion efficiency, preserving global optimality via a tailored reward structure. Empirical results across Delivery, Office, and Water domains show CoRM scaling better and converging faster than state-of-the-art RM approaches, with reduced memory demands and improved robustness to completed subtasks. The method offers a practical path to solving complex unordered non-Markovian tasks and suggests future work in stochastic settings and integration with deep RL techniques.
Abstract
Reward machines (RMs) inform reinforcement learning agents about the reward structure of the environment. This is particularly advantageous for complex non-Markovian tasks because agents with access to RMs can learn more efficiently from fewer samples. However, learning with RMs is ill-suited for long-horizon problems in which a set of subtasks can be executed in any order. In such cases, the amount of information to learn increases exponentially with the number of unordered subtasks. In this work, we address this limitation by introducing three generalisations of RMs: (1) Numeric RMs allow users to express complex tasks in a compact form. (2) In Agenda RMs, states are associated with an agenda that tracks the remaining subtasks to complete. (3) Coupled RMs have coupled states associated with each subtask in the agenda. Furthermore, we introduce a new compositional learning algorithm that leverages coupled RMs: Q-learning with coupled RMs (CoRM). Our experiments show that CoRM scales better than state-of-the-art RM algorithms for long-horizon problems with unordered subtasks.
