Numeric Reward Machines
Kristina Levina, Nikolaos Pappas, Athanasios Karapantelakis, Aneta Vulgarakis Feljan, Jendrik Seipp
TL;DR
This work addresses the limitation of reward machines that accept only Boolean features by introducing numeric features into RM-based reinforcement learning. It presents two extended RM variants—numeric--Boolean RM and numeric RM—and evaluates them in the Craft domain, showing faster learning than baseline Boolean RM approaches. The study provides theoretical shortest-path guarantees for single-target tasks and demonstrates empirically that numeric RM variants speed up learning for sequential object-visit tasks, revealing the practical potential of RM-guided RL in inherently numeric domains. Overall, incorporating numeric features broadens the applicability of reward machines to numeric tasks such as distance-based guidance and energy optimization, with significant implications for sample efficiency in RL.
Abstract
Reward machines inform reinforcement learning agents about the reward structure of the environment and often drastically speed up the learning process. However, reward machines only accept Boolean features such as robot-reached-gold. Consequently, many inherently numeric tasks cannot profit from the guidance offered by reward machines. To address this gap, we aim to extend reward machines with numeric features such as distance-to-gold. For this, we present two types of reward machines: numeric-Boolean and numeric. In a numeric-Boolean reward machine, distance-to-gold is emulated by two Boolean features distance-to-gold-decreased and robot-reached-gold. In a numeric reward machine, distance-to-gold is used directly alongside the Boolean feature robot-reached-gold. We compare our new approaches to a baseline reward machine in the Craft domain, where the numeric feature is the agent-to-target distance. We use cross-product Q-learning, Q-learning with counter-factual experiences, and the options framework for learning. Our experimental results show that our new approaches significantly outperform the baseline approach. Extending reward machines with numeric features opens up new possibilities of using reward machines in inherently numeric tasks.
