An Empirical Evaluation of True Online TD(λ)

Harm van Seijen, Ashique Rupam Mahmood, Patrick M. Pilarski, Richard S. SuttonarXiv 2015

Abstract

The true online TD($\lambda$) algorithm has recently been proposed as a universal replacement for the popular TD($\lambda$) algorithm in temporal-difference learning and reinforcement learning. True online TD($\lambda$) has better theoretical properties than conventional TD($\lambda$), and the expectation is that it also results in faster learning. In this paper, we put this hypothesis to the test. Specifically, we compare the performance of true online TD($\lambda$) with that of TD($\lambda$) on challenging examples, random Markov reward processes, and a real-world myoelectric prosthetic arm. Our results confirm the strength of true online TD($\lambda$): it is computationally efficient for sparse features, consistently matches or exceeds the learning speed of standard TD($\lambda$), and is easier to use due to its stability and lack of trace-type selection.

Introduction

Temporal-Difference (TD) learning is a fundamental method in reinforcement learning for making predictions. The classic TD($\lambda$) algorithm utilizes eligibility traces to bridge the gap between immediate rewards and long-term outcomes. Theoretically, we desire the algorithm to follow a forward view (calculating returns based on future states), but practical implementations rely on a backward view (updating based on past states).

In standard TD($\lambda$), the backward view is only an approximation of the forward view, particularly with larger step-sizes. This discrepancy leads to a performance gap, causing slower learning or instability. Furthermore, practitioners must choose between different trace types (accumulating vs. replacing), complicating hyperparameter tuning. True Online TD($\lambda$) addresses these issues by maintaining an exact equivalence between the forward and backward views at every time step using Dutch traces.

Methods

The evaluation focuses on True Online TD($\lambda$) compared against two standard variants:

  1. Accumulate TD($\lambda$): The traditional default trace mechanism.
  2. Replace TD($\lambda$): A variant often preferred for its robustness with binary features.

The study employs linear function approximation across tabular, binary, and non-binary (normalized) feature representations. The core innovation of True Online TD($\lambda$) is its ability to ensure the backward view implementation is mathematically identical to the forward view, theoretically eliminating the performance gap found in traditional methods.

Experimental Setup

The algorithms were stress-tested across a variety of environments:

  • Challenging Toy Examples: Specially designed one-state and two-state Markov Reward Processes (MRPs) where standard TD($\lambda$) is known to struggle or diverge.
  • Random MRPs: A suite of nine configurations varying in state count (10 to 100), branching factors, and reward stochasticity.
  • Myoelectric Prosthetic Arm: A real-world dataset comprising 58,000 time steps of sensorimotor data from a robotic arm controlled by a human amputee, aiming to predict signals like grip force and motor angle.
Challenging toy examples: a one-state MRP with a self-loop (left) and a two-state MRP (right).

Results and Discussion

The empirical results highlight several key advantages of True Online TD($\lambda$):

Stability and Performance

True Online TD($\lambda$) demonstrates superior stability with respect to the step-size ($\alpha$). While standard Accumulate TD($\lambda$) can diverge at higher $\alpha$ values, True Online TD($\lambda$) remains robust, often allowing for faster learning through larger step-sizes. In random MRP experiments, it outperformed standard versions in five out of nine domains and matched them in the others.

Performance comparison showing RMS error versus step-size $\alpha$ (left) and trace parameter $\lambda$ (right).

Ease of Use

A significant practical benefit is that True Online TD($\lambda$) renders the choice between accumulating and replacing traces obsolete. It effectively captures the strengths of both without their respective weaknesses. On the real-world prosthetic arm task, it dominated both standard versions, achieving lower prediction errors across all non-zero values of $\lambda$.

Computational Efficiency

Despite its more complex mathematical formulation, the computational overhead for True Online TD($\lambda$) is minimal for sparse features, which are prevalent in RL. In the worst-case scenario of dense features, the computation time is at most twice that of standard TD($\lambda$).

Conclusion

True Online TD($\lambda$) represents a significant advancement in TD learning. By providing an exact online implementation of the forward view, it offers better stability, faster learning, and simplified hyperparameter tuning. While this study focused on linear function approximation for prediction tasks, the results strongly suggest that True Online TD($\lambda$) should be the default choice for efficient, general-purpose temporal-difference learning. Future work includes extending these evaluations to control tasks and non-linear function approximators like deep neural networks.

Summary updated

BibTeX
@misc{seijen2015empirical,
  author = {Harm van Seijen and Ashique Rupam Mahmood and Patrick M. Pilarski and Richard S. Sutton},
  title = {{An Empirical Evaluation of True Online TD(λ)}},
  year = {2015},
  eprint = {1507.00353},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1507.00353},
}
Figure