SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1912.13465 · 2019

Reward-Conditioned Policies

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, 0 violated it and 3 have no contract verdict; 2 failures of our instrument; 0 no recorded run), measured 2026-11-23; 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/1912.13465.json · badge: /api/ran/1912.13465.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
TrentBrick/RewardConditionedUDRL community (classifier label)
classifier basis not recorded on the link
5 ran · 0 no recorded run
FunctionStatusWhere it lives
combine_single_worker Ran
ran on a synthesized input
TrentBrick/RewardConditionedUDRL/utils/trainer_utils.py
code served (permissive licence) · get_code("d265c4c276ef27c9")
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 torch
import numpy as np

torch.manual_seed(0)

# The function expects:
# - rollouts_dict_list: a list of dictionaries where each dict has string keys and list/tensor values
# - seq_len: an integer for sequence length

# Create sample rollout data dictionaries
# Each rollout dict should have the same keys with list values of different lengths

rollout_1 = {
    'observations': np.random.randn(10, 4),  # length 10, dim 4
    'actions': np.random.randn(10, 3),       # length 10, dim 3
    'rewards': np.random.randn(10, 2),       # length 10, dim 2
}

rollout_2 = {
    'observations': np.random.randn(15, 4),  # length 15, dim 4
    'actions': np.random.randn(15, 3),       # length 15, dim 3
    'rewards': np.random.randn(15, 2),       # length 15, dim 2
}

rollout_3 = {
    'observations': np.random.randn(8, 4),   # length 8, dim 4 - will be ignored if seq_len > 8
    'actions': np.random.randn(8, 3),        # length 8, dim 3
    'rewards': np.random.randn(8, 2),        # length 8, dim 2
}

rollouts_dict_list = [rollout_1, rollout_2, rollout_3]
seq_len = 5

ARGS = {
    'rollouts_dict_list': rollouts_dict_list,
    'seq_len': seq_len,
}
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 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 0 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
combined_shape Ran
ran; our contract draft was wrong, not the code
TrentBrick/RewardConditionedUDRL/utils/buffer.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.

discount_cumsum Ran
ran; our contract draft was wrong, not the code
TrentBrick/RewardConditionedUDRL/control/agent.py
code served (permissive licence) · get_code("d90f855adb55e3ce")
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 (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 numpy as np
import scipy.signal

# Set seed for reproducibility
np.random.seed(0)

# Create a simple vector to discount
x = np.array([1.0, 2.0, 3.0, 4.0])

# Create a discount factor (typically between 0 and 1)
discount = 0.99

ARGS = {
    "x": x,
    "discount": discount
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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 (4,) — shape (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
get_env_params Ran
ran on a synthesized input
TrentBrick/RewardConditionedUDRL/envs/gym_params.py
code served (permissive licence) · get_code("bfb0395634961aea")
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 torch

torch.manual_seed(0)

ARGS = {
    'gamename': 'pendulum'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — 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 0 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
reshape_to_img Ran
ran on a synthesized input
TrentBrick/RewardConditionedUDRL/utils/trainer_utils.py
code served (permissive licence) · get_code("4072880c356137a6")
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 4, dtype family float, shape (2, 3, 4, 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

torch.manual_seed(0)

# Create a tensor with shape (batch_size=2, channels*height*width=48)
# Since we're reshaping to (2, 3, 4, 4), we need 2 * 3 * 4 * 4 = 96 elements
# But the function expects tensor.shape[0] to be batch size and then 3, IMAGE_RESIZE_DIM, IMAGE_RESIZE_DIM
# So input tensor should have shape (2, 48) or be flattened to (2, 48) where 48 = 3*4*4
tensor = torch.randn(2, 48)

IMAGE_RESIZE_DIM = 4

ARGS = {
    "tensor": tensor,
    "IMAGE_RESIZE_DIM": IMAGE_RESIZE_DIM,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 3, 4, 4) — shape (2, 3, 4, 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, 2 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 2 later) and 3 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
combined_shape 14 other papers
1 dated earlier, 13 later
1906.06818 (2019-06)
Stacked Capsule Autoencoders
2006.07442 (2020-06)
Self-Imitation Learning via Generalized Lower Bound Q-learning
2010.09635 (2020-10)
Deep Reinforcement Learning with Population-Coded Spiking Neural Network for Continuous Control
and 11 more not named here
discount_cumsum 2 other papers
2 later
2205.14842 (2022-05)
Efficient Reward Poisoning Attacks on Online Deep Reinforcement Learning
aaai_35251 (2025 (year only))
On-Policy Algorithms for Continual Reinforcement Learning (Student Abstract)

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-23.

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 offers the promise of automating the acquisition of complex behavioral skills. However, compared to commonly used and well-understood supervised learning methods, reinforcement learning algorithms can be brittle, difficult to use and tune, and sensitive to seemingly innocuous implementation decisions. In contrast, imitation learning utilizes standard and well-understood supervised learning methods, but requires near-optimal expert data. Can we learn effective policies via supervised learning without demonstrations? The main idea that we explore in this work is that non-expert trajectories collected from sub-optimal policies can be viewed as optimal supervision, not for maximizing the reward, but for matching the reward of the given trajectory. By then conditioning the policy on the numerical value of the reward, we can obtain a policy that generalizes to larger returns. We show how such an approach can be derived as a principled method for policy search, discuss several variants, and compare the method experimentally to a variety of current reinforcement learning methods on standard benchmarks.

For agents

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

get_harvested_code_for_paper("1912.13465")
get_code_for_paper("1912.13465")
have("1912.13465")

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

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

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

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

Connect an agent — have() is free.