In a perfect, empty world, the shortest path between two points is a straight line. In reinforcement learning (RL), we often reward agents using this "straight-line" logic, typically via the Euclidean distance ($L_2$ norm) between the agent's current state and its goal.
However, real environments are rarely empty. They are filled with walls, one-way trapdoors, and complex kinematic constraints. To a robot arm, two configurations might look identical in coordinate space but be separated by a physical barrier that requires a massive detour to bypass. When we use simple geometric distances to guide these agents, we provide "myopic" or misleading rewards that encourage the agent to walk into walls simply because the goal is on the other side.
To solve this, a growing body of research focuses on Dynamics-Aware Distance Metrics. Instead of measuring distance in meters, these methods measure distance in "effort," "time steps," or "reachability."
The Failure of Geometric Proximity
The fundamental problem identified across this research is that standard distance metrics fail to reflect the functional distance between states. As Pieter Abbeel and Stas Tiomkin point out in Predictive Coding for Boosting Deep Reinforcement Learning with Sparse Rewards, a "needle-in-a-haystack" sparse reward problem becomes insurmountable when the reward signal doesn't account for the environment's underlying dynamics.
Consider a navigation task with a U-shaped wall. An agent on one side of the wall is physically close to a goal on the other side. A Euclidean reward tells the agent it is doing great, even as it pins itself against the glass. This creates local optima that stall learning. Kristian Hartikainen, Sergey Levine, and colleagues argue in Dynamical Distance Learning for Semi-Supervised and Unsupervised Skill Discovery that a true metric should represent the expected number of time steps required to travel between states.
Learning the Metric from Experience
If we cannot rely on coordinates, how do we define distance? The core idea is to learn the metric directly from the agent's interactions with the world.
One approach is Temporal Distance. In Dynamical Distance Learning (DDL), the system learns a value function that estimates the number of steps between any two states. This turns the environment's own physics into a ruler. Similarly, Ishan Durugkar and Peter Stone introduce a "time-step metric" in Adversarial Intrinsic Motivation for Reinforcement Learning to guide exploration in sparse-reward robotics.
Another approach uses Successor Features. In Successor Feature Landmarks for Long-Horizon Goal-Conditioned Reinforcement Learning, Christopher Hoang and Honglak Lee use successor features to build a map of "landmarks." Because successor features capture where an agent is likely to go next, the distance between these features naturally respects physical barriers. If you can't get from A to B easily, their successor features will be far apart, regardless of their physical coordinates.
Distribution Matching and Optimal Transport
When moving from simple navigation to complex imitation, the distance metric must compare entire trajectories or distributions of states.
Thomas Rupf and Georg Martius address this in Zero-Shot Offline Imitation Learning via Optimal Transport (ZILOT). Instead of asking "how far is my current state from the expert's state?", ZILOT uses Optimal Transport to match the agent's predicted occupancy distribution to the expert's demonstration. By "lifting" the distance metric into the space of distributions and grounding it in the environment's dynamics, the agent avoids the "myopic" mistakes of following a demonstration point-by-point without understanding the physical constraints.
This theme is echoed in Latent Wasserstein Adversarial Imitation Learning by Siqi Yang and Yu-Xiong Wang, where the Wasserstein distance provides a smoother, more physically grounded gradient for the agent to follow than traditional adversarial rewards.
Why It Works: Transforming the Reward Landscape
The intuition behind these methods is Reward Shaping. In a sparse reward task (like a robot arm trying to pick up a tiny object), the agent spends most of its time receiving a reward of zero.
By replacing Euclidean distance with a dynamics-aware metric, researchers like Cevahir Koprulu in Dense Dynamics-Aware Reward Synthesis transform a flat, featureless reward landscape into a "funnel." This funnel doesn't just point toward the goal; it points along the path of least resistance defined by the environment's physics.
As Jinxin Liu and Donglin Wang demonstrate with GPIM, this allows agents to teach themselves diverse skills. When the distance metric respects the world's rules, the agent can "invent" its own sub-goals that are actually reachable, creating a curriculum that leads from simple movements to complex mastery.