Abstract
Multi-step greedy policies have been extensively used in model-based reinforcement learning (RL), both when a model of the environment is available (e.g., in the game of Go) and when it is learned. In this paper, we explore their benefits in model-free RL, when employed using multi-step dynamic programming algorithms: $\kappa$-Policy Iteration ($\kappa$-PI) and $\kappa$-Value Iteration ($\kappa$-VI). These methods iteratively compute the next policy ($\kappa$-PI) and value function ($\kappa$-VI) by solving a surrogate decision problem with a shaped reward and a smaller discount factor. We derive model-free RL algorithms based on $\kappa$-PI and $\kappa$-VI in which the surrogate problem can be solved by any discrete or continuous action RL method, such as DQN and TRPO. We identify the importance of a hyper-parameter that controls the extent to which the surrogate problem is solved and suggest a way to set this parameter. When evaluated on a range of Atari and MuJoCo benchmark tasks, our results indicate that for the right range of $\kappa$, our algorithms outperform DQN and TRPO. This shows that our multi-step greedy algorithms are general enough to be applied over any existing RL algorithm and can significantly improve its performance.
Introduction
In reinforcement learning, the discount factor ($\gamma$) is a critical hyperparameter that balances immediate and long-term rewards. For complex, long-horizon tasks, $\gamma$ is typically set close to 1. However, this often introduces significant variance in value estimation and algorithmic instability. While lowering $\gamma$ can improve stability, it introduces bias, often resulting in short-sighted policies that fail to achieve the original long-term goal. This paper addresses this dilemma by introducing model-free RL algorithms that utilize multi-step greedy policies to gain the stability of a short-horizon problem without sacrificing the optimality of the long-horizon objective.
Methodology
The $\kappa$-Greedy Framework
The proposed framework builds on the theoretical foundation of $\kappa$-greedy policies. Unlike standard 1-step lookahead methods, these policies utilize a multi-step approach considering a geometrically weighted average of future returns.
Surrogate MDPs and Reward Shaping
The core innovation lies in transforming the original problem into a sequence of surrogate MDPs. Each surrogate problem is characterized by:
- Shaped Rewards: The reward function incorporates the value function from the previous iteration, ensuring that the optimal policy of the surrogate remains the optimal policy of the original problem.
- Reduced Discount Factor: The effective discount factor is reduced to $\gamma\kappa$ (where $\kappa \in [0, 1]$), shortening the effective horizon from $1/(1-\gamma)$ to $1/(1-\gamma\kappa)$. This smoothing of the optimization landscape makes it easier for neural networks to converge.
Algorithmic Templates: $\kappa$-PI and $\kappa$-VI
We introduce two primary templates:
- $\kappa$-Policy Iteration ($\kappa$-PI): Evaluates the current policy and solves the surrogate MDP to find an improved policy.
- $\kappa$-Value Iteration ($\kappa$-VI): Directly updates the value function by solving the surrogate problem.
These templates are integrated with standard deep RL solvers, resulting in variants like $\kappa$-PI-DQN for discrete actions and $\kappa$-VI-TRPO for continuous control. A key contribution is the Update Heuristic, which sets the number of inner iterations ($N_\kappa$) based on a "final accuracy" hyperparameter ($C_{FA}$), balancing the computational cost of solving the surrogate against the progress of the outer loop.
Experimental Results
Atari 2600 Benchmarks
Evaluations on the Atari suite demonstrate that $\kappa$-based variants consistently outperform standard DQN. In games like Breakout, the multi-step approach provides a significant performance boost, as the agent better navigates the long-term dependencies of the task.
Continuous Control (MuJoCo)
In MuJoCo tasks, the $\kappa$-variants of TRPO outperformed standard TRPO and proved competitive with Generalized Advantage Estimation (GAE). Notably, in the Ant environment, $\kappa$-VI-TRPO achieved scores near 3000, whereas standard TRPO failed to maintain positive performance. The results suggest that "hard" updates—fully solving the surrogate problem—offer superior stability compared to the "soft" incremental updates common in deep RL.
Discussion and Conclusion
This work demonstrates that multi-step greedy policies can significantly enhance the performance and stability of model-free RL algorithms. By leveraging surrogate MDPs with reward shaping, we provide a principled way to shorten the effective horizon without introducing the bias typically associated with lowering the discount factor. Furthermore, the theoretical connection between $\kappa$-PI and GAE provides a formal justification for the latter's success. Future work includes extending these updates to model-based RL, where $\kappa$ could be dynamically adjusted based on the fidelity of the learned environment model.
Summary updated