Randomised Bayesian Least-Squares Policy Iteration

Nikolaos Tziortziotis, Christos Dimitrakakis, Michalis VazirgiannisarXiv 2019

Abstract

Reinforcement learning agents often struggle with the exploration-exploitation trade-off, particularly in environments with sparse rewards. This paper presents Randomised Bayesian Least-Squares Policy Iteration (RBLSPI), an online algorithm that leverages Bayesian uncertainty to drive "deep exploration." By employing Thompson sampling to select value functions from a posterior distribution, RBLSPI enables agents to solve complex tasks, such as the sparse-reward Mountain Car, where traditional $\epsilon$-greedy methods fail.

Introduction

A fundamental challenge in reinforcement learning (RL) is balancing the exploitation of known rewards with the exploration of the environment to discover better strategies. Standard algorithms like Least-Squares Policy Iteration (LSPI) are typically offline. When adapted for online learning, they often rely on "shallow" exploration techniques like $\epsilon$-greedy, which involve taking random actions with a fixed probability. However, in environments where rewards are sparse—requiring a long, precise sequence of actions to achieve a goal—random "twitching" is insufficient for discovery.

Methodology

The authors introduce two key components to address these limitations:

  1. Bayesian Least-Squares Policy Iteration (BLSPI): This offline foundation replaces the standard Least-Squares Temporal Difference (LSTD) policy evaluation with a Bayesian variant (BLSTD). Instead of a single point estimate, BLSTD produces a full Gaussian posterior distribution over the value function, quantifying the agent's uncertainty about different state-action pairs.
  2. Randomised BLSPI (RBLSPI): This online extension uses Thompson sampling for exploration. Every $K$ steps, the agent samples a single value function from its current posterior and follows the greedy policy for that specific sample for the next $K$ steps. This commitment to a "hypothesis" allows for more purposeful, goal-directed behavior.

RBLSPI is designed to be memory-efficient, updating its statistics incrementally (via slLSTD) without the need to store a full transition history, making it more practical than similar randomized methods like RLSVI.

Experimental Results

The algorithm was benchmarked on several classic RL tasks, including Chain Walk, Inverted Pendulum, and Mountain Car.

Performance on Mountain Car

In the standard Mountain Car environment, RBLSPI demonstrated superior data efficiency and stability compared to $\epsilon$-greedy LSPI. The impact of the update frequency parameter $K$ was significant; lower values of $K$ (more frequent updates) generally led to faster convergence, as the agent could more quickly incorporate new information into its posterior.

Performance comparison on Mountain Car and Sparse Mountain Car across different update frequencies (K).

Solving Sparse Rewards

The most striking result occurred in the Sparse Mountain Car environment. In this task, the agent receives no reward signal until it reaches the goal. As shown in the experimental data, the standard online LSPI baseline (orange line) fails completely, never reaching the goal within the episode limit of 500 steps. RBLSPI, however, successfully navigates the environment, reaching the goal in approximately 110 steps on average after an initial period of exploration.

RBLSPI performance on Sparse Mountain Car with K=20, showing successful convergence where LSPI fails.

Discussion and Limitations

RBLSPI's success stems from its ability to "know what it doesn't know." By targeting high-uncertainty regions, it performs more effective exploration than random-action baselines. However, the method involves computational overhead due to the matrix inversions required for Bayesian updates. Additionally, while the current work focuses on linear function approximation using Radial Basis Functions, extending this to non-linear models like deep neural networks remains a subject for future research. The precision parameters ($\alpha$ and $\beta$) also require tuning to ensure the uncertainty distribution is appropriately scaled for the environment's rewards.

Conclusion

RBLSPI provides a principled, Bayesian approach to the exploration-exploitation dilemma in online RL. By committing to sampled value functions, it achieves deep exploration that is critical for solving sparse-reward tasks, offering a robust and efficient alternative to traditional heuristic-based exploration strategies.

Summary updated

BibTeX
@misc{tziortziotis2019randomised,
  author = {Nikolaos Tziortziotis and Christos Dimitrakakis and Michalis Vazirgiannis},
  title = {{Randomised Bayesian Least-Squares Policy Iteration}},
  year = {2019},
  eprint = {1904.03535},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1904.03535},
}
Figure