Introduction
Reinforcement Learning (RL) often suffers from slow convergence due to the tabula rasa starting point of agents. Potential-Based Reward Shaping (PBRS) is a common technique to accelerate learning by incorporating domain knowledge through auxiliary rewards. However, PBRS presents a significant usability challenge: designers must manually select both an appropriate heuristic and a scaling factor. Suboptimal choices can lead to the agent ignoring the "hints" or becoming distracted by them. This paper introduces an ensemble framework that automates this tuning process by learning multiple shaped policies in parallel off-policy, effectively removing the trial-and-error phase of reward shaping.
The Ensemble Framework
The proposed architecture leverages the "Horde" framework to maintain a collection of independent off-policy learners, termed "demons."
Each demon in the ensemble learns a policy based on a unique combination of heuristics and scaling factors. By utilizing Greedy-GQ($\lambda$), these demons can learn off-policy from a single stream of experience generated by a separate behavior policy. This "latent learning" approach ensures that the exploration process remains stable while multiple potential policies are evaluated in the background. To produce a final action, the ensemble employs a voting mechanism—either majority or rank voting—to aggregate the preferences of individual demons. This allows the system to benefit from the collective knowledge of the horde without requiring additional environment interactions.
Experimental Evaluation
The framework was evaluated on two standard RL benchmarks:
- Mountain Car: A task requiring momentum management to drive an underpowered car up a hill. Heuristics included state variables like position, height, and velocity.
- Cart-Pole: A balancing task where the agent must maintain a pole's upright position. Heuristics focused on angular displacement and velocity.
Key Findings and Results
A primary insight of this work is that an ensemble of diverse, even "flawed," heuristics can outperform any single component. The voting mechanism effectively filters out ineffective learners while capitalizing on those that have successfully captured useful domain knowledge.
Furthermore, the ensemble approach provides inherent robustness to scaling. By including a broad range of scaling factors (e.g., powers of 10), the system "auto-tunes" itself, as the voting process naturally favors demons with effective scales. Importantly, because the framework is built on PBRS, it retains theoretical guarantees of policy invariance, ensuring convergence to the true optimal policy while significantly reducing the time required to reach it. In the Mountain Car task, the ensemble statistically matched the performance of the best individual heuristic and outperformed the unshaped base agent by a wide margin.
Conclusion and Future Work
This ensemble framework effectively removes the need for manual heuristic tuning in reward shaping. By learning multiple policies in parallel and using a voting mechanism, it achieves robust performance across different tasks and scaling factors. Future research could explore allowing individual demons to have unique hyperparameters, such as learning rates, or implementing more sophisticated voting mechanisms based on confidence measures. Additionally, integrating a layer that learns the potential functions dynamically from data could further enhance the system's autonomy and applicability to complex domains.
Summary updated