Potential-based reward shaping (PBRS) does not change the optimal policy, but how much it speeds up learning depends on the potential and on effects outside this guarantee. We analyse how PBRS changes the one-step reward while it preserves the discounted return: a per-step (γ−1)Φ term, the terminal-state rule, a constant shift of the potential, and positive cycles in a bonus that is not potential-based. We then measure these consequences in pre-registered experiments with a PPO agent. The agent has a limited egocentric view and is tested on two MiniGrid navigation tasks (160 runs, 10 seeds per condition). On LavaCrossing, a geodesic (BFS) potential learned faster than both the sparse baseline and a Euclidean potential with a 7x7 and a 5x5 view (AUC difference +0.27 to +0.39, Holm p between 0.007 and 0.0499). The Euclidean potential did not differ from the baseline. In 20 runs with a non-potential bonus, none of the agents learned the task. The Euclidean potential caused more than twice as many deaths in lava during early training. View size did not detectably change the benefit of shaping. With a 5x5 view on SimpleCrossing, some BFS runs got stuck in loops and never learned; shifting the potential did not remove this, so the per-step term alone does not explain it.
Figures & tables
Condition
Bonus or potential
Tasks
View
Sparse (baseline)
none
both
7 × 7, 5 × 5
Euclidean
Φ=−d/D
both
7 × 7, 5 × 5
BFS (geodesic)
Φ=−b/B
both
7 × 7, 5 × 5
Euclidean + lava
ΦE−c on cells next to lava, c=1/D≈0.118
Lava
7 × 7
Naive control
F=max(0,Φ(s′)−Φ(s)) , Euclidean Φ
both
7 × 7
Shifted BFS
Φ=1−b/B (exploratory)
Simple
5 × 5
Table 1: Conditions. Every cell of the design has 10 seeds.
Comparison
Task
7 × 7 view
5 × 5 view
BFS − Euclidean
Lava
+0.39 [ +0.18 , +0.60 ], p=0.014
+0.34 [ +0.15 , +0.54 ], p=0.010
BFS − sparse
Lava
+0.27 [ +0.09 , +0.48 ], p=0.0499
+0.35 [ +0.18 , +0.54 ], p=0.007
Euclidean − sparse
Lava
−0.12 [ −0.39 , +0.16 ], p=1.0
+0.02 [ −0.23 , +0.26 ], p=0.91
Euclidean − sparse
Simple
+0.02 [ −0.06 , +0.09 ], p=1.0
−0.12 [ −0.16 , −0.07 ], p=0.002
BFS − sparse
Simple
−0.01 [ −0.11 , +0.09 ], p=1.0
−0.29 [ −0.57 , −0.02 ], p=0.22
BFS − Euclidean
Simple
−0.02 [ −0.12 , +0.06 ], p=1.0
−0.17 [ −0.46 , +0.09 ], p=0.42
Table 2: Pre-registered comparisons: AUC difference [95% bootstrap interval] and Holm-corrected p (10 vs. 10 runs).
Figure 1: AUC of every run (points) and the condition mean (bar); panels are task × view (Simple: SimpleCrossing, Lava: LavaCrossing). Each condition has 10 runs.
Figure 2: LavaCrossing: death rate (left) and success rate (right) of training episodes by training phase; 7 × 7 view at the top, 5 × 5 view at the bottom. Each line is the mean of 10 runs; the remaining share is timeouts.
Figure 3: SimpleCrossing, 5 × 5 view: greedy loop rate (share of evaluation episodes with a loop) and final success of the stochastic policy for every run (sparse, BFS and shifted BFS; 10 runs each). Points in the lower right corner are runs that never learned: 3 with BFS and 2 with shifted BFS.
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
Parameter
Value
Algorithm
PPO (Stable-Baselines3)
Hyperparameters
RL Zoo, MiniGrid
Parallel environments
8
n_steps , batch, epochs
128, 64, 10
Learning rate
2.5×10−4
γ , λ , clip
0.99, 0.95, 0.2
Appendix
Table 3: PPO and evaluation settings, identical in all conditions.
Task, view
Condition
AUC
Final
Never
Death
mean ± SD
success
learn
500k
Simple 7 × 7
Sparse
0.89 ± 0.10
1.00
0
—
Simple 7 × 7
Euclidean
0.90 ± 0.08
0.97
0
—
Simple 7 × 7
BFS
0.88 ± 0.13
0.98
0
—
Simple 7 × 7
Naive
0.00 ± 0.00
0.00
10
—
Lava 7 × 7
Sparse
0.56 ± 0.32
0.76
1
0.225
Appendix
Table 4: Every cell has 10 runs. “Never learn”: final success below 0.1. “Death 500k”: share of training episodes that end in lava during the first 500k steps. Source: results/tables/exp020_runs.csv and exp022_runs.csv (the latter also contains the EXP-012 and EXP-021 runs).
Work
Environment
Distance or potential
Exact PBRS?
Observation
Algorithm
Limitation
Trott et al. (2019)
Continuous 2D point maze, Ant U-maze
Distance to goal, mostly at episode end (ignores walls)
No
Full state (agent and goal coordinates)
PPO
Agent falls into local optima
Laidlaw et al. (2023)
MiniGrid and other environments
Distance that ignores walls (fewest steps without obstacles)
Yes ( γ=1 )
Not stated
PPO, DQN
Distance ignores obstacles
Wang et al. (2023)
Discrete gridworlds and continuous mazes
Learned representation distance
No
Agent (x,y) position
DQN (discrete)
Distance is learned, not BFS
Veviurko et al. (2024)
Gymnasium-Robotics Maze (continuous)
Shortest-path distance (discretised)
No (max-reward RL)
State vector (position, velocity)
PPO, TD3
Result depends on maze layout
Zhang et al. (2026)
Drone, continuous 3D
Dijkstra distance
No (progress reward)
Actor: depth image + proprioception; critic: exact state
PPO (asymmetric actor-critic)
Reward form and distance effect not separated
Ying et al. (2025)
Multi-agent search, cluttered
A ∗ distance (on agent’s internal map)
Yes ( γ=0.99 )
Partial: limited field of view, LiDAR, local map
MAPPO
Preprint, different task
Appendix
Table 5: Work on distance-based shaping compared with this study.
Designing and tuning reward functions remains one of the main challenges in building effective reinforcement learning (RL) pipelines for humanoid locomotion. While shaping rewards can accelerate learning, naively formulated terms often conflict with the desired behavior, overfit to a specific robot, or become unstable under small weight changes. Potential-Based Reward Shaping (PBRS) offers an alternative solution: shaping the reward via differences of a potential function to guide exploration without changing the optimal policy. In this paper, we study Multi-PBRS for humanoid locomotion and propose a unified reward configuration. We then evaluate the same reward structure and weights across nine humanoid robots, requiring only robot-specific metadata (joint/link mappings and default poses) rather than per-robot reward redesign. Our experiments show that, compared to standard shaping, MPBRS provides more consistent scaling behavior and reduced tuning sensitivity across robots, making it easier to tune without altering the optimal policy.
Van Chung Nguyen, Hung Manh La
are with the Advanced Robotics and Automation (ARA) Lab, Department of Computer Science and Engineering, University of Nevada, Reno, NV 89557, USA.
Sparse rewards are inherently challenging for reinforcement learning agents as they lack intermediate feedback to guide exploration and to correctly attribute the sparse success rewards to relevant parts of the trajectory. Naive reward shaping can induce reward hacking, yielding policies that exploit auxiliary signals instead of solving the intended task. Potential-based reward shaping (PBRS) guarantees preservation of the optimal policy set, but requires the definition of a heuristic potential function over the state space. In this work, we introduce the VLM-guided PBRS framework VLM-PBRS that learns the potential function directly from vision language model (VLM) feedback. We query a lightweight VLM to obtain preferences over image pairs and train a model of the potential function using these preferences. As this approach is based on potential-based reward shaping, it preserves the original optimal policies, and removes the need for expert-designed reward shaping terms. Because large VLMs are prohibitively expensive to invoke repeatedly during policy learning, we employ smaller, more computationally efficient VLMs. Although the resulting preference labels are less accurate, empirical evidence shows that the preference labels can still be used to accelerate learning. We validate our method empirically in the Meta-World and Franka Kitchen environments and highlight the connection between VLM preference label accuracy and sample efficiency improvements. Our contributions are threefold: (1) the first application of VLM preference-based learning to synthesize a potential function for PBRS, (2) a principled, low-cost solution that leverages small VLMs, and (3) extensive empirical demonstration of improved sample efficiency and robustness to reward hacking.
Henrik Müller, Daniel Kudenko
L3S Research Center Leibniz University Hannover Hannover, 30167, Germany
Reinforcement Learning (RL) has progressed from simple control tasks to complex real-world challenges with large state spaces. While RL excels in these tasks, training time remains a limitation. Reward shaping is a popular solution, but existing methods often rely on value functions, which face scalability issues. This paper presents a novel safety-oriented reward-shaping framework inspired by barrier functions, offering simplicity and ease of implementation across various environments and tasks. To evaluate the effectiveness of the proposed reward formulations, we conduct simulation experiments on the Unitree Go1 quadruped robot in Isaacgym. The policy was better than the existing baselines and reduced safety violations from 27% to 0.1% without almost any compromise on the performance.
Janani S K, Manan Tayal, Shishir N. Y Kolathaya
Department of Engineering Design, Indian Institute of Technology, Madras. · Center for Cyber-Physical Systems, Indian Institute of Science (IISc), Bengaluru.