SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2302.00808 · ICML · 2024

ACPO: A Policy Optimization Algorithm for Average MDPs with Constraints

Haipeng Luo, Rahul Jain, Akhil Agnihotri

arXiv · PDF · Open in the Atlas

Code that ran

5 of 12 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 2 failures of our instrument; 7 no recorded run), measured 2026-11-22; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2302.00808.json · badge: /api/ran/2302.00808.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
openai/safety-starter-agents canonical (classifier label)
classifier basis not recorded on the link
5 ran · 7 no recorded run
FunctionStatusWhere it lives
colorize Ran
ran; our contract draft was wrong, not the code
openai/safety-starter-agents/safe_rl/utils/logx.py
pointer only (licence: MIT); the stored copy get_code serves, from milanganai/milanganai.github.io, is pointer only (licence: NONE) · get_code("7e36f1c357c4618d")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from milanganai/milanganai.github.io, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

combined_shape Ran
ran; our contract draft was wrong, not the code
openai/safety-starter-agents/safe_rl/pg/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from yinglunxu/reward_poisoning_attack_drl, is pointer only (licence: NONE) · get_code("57542f87e248db45")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from yinglunxu/reward_poisoning_attack_drl, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

flat_concat Ran
ran, honoured the contract we drafted
openai/safety-starter-agents/safe_rl/pg/trust_region.py
pointer only (licence: MIT); the stored copy get_code serves, from milanganai/milanganai.github.io, is pointer only (licence: NONE) · get_code("f29202d8108bccd3")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from milanganai/milanganai.github.io, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

keys_as_sorted_list Ran
ran on a synthesized input
openai/safety-starter-agents/safe_rl/pg/utils.py
code served (permissive licence) · get_code("3e9d35cf75437bdf")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function takes a dict and calls .keys() on it, then converts to list and sorts
# So we need a simple dictionary with sortable keys

test_dict = {
    'zebra': 1,
    'apple': 2,
    'monkey': 3,
    'banana': 4
}

ARGS = {
    'dict': test_dict
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
values_as_sorted_list Ran
ran on a synthesized input
openai/safety-starter-agents/safe_rl/pg/utils.py
code served (permissive licence) · get_code("81aea179a4407ed7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Construct a dictionary with various types of values
test_dict = {
    'zebra': 100,
    'apple': 42,
    'monkey': 3.14,
    'banana': [1, 2, 3],
    'cat': torch.tensor([1.0, 2.0, 3.0, 4.0])
}

ARGS = {
    'dict': test_dict
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
assign_params_from_flat Not yet run
unverified (harvested, no recorded run)
openai/safety-starter-agents/safe_rl/utils/mpi_tf.py
pointer only (licence: MIT); the stored copy get_code serves, from milanganai/milanganai.github.io, is pointer only (licence: NONE) · get_code("042875cf711accd0")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from milanganai/milanganai.github.io, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

flat_grad Not yet run
unverified (harvested, no recorded run)
openai/safety-starter-agents/safe_rl/pg/trust_region.py
code served (permissive licence) · get_code("331e2222a5374f81")
How it ran

no invocation recorded.

get_vars Not yet run
unverified (harvested, no recorded run)
openai/safety-starter-agents/safe_rl/sac/sac.py
code served (permissive licence) · get_code("a2580d7c4a763348")
How it ran

no invocation recorded.

hessian_vector_product Not yet run
unverified (harvested, no recorded run)
openai/safety-starter-agents/safe_rl/pg/trust_region.py
code served (permissive licence) · get_code("c884bc43c5209da0")
How it ran

no invocation recorded.

mlp Not yet run
unverified (harvested, no recorded run)
openai/safety-starter-agents/safe_rl/pg/network.py
code served (permissive licence) · get_code("e68b07bcdded00fa")
How it ran

no invocation recorded.

placeholder Not yet run
unverified (harvested, no recorded run)
openai/safety-starter-agents/safe_rl/sac/sac.py
code served (permissive licence) · get_code("17b03c462ce92576")
How it ran

no invocation recorded.

restore_tf_graph Not yet run
unverified (harvested, no recorded run)
openai/safety-starter-agents/safe_rl/utils/logx.py
code served (permissive licence) · get_code("006604b1b94a9fe7")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 8 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 3 the same month, 8 later) and 4 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
colorize 17 other papers
7 dated earlier, 1 the same month, 8 later, 1 same year, order not determinable
1802.09477 (2018-02)
Addressing Function Approximation Error in Actor-Critic Methods
1909.12255 (2019-09)
Harnessing Structures for Value-Based Planning and Reinforcement Learning
2006.07442 (2020-06)
Self-Imitation Learning via Generalized Lower Bound Q-learning
and 14 more not named here
combined_shape 14 other papers
10 dated earlier, 1 the same month, 3 later
1906.06818 (2019-06)
Stacked Capsule Autoencoders
1912.13465 (2019-12)
Reward-Conditioned Policies
2006.07442 (2020-06)
Self-Imitation Learning via Generalized Lower Bound Q-learning
and 11 more not named here
flat_concat 6 other papers
2 dated earlier, 1 the same month, 3 later
2006.07442 (2020-06)
Self-Imitation Learning via Generalized Lower Bound Q-learning
2210.07573 (2022-10)
Model-based Safe Deep Reinforcement Learning via a Constrained Proximal Policy Optimization Algorithm
2302.02299 (2023-02)
Sample Dropout: A Simple yet Effective Variance Reduction Technique in Deep Policy Optimization
and 3 more not named here
mlp 5 other papers
4 dated earlier, 1 later
1801.01290 (2018-01)
Soft Actor-Critic: Off-Policy Maximum Entropy Deep Reinforcement Learning with a Stochastic Actor
1802.09477 (2018-02)
Addressing Function Approximation Error in Actor-Critic Methods
1812.02690 (2018-12)
Provably Efficient Maximum Entropy Exploration
and 2 more not named here
assign_params_from_flat 4 other papers
2 dated earlier, 2 later
2006.07442 (2020-06)
Self-Imitation Learning via Generalized Lower Bound Q-learning
2210.07573 (2022-10)
Model-based Safe Deep Reinforcement Learning via a Constrained Proximal Policy Optimization Algorithm
2401.14758 (2024-01)
Off-Policy Primal-Dual Safe Reinforcement Learning
and 1 more not named here
get_vars 4 other papers
3 dated earlier, 1 later
1802.09477 (2018-02)
Addressing Function Approximation Error in Actor-Critic Methods
1812.02690 (2018-12)
Provably Efficient Maximum Entropy Exploration
1910.07224 (2019-10)
Teacher algorithms for curriculum learning of Deep RL in continuously parameterized environments
and 1 more not named here
placeholder 4 other papers
3 dated earlier, 1 later
1802.09477 (2018-02)
Addressing Function Approximation Error in Actor-Critic Methods
1812.02690 (2018-12)
Provably Efficient Maximum Entropy Exploration
1910.07224 (2019-10)
Teacher algorithms for curriculum learning of Deep RL in continuously parameterized environments
and 1 more not named here
restore_tf_graph 1 other paper
1 later
2401.14758 (2024-01)
Off-Policy Primal-Dual Safe Reinforcement Learning

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Reinforcement Learning (RL) for constrained MDPs (CMDPs) is an increasingly important problem for various applications. Often, the average criterion is more suitable than the discounted criterion. Yet, RL for average-CMDPs (ACMDPs) remains a challenging problem. Algorithms designed for discounted constrained RL problems often do not perform well for the average CMDP setting. In this paper, we introduce a new policy optimization with function approximation algorithm for constrained MDPs with the average criterion. The Average-Constrained Policy Optimization (ACPO) algorithm is inspired by trust region-based policy optimization algorithms. We develop basic sensitivity theory for average CMDPs, and then use the corresponding bounds in the design of the algorithm. We provide theoretical guarantees on its performance, and through extensive experimental work in various challenging OpenAI Gym environments, show its superior empirical performance when compared to other state-of-the-art algorithms adapted for the ACMDPs.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2302.00808")
get_code_for_paper("2302.00808")
have("2302.00808")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2302.00808.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2302.00808.svg)](https://syntology.ai/paper/2302.00808)

Connect an agent — have() is free.