Reward Shaping for Model-Based Bayesian Reinforcement Learning

Hyeoneun Kim, Woosang Lim, Kanghoon Lee, Yung-Kyun Noh, Kee-Eung Kim

Abstract

Bayesian reinforcement learning (BRL) provides a formal framework for the optimal exploration-exploitation tradeoff. However, finding Bayes-optimal behavior is generally intractable, leading many BRL algorithms to rely on approximated models or real-time search. This paper introduces potential-based reward shaping to improve learning performance in model-based BRL. We propose domain-independent potential functions derived from the agent's beliefs and integrate them into real-time heuristic search, demonstrating significant performance gains in standard benchmark domains.

Introduction: The Exploration-Exploitation Dilemma

Reinforcement Learning (RL) agents must constantly balance exploring new actions versus exploiting known rewards. Bayesian Reinforcement Learning (BRL) addresses this by treating unknown environment parameters as part of a "belief state," transforming the problem into a Bayes-Adaptive Markov Decision Process (BAMDP). While theoretically sound, solving BAMDPs is computationally intensive. Practical implementations often use real-time heuristic search, such as the AEMS2 algorithm, to build lookahead trees. A major hurdle arises in environments with sparse or delayed rewards, where search trees remain uninformative for extended periods, causing the agent to wander aimlessly until a reward is encountered.

Methods: Guiding Search with Reward Shaping

To address the sparsity of rewards, we propose guiding the search process using potential-based reward shaping. By adding a "bonus" to the reward function that is defined as the difference in a potential function $\Phi$ between states, we can encourage progress without altering the optimal policy.

Domain-Independent Potentials

We introduce two methods for generating potential functions $\Phi$ dynamically from the agent's evolving belief:

  1. $\Phi_{KMDP}$: This function periodically samples $K$ possible models from the current belief, solves them, and utilizes the weighted average of their value functions as the potential.
  2. $\Phi_{BEB}$: Inspired by the Bayesian Exploration Bonus, this method uses an optimistic model that assigns higher potential to state-action pairs that have been rarely visited.

A critical theoretical contribution of this work is the observation that simply shifting search heuristics by a potential does not change search behavior. To overcome this, we propose a specific bound initialization strategy. By initializing the upper bound relative to the maximum possible potential, we force the "best-first" search logic to prioritize nodes with higher potential, effectively narrowing the search gap and pruning unpromising branches earlier.

Experimental Evaluation

The proposed methods were evaluated across several standard BRL benchmarks, ranging from simple stochastic chains to complex navigation tasks with sparse rewards.

Grid-based benchmark environments used for evaluation, including GRID5 and a maze variant.

The benchmarks include:

  • CHAIN & DOUBLE-LOOP: Small-scale environments testing risk-reward and path selection.
  • GRID5 & GRID10: Navigation tasks where rewards are only available at a specific goal state.
  • MAZE: A large 264-state environment requiring the collection of multiple flags.

Results and Discussion

Our results indicate that shaping-augmented search significantly outperforms baseline methods, particularly in larger domains where exploration is most difficult.

Performance comparison in the GRID10 domain, showing total rewards over time for various algorithms.

Key findings include:

  • Efficiency Gains: In the GRID10 task, algorithms using $\Phi_{BEB}$ or $\Phi_{KMDP}$ achieved nearly double the total reward of the baseline search (NS) within the same time limits.
  • Scalability: The performance gap between shaped and non-shaped algorithms widened in more complex environments like MAZE, where the search space is significantly larger.
  • Robustness: The adaptive nature of the potential functions allowed agents to overcome initial ignorance or incorrect priors, as the heuristics evolved alongside the transition model.

Conclusion

Potential-based reward shaping offers a powerful mechanism for improving the efficiency of model-based BRL. By leveraging the agent's own beliefs to generate domain-independent heuristics, we can significantly accelerate learning in sparse-reward environments. Future work will explore extending these techniques to continuous state spaces and integrating them with Monte-Carlo Tree Search (MCTS) variants.

Summary updated

BibTeX
@inproceedings{kim2015reward,
  author = {Hyeoneun Kim and Woosang Lim and Kanghoon Lee and Yung-Kyun Noh and Kee-Eung Kim},
  title = {{Reward Shaping for Model-Based Bayesian Reinforcement Learning}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2015},
  url = {https://openreview.net/forum?id=BkbL_0edbB},
}
Figure