Anytime-Constrained Reinforcement Learning

Jeremy McMahan, Xiaojin Zhu
11/9/2023
cs.LGcs.AIcs.DS

Official code: jermcmahan/anytime-constraints (1 star, last commit 2026-01-03). 1 more implementation below.

Abstract

We introduce and study constrained Markov Decision Processes (cMDPs) with anytime constraints. An anytime constraint requires the agent to never violate its budget at any point in time, almost surely. Although Markovian policies are no longer sufficient, we show that there exist optimal deterministic policies augmented with cumulative costs. In fact, we present a fixed-parameter tractable reduction from anytime-constrained cMDPs to unconstrained MDPs. Our reduction yields planning and learning algorithms that are time and sample-efficient for tabular cMDPs so long as the precision of the costs is logarithmic in the size of the cMDP. However, we also show that computing non-trivial approximately optimal policies is NP-hard in general. To circumvent this bottleneck, we design provable approximation algorithms that efficiently compute or learn an arbitrarily accurate approximately feasible policy with optimal value so long as the maximum supported cost is bounded by a polynomial in the cMDP or the absolute budget. Given our hardness results, our approximation guarantees are the best possible under worst-case analysis.

View on arXivView PDF

Code Implementations(2)

10Jupyter NotebookNov 14, 20239 months ago
MIT

Revamped companion code to the AISTATS paper "Anytime-Constrained Reinforcement Learning"

10Python, Jupyter NotebookDec 10, 20259 months agoMIT

Similar Papers

Cite this paper

@article{mcmahan2023anytimeconstrained,
  title  = {Anytime-Constrained Reinforcement Learning},
  author = {Jeremy McMahan and Xiaojin Zhu},
  year   = {2023},
  eprint = {2311.05511},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2311.05511v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2311.05511.svg)](https://codeofpaper.com/paper/2311.05511)

Discussion