Reinforcement Learning for Stochastic Shortest Path Problems

24 concepts21 papers2 proposals

Most reinforcement learning (RL) frameworks rely on a predictable clock. In finite-horizon settings, an episode ends after exactly $H$ steps. In infinite-horizon discounted settings, a discount factor $\gamma < 1$ mathematically forces the agent to prioritize the near future, effectively truncating the horizon.

However, real-world goal-oriented tasks—such as a robot navigating a maze to find a charging dock—do not operate on fixed timers. As noted by Fabio Pardo in Time Limits in Reinforcement Learning, forcing artificial time limits onto inherently goal-directed tasks can destabilize training and yield suboptimal behavior.

The Stochastic Shortest Path (SSP) framework models these tasks naturally. In an SSP, an agent navigates an environment to reach a specific terminal goal state while minimizing cumulative costs. Crucially, the episode duration is a random variable determined entirely by the agent's policy. If the agent takes a wrong turn, the episode lengthens; if it finds a shortcut, the episode shrinks.

The Core Danger: Improper Policies and Infinite Loops

Standard RL algorithms cannot be applied directly to SSPs due to the risk of improper policies. A policy is proper if it is guaranteed to reach the goal state with a probability of one. It is improper if there is a non-zero probability that the agent gets trapped in a loop, wandering indefinitely and incurring infinite expected costs.

This creates a severe exploration-exploitation dilemma. In standard RL, exploring unknown transitions is safe because the environment's timer eventually rescues the agent. In an SSP, as highlighted by Aviv Rosenberg et al. in Near-optimal Regret Bounds for Stochastic Shortest Path, an exploring agent might inadvertently adopt an improper policy. If it does, it may loop indefinitely within an episode, preventing it from ever completing the task or gathering the data needed to correct its internal model.

Bounding the Unbounded via Horizon Approximations

To achieve "no-regret" performance—meaning the agent learns the optimal policy quickly without incurring massive costs along the way—algorithms must safely handle these potentially infinite episodes.

One intuitive approach is the two-phase strategy with a pivot horizon, introduced by Jean Tarbouriech et al. in No-Regret Exploration in Goal-Oriented Reinforcement Learning. Their algorithm, UC-SSP, gives the agent a specific budget of steps (the pivot horizon) to explore and attempt to reach the goal optimally. If the agent fails to reach the goal within this budget, it temporarily abandons exploration and switches to a fallback policy known to safely guide it to the goal. This safety net ensures that every episode terminates, allowing the agent to safely refine its model.

Alternatively, researchers have developed mathematical reductions to bridge the gap between infinite and finite horizons. Alon Cohen et al. in Minimax Regret for Stochastic Shortest Path proposed a "black-box" reduction that maps the infinite-horizon SSP problem into a sequence of finite-horizon tasks where the performance depends on the optimal cost rather than a time horizon. Similarly, Liyu Chen et al. introduced an implicit finite-horizon approximation in Implicit Finite-Horizon Approximation and Efficient Optimal Algorithms for Stochastic Shortest Path, allowing algorithms to achieve minimax optimal regret by dynamically bounding the effective horizon based on the accumulated cost.

Eliminating Cost Constraints with Variance-Aware Estimators

Early theoretical work in SSPs often relied on a restrictive assumption: that every action incurs a strictly positive minimum cost ($c_{min} > 0$). This assumption acted as a mathematical crutch. If every step costs at least $c_{min}$, an agent's total cost is directly proportional to the number of steps, making it easy to penalize long, looping paths. However, this assumption fails in environments with zero-cost actions or mixed rewards.

To remove this dependency, Aviv Rosenberg et al. utilized variance-sensitive Bernstein-style confidence sets. By tracking not just the expected costs but the variance of the cost-to-go function, the algorithm can detect when it is stuck in a zero-cost loop that fails to progress toward the goal.

This technique was extended to large-scale environments using linear function approximation by Qiwei Di et al. in Nearly Minimax Optimal Regret for Learning Linear Mixture Stochastic Shortest Path. They used a recursive high-order moment variance estimator to eliminate the requirement for a positive minimum cost entirely, matching theoretical lower bounds.

Scaling to Large Environments

When moving from simple tabular environments to complex, large-scale state spaces, tracking exact state transitions becomes impossible. To address this, Yifei Min et al. in Learning Stochastic Shortest Path with Linear Function Approximation introduced algorithms that model transitions as a linear mixture of basis kernels.

To ensure these large-scale models remain stable mid-episode, Daniel Vial et al. developed the concept of Optimistic Approximate Fixed Points (OAFPs) in Regret Bounds for Stochastic Shortest Path Problems with Linear Function Approximation. This allows the deployment of computationally efficient, stationary policies that actively detect and correct improper behavior before costs explode, bridging the gap between theoretical statistical efficiency and practical deployment.

Key Foundational Work

Reinforcement Learning with Time (1997) — contributed 1 concept elements to this direction.
Efficient Bounds in Heuristic Search Algorithms for Stochastic Shortest Path Problems (2015) — contributed 1 concept elements to this direction.
History & citationVersion 1 · 2026-10-04

Current · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_stochastic_shortest_path_problem_65608112,
  title = {stochastic shortest path problem},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/stochastic-shortest-path-problem/rdr_6560811282cf412292836a3edd76d005},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-23},
}

This exact version (version 1, frozen text):

@misc{lacuna_stochastic_shortest_path_problem_65608112_v1,
  title = {stochastic shortest path problem},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/stochastic-shortest-path-problem/rdr_6560811282cf412292836a3edd76d005/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-23},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake