SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2104.06922 · 2021

Safe Continuous Control with Constrained Model-Based Policy Optimization

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 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; 0 honoured the contract we drafted, 1 violated it and 3 have no contract verdict; 1 failure of our instrument; 0 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2104.06922.json · badge: /api/ran/2104.06922.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
anyboby/mujoco_safety_gym community (classifier label)
classifier basis not recorded on the link
5 ran · 0 no recorded run
FunctionStatusWhere it lives
convert_observation_to_space Ran
ran; our contract draft was wrong, not the code
anyboby/mujoco_safety_gym/mujoco_safety_gym/envs/mujoco_env.py
code served (permissive licence) · get_code("c81e179f5e2f405f")
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 Dict. 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 numpy as np
from collections import OrderedDict
from gym import spaces

# Test case 1: numpy array observation
observation_array = np.random.randn(2, 4).astype(np.float32)

# Test case 2: dict observation with nested structure
observation_dict = {
    'position': np.array([1.0, 2.0, 3.0], dtype=np.float32),
    'velocity': np.array([0.1, 0.2], dtype=np.float32),
}

# Test case 3: nested dict observation
observation_nested_dict = {
    'state': np.array([1.0, 2.0], dtype=np.float32),
    'info': {
        'image': np.random.randn(3, 4, 4).astype(np.float32),
    }
}

ARGS = {
    'observation': observation_dict
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
gym, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Dict — a Dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Dict output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not 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
goal_distance Ran
ran, violated the contract we drafted
anyboby/mujoco_safety_gym/mujoco_safety_gym/envs/fetch_env.py
pointer only (licence: MIT); the stored copy get_code serves, from sunlighted/rbsl, is pointer only (licence: NONE) · get_code("6eb59c36d3f33fe4")
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 sunlighted/rbsl, 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.

mass_center Ran
ran on a synthesized input
anyboby/mujoco_safety_gym/mujoco_safety_gym/envs/humanoid.py
code served (permissive licence) · get_code("46bd205700c42f20")
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 float64, ndim 0, 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 numpy as np

class MockModel:
    def __init__(self):
        # body_mass should be a 1D array of masses for each body
        # Using 4 bodies with distinct masses
        self.body_mass = np.array([1.0, 2.0, 3.0, 4.0])

class MockSimData:
    def __init__(self):
        # xipos should be shape (n_bodies, 3) for 3D positions
        # 4 bodies, 3 spatial dimensions
        self.xipos = np.array([
            [1.0, 2.0, 3.0],
            [4.0, 5.0, 6.0],
            [7.0, 8.0, 9.0],
            [10.0, 11.0, 12.0]
        ])

class MockSim:
    def __init__(self):
        self.data = MockSimData()

model = MockModel()
sim = MockSim()

ARGS = {
    "model": model,
    "sim": sim
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
object_distance Ran
ran on a synthesized input
anyboby/mujoco_safety_gym/mujoco_safety_gym/envs/fetch_env.py
code served (permissive licence) · get_code("6243a6cb0bb025c2")
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 ndarray, ndim 1, dtype family float, shape (2,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 numpy as np

# Create two numpy arrays with the same shape
# Using shape (2, 4) - batch of 2, dimension 4
np.random.seed(0)
object_a = np.random.randn(2, 4)
object_b = np.random.randn(2, 4)

ARGS = {
    "object_a": object_a,
    "object_b": object_b,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (2,) — shape (2,) as a later run recorded it
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
pos_between Ran
ran on a synthesized input
anyboby/mujoco_safety_gym/mujoco_safety_gym/envs/fetch_env.py
code served (permissive licence) · get_code("b1627deb8af6b38a")
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 Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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 pos_between takes two objects and performs arithmetic operations on them
# It requires:
# - object_a: a tensor with a .shape attribute
# - object_b: a tensor with a .shape attribute
# - Both must have the same shape
# - Both must support subtraction, division, and addition operations

object_a = torch.randn(2, 4)
object_b = torch.randn(2, 4)

ARGS = {
    "object_a": object_a,
    "object_b": object_b,
}
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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
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

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 3 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 3 later) and 2 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
goal_distance 4 other papers
1 dated earlier, 3 later
1806.07851 (2018-06)
Sim-to-Real Reinforcement Learning for Deformable Object Manipulation
2206.03023 (2022-06)
Offline Goal-Conditioned Reinforcement Learning via f -Advantage Regression
2402.07226 (2024-02)
Stitching Sub-trajectories with Conditional Diffusion Model for Goal-Conditioned Offline RL
and 1 more not named here
mass_center 4 other papers
2 dated earlier, 2 later
2006.13916 (2020-06)
Off-Dynamics Reinforcement Learning: Training for Transfer with Domain Classifiers
2103.13842 (2021-03)
Model Predictive Actor-Critic: Accelerating Robot Skill Acquisition with Deep Reinforcement Learning
2110.02793 (2021-10)
Multi-Agent Constrained Policy Optimisation
and 1 more not named here
convert_observation_to_space 2 other papers
2 later
2110.02793 (2021-10)
Multi-Agent Constrained Policy Optimisation
2602.10793 (2026-02)
Semi-Supervised Cross-Domain Imitation 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

The applicability of reinforcement learning (RL) algorithms in real-world domains often requires adherence to safety constraints, a need difficult to address given the asymptotic nature of the classic RL optimization objective. In contrast to the traditional RL objective, safe exploration considers the maximization of expected returns under safety constraints expressed in expected cost returns. We introduce a model-based safe exploration algorithm for constrained high-dimensional control to address the often prohibitively high sample complexity of model-free safe exploration algorithms. Further, we provide theoretical and empirical analyses regarding the implications of model-usage on constrained policy optimization problems and introduce a practical algorithm that accelerates policy search with model-generated data. The need for accurate estimates of a policy's constraint satisfaction is in conflict with accumulating model-errors. We address this issue by quantifying model-uncertainty as the expected Kullback-Leibler divergence between predictions of an ensemble of probabilistic dynamics models and constrain this error-measure, resulting in an adaptive resampling scheme and dynamically limited rollout horizons. We evaluate this approach on several simulated constrained robot locomotion tasks with high-dimensional action- and state-spaces. Our empirical studies find that our algorithm reaches model-free performances with a 10-20 fold reduction of training samples while maintaining approximate constraint satisfaction levels of model-free methods.

For agents

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

get_harvested_code_for_paper("2104.06922")
get_code_for_paper("2104.06922")
have("2104.06922")

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

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

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

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

Connect an agent — have() is free.