Skip to main content
QUICK REVIEW

[Paper Review] Temporal-Logic-Based Reward Shaping for Continuing Reinforcement Learning Tasks

Yuqian Jiang, Suda Bharadwaj|arXiv (Cornell University)|Jul 3, 2020
Reinforcement Learning in RoboticsComputer Science24 references8 citations
TL;DR

This paper introduces the first theoretical framework for reward shaping in average-reward reinforcement learning, enabling domain knowledge to be encoded via temporal logic formulas that are automatically translated into shaping functions. The method ensures optimal policy recovery while accelerating learning in continuing tasks, outperforming both unshaped and shielding-based baselines in sample efficiency and robustness to inaccurate knowledge.

ABSTRACT

In continuing tasks, average-reward reinforcement learning may be a more appropriate problem formulation than the more common discounted reward formulation. As usual, learning an optimal policy in this setting typically requires a large amount of training experiences. Reward shaping is a common approach for incorporating domain knowledge into reinforcement learning in order to speed up convergence to an optimal policy. However, to the best of our knowledge, the theoretical properties of reward shaping have thus far only been established in the discounted setting. This paper presents the first reward shaping framework for average-reward learning and proves that, under standard assumptions, the optimal policy under the original reward function can be recovered. In order to avoid the need for manual construction of the shaping function, we introduce a method for utilizing domain knowledge expressed as a temporal logic formula. The formula is automatically translated to a shaping function that provides additional reward throughout the learning process. We evaluate the proposed method on three continuing tasks. In all cases, shaping speeds up the average-reward learning rate without any reduction in the performance of the learned policy compared to relevant baselines.

Motivation & Objective

  • To address the lack of theoretical reward shaping frameworks in average-reward reinforcement learning, which is more suitable than discounted rewards for continuing tasks.
  • To eliminate the need for manual potential function engineering by enabling domain knowledge to be specified via intuitive temporal logic formulas.
  • To ensure that optimal policies under the original reward are preserved under shaping, even when the provided knowledge is inaccurate.
  • To improve sample efficiency in learning while maintaining performance, especially in tasks with sparse or delayed rewards.

Proposed method

  • The framework formulates reward shaping using a potential-based function F(s, a, s′) = Φ(s′, a∗) − Φ(s, a), where a∗ is the action maximizing the optimal Q-value in the next state.
  • It proves that the optimal policy under the original average-reward MDP is preserved under this shaping, by showing that the average reward of the optimal policy remains unchanged.
  • Domain knowledge is expressed as a linear temporal logic (LTL) formula, which is automatically translated into a shaping function without requiring knowledge of original reward magnitudes.
  • The method uses a product MDP construction with a deterministic finite automaton (DFA) representing the LTL formula to compute the almost-sure winning region for safety constraints.
  • The shaping function is derived from the optimal Q-values and a state-action potential function, ensuring that the modified MDP maintains the same optimal policy.
  • The approach is evaluated using differential Q-learning in three continuing tasks: area sweeping, cart pole control, and grid-world motion planning.

Experimental results

Research questions

  • RQ1Can reward shaping be theoretically justified in the average-reward reinforcement learning setting, where prior work has focused only on discounted rewards?
  • RQ2Does automatically synthesizing shaping functions from temporal logic formulas preserve the optimal policy in average-reward MDPs?
  • RQ3How does the proposed method compare in sample efficiency and robustness to unshaped and shielding-based baselines in continuing tasks?
  • RQ4Can the method still learn the optimal policy when the provided domain knowledge is inaccurate, unlike strict enforcement methods such as shielding?

Key findings

  • The proposed reward shaping framework preserves the optimal policy under the original average-reward objective, as proven by showing that the average reward of the optimal policy remains unchanged after shaping.
  • In all three evaluated continuing tasks—continual area sweeping, cart pole control, and grid-world motion planning—the method achieved faster learning convergence compared to unshaped differential Q-learning.
  • When the provided domain knowledge was inaccurate, the method still learned the optimal policy and outperformed the baseline differential Q-learning, while shielding failed to learn the optimal policy due to strict enforcement of incorrect constraints.
  • The method demonstrated superior sample efficiency, reducing the number of interactions needed to achieve high performance, especially in sparse-reward environments.
  • The automatic translation of temporal logic formulas into shaping functions eliminated the need for manual tuning of potential functions and avoided dependency on original reward magnitudes.
  • The framework successfully decoupled the specification of domain knowledge (via LTL) from the learning algorithm, enabling non-experts to guide exploration effectively.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.