Introduction
Reinforcement Learning (RL) has shown remarkable success in complex tasks, yet it often struggles in environments characterized by sparse rewards. In such scenarios, an agent may perform a long sequence of actions before receiving any feedback, making the credit assignment problem—identifying which specific actions led to success—exceptionally difficult. This paper introduces a robust framework for "shaping advice," extending potential-based reward shaping to continuous action spaces and multi-agent systems. The proposed methods, SAS (Single-agent) and SAM (Multi-agent), allow for the injection of domain knowledge without biasing the agent's ultimate goal.
The Challenge of Sparse Rewards
In many real-world applications, such as robotic assembly, rewards are naturally sparse. While "reward shaping"—adding intermediate rewards to guide the agent—is a common solution, it frequently leads to "reward hacking." This occurs when an agent learns to exploit the auxiliary rewards without actually completing the primary task. Potential-Based Reward Shaping (PBRS) was developed to prevent this by ensuring that the added rewards do not alter the optimal policy. However, traditional PBRS has been largely restricted to discrete action spaces and single-agent environments. This research bridges that gap, bringing non-distracting rewards to deep RL with continuous actions and multiple interacting agents.
Methodology: SAS and SAM
The core innovation lies in the definition of Shaping Advice, defined as the difference between potential functions at consecutive time steps.
SAS: Shaping Advice in Single-agent RL
For single-agent scenarios, the authors propose two types of advice:
- Uniform Advice: Depends solely on the state.
- Non-Uniform Advice: Depends on both the state and the specific action taken, allowing for more granular guidance. To ensure that action-dependent advice does not bias the policy gradient in continuous spaces, the authors introduce an Unbiased Gradient Trick, a correction term in the Actor-Critic update rule that preserves the optimality of the original task.
SAM: Shaping Advice in Multi-agent RL
In multi-agent settings, the complexity increases due to environment non-stationarity. The SAM algorithm utilizes the Centralized Training with Decentralized Execution (CTDE) paradigm.
As shown in the architecture above, a centralized critic assists agents during training by observing the global state, while agents act independently at execution time based on local observations. Each agent receives personalized shaping advice ($F^i$) based on its specific role, effectively "anchoring" agents to landmarks or objectives to stabilize the learning process.
Experimental Evaluation
The researchers evaluated SAS and SAM across several benchmarks:
- Puddle-Jump Gridworld: SAS-NonUniform achieved convergence 5x faster than standard Actor-Critic methods.
- Continuous Mountain Car: While the baseline succeeded in only 10% of trials, SAS-NonUniform reached the goal in 100% of trials with significantly higher rewards.
- Multi-agent Particle World: In tasks like Cooperative Navigation and Predator-Prey, the performance gap between SAM and the baseline (MADDPG) widened as the number of agents increased. SAM also outperformed state-of-the-art reward redistribution techniques like IRCR by providing immediate, rather than delayed, feedback.
Conclusion and Future Work
The "loop property" of potential-based shaping—where the total added reward over any closed loop is zero—guarantees that agents will not get stuck in cycles to harvest shaping rewards. While the current framework requires hand-crafted advice, it demonstrates that even simple domain knowledge can drastically improve sample efficiency and reliability in complex RL tasks. Future research will focus on Adaptive Shaping, where agents automatically learn and adjust their own shaping advice during training to further reduce the need for human intervention.
Summary updated