SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1902.04198 · 2019

Preferences Implicit in the State of the World

arXiv · PDF · Open in the Atlas

Code that ran

2 of 3 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 0 have no contract verdict; 2 failures of our instrument; 1 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/1902.04198.json · badge: /api/ran/1902.04198.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
HumanCompatibleAI/rlsp canonical (classifier label)
classifier basis: classifier_2025
2 ran · 1 no recorded run
FunctionStatusWhere it lives
compute_d_last_step Ran
ran; our contract draft was wrong, not the code
HumanCompatibleAI/rlsp/src/rlsp.py
code served (permissive licence) · get_code("7b90883f18025f04")
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

# Create a simple MDP class with T_matrix_transpose attribute
class SimpleMDP:
    def __init__(self):
        # T_matrix_transpose should be a matrix that when dotted with flattened state-action probs
        # returns state occupancies
        # state_action_prob will be of shape (num_states, num_actions) flattened to (num_states * num_actions,)
        # We need T_matrix_transpose to map from (num_states * num_actions,) to (num_states,)
        # So T_matrix_transpose should be shape (num_states, num_states * num_actions)
        num_states = 4
        num_actions = 3
        self.T_matrix_transpose = np.random.randn(num_states, num_states * num_actions)

mdp = SimpleMDP()

# Initial state probability distribution
# Should be shape (num_states,) since D starts as p_0
p_0 = np.array([0.25, 0.25, 0.25, 0.25])

# Policy: list of T-1 elements, each is a (num_states, num_actions) matrix
T = 5
num_states = 4
num_actions = 3
policy = [np.random.rand(num_states, num_actions) for _ in range(T - 1)]

# Normalize policy to be valid probability distributions
for t in range(len(policy)):
    policy[t] = policy[t] / policy[t].sum(axis=1, keepdims=True)

gamma = 1.0
verbose = False
return_all = False

ARGS = {
    "mdp": mdp,
    "policy": policy,
    "p_0": p_0,
    "T": T,
    "gamma": gamma,
    "verbose": verbose,
    "return_all": return_all
}
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 (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
compute_feature_expectations Ran
ran; our contract draft was wrong, not the code
HumanCompatibleAI/rlsp/src/rlsp.py
code served (permissive licence) · get_code("b84c83aac16db2af")
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 tuple. 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

class SimpleMDP:
    def __init__(self, nS, nA, num_features):
        self.nS = nS
        self.nA = nA
        self.num_features = num_features
        
        # f_matrix: shape (nS, num_features) - feature matrix for each state
        self.f_matrix = np.random.randn(nS, num_features)
        
        # T_matrix: shape (nS, nA, nS) flattened to (nS*nA, nS)
        # Used as: T_matrix.dot(expected_features) where expected_features is (nS, num_features)
        # Result should be (nS*nA, num_features), then reshaped to (nS, nA, num_features)
        self.T_matrix = np.random.randn(nS * nA, nS)

# Create MDP instance
nS = 4  # number of states
nA = 3  # number of actions
nF = 2  # number of features
T = 5   # time horizon

mdp = SimpleMDP(nS, nA, nF)

# Create policy: shape (T, nS, nA) - policy[t] has shape (nS, nA)
# policy[t][s, a] = probability of taking action a in state s at time t
policy = np.random.dirichlet(np.ones(nA), size=(T, nS))

# Initial state distribution: shape (nS,)
p_0 = np.ones(nS) / nS

ARGS = {
    "mdp": mdp,
    "policy": policy,
    "p_0": p_0,
    "T": T
}
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 tuple — a tuple 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
compute_g Not yet run
unverified (harvested, no recorded run)
HumanCompatibleAI/rlsp/src/rlsp.py
code served (permissive licence) · get_code("69be236c06fdf0cd")
How it ran

no invocation recorded.

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 2 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 2 later) and 1 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
compute_d_last_step 1 other paper
1 later
2104.03946 (2021-04)
Learning What To Do by Simulating the Past
compute_g 1 other paper
1 later
2104.03946 (2021-04)
Learning What To Do by Simulating the Past

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) agents optimize only the features specified in a reward function and are indifferent to anything left out inadvertently. This means that we must not only specify what to do, but also the much larger space of what not to do. It is easy to forget these preferences, since these preferences are already satisfied in our environment. This motivates our key insight: when a robot is deployed in an environment that humans act in, the state of the environment is already optimized for what humans want. We can therefore use this implicit preference information from the state to fill in the blanks. We develop an algorithm based on Maximum Causal Entropy IRL and use it to evaluate the idea in a suite of proof-of-concept environments designed to show its properties. We find that information from the initial state can be used to infer both side effects that should be avoided as well as preferences for how the environment should be organized. Our code can be found at https://github.com/HumanCompatibleAI/rlsp.

For agents

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

get_harvested_code_for_paper("1902.04198")
get_code_for_paper("1902.04198")
have("1902.04198")

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

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

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

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

Connect an agent — have() is free.