SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1905.10615 · 2019

Adversarial Policies: Attacking Deep Reinforcement Learning

arXiv · PDF · Open in the Atlas

Code that ran

2 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 2 have no contract verdict; 0 failures of our instrument; 3 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/1905.10615.json · badge: /api/ran/1905.10615.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/adversarial-policies canonical (classifier label)
classifier basis: census
2 ran · 3 no recorded run
FunctionStatusWhere it lives
fit_ilqr Ran
ran on a synthesized input
HumanCompatibleAI/adversarial-policies/experiments/planning/common.py
code served (permissive licence) · get_code("4768901f0d6fe343")
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, 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)

class MockILQR:
    """Mock iLQR solver that implements the fit method."""
    def __init__(self, name):
        self.name = name
    
    def fit(self, x0, us_init, on_iteration=None, **kwargs):
        """
        Mock fit method that simulates iLQR optimization.
        Returns xs and us trajectories.
        """
        # Simulate a few iterations
        T = len(us_init)  # trajectory length
        state_dim = x0.shape[0] if isinstance(x0, np.ndarray) else x0.shape[0]
        control_dim = us_init[0].shape[0] if isinstance(us_init[0], np.ndarray) else us_init[0].shape[0]
        
        xs = [x0.copy() if isinstance(x0, np.ndarray) else x0.clone()]
        us = [u.copy() if isinstance(u, np.ndarray) else u.clone() for u in us_init]
        
        # Simulate a few iterations
        for iteration in range(2):
            # Mock iteration with decreasing cost
            J_opt = 10.0 / (iteration + 1)
            accepted = True
            converged = (iteration == 1)
            
            if on_iteration is not None:
                on_iteration(iteration, xs, us, J_opt, accepted, converged)
            
            # Update state trajectory slightly
            new_xs = [xs[0].copy() if isinstance(xs[0], np.ndarray) else xs[0].clone()]
            for t in range(T):
                x_next = new_xs[-1] + 0.01 * np.ones_like(new_xs[-1])
                new_xs.append(x_next)
            xs = new_xs[:T+1]
        
        return xs, us

# Create mock iLQR solvers
ilqrs = {
    'solver_a': MockILQR('solver_a'),
    'solver_b': MockILQR('solver_b'),
}

# Initial states
x0s = {
    'solver_a': np.array([1.0, 2.0, 3.0, 4.0]),
    'solver_b': np.array([0.5, 1.5, 2.5, 3.5]),
}

# Initial control trajectory (T=5 timesteps)
T = 5
control_dim = 3
us_init = [np.array([0.1, 0.2, 0.3]) for _ in range(T)]

# Additional kwargs
kwargs = {
    'max_iterations': 10,
    'tol': 1e-3,
}

ARGS = {
    'ilqrs': ilqrs,
    'x0s': x0s,
    'us_init': us_init,
    'kwargs': kwargs,
}
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 tuple, ndim 1, dtype family float — a tuple 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
get_final_model_path Ran
ran on a synthesized input
HumanCompatibleAI/adversarial-policies/experiments/modelfree/highest_win_rate.py
code served (permissive licence) · get_code("f3743f2ade53f538")
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 str. 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 os.path

def _strip_up_to(path, dirname):
    path_components = path.split(os.path.sep)
    if path_components[0] == '':
        path_components[0] = os.path.sep
    try:
        path_index = len(path_components) - 1 - path_components[::-1].index(dirname)
    except ValueError as e:
        raise ValueError(f"Error stripping '{dirname}' in '{path_components}': {e}")
    return os.path.join(*path_components[0:path_index])

def get_final_model_path(event_path):
    root = _strip_up_to(event_path, 'rl')
    abs_path = os.path.join(root, 'final_model')
    components = abs_path.split(os.path.sep)
    try:
        multi_train_start = components.index('multi_train')
        components = components[multi_train_start:]
    except ValueError:
        pass
    return os.path.sep.join(components)


# Construct valid arguments
ARGS = {
    'event_path': '/home/user/projects/rl/logs/multi_train/run_1/events.out.tfevents'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
get_sacred_config Not yet run
unverified (harvested, no recorded run)
HumanCompatibleAI/adversarial-policies/experiments/modelfree/highest_win_rate.py
code served (permissive licence) · get_code("dac80b76cdcac1d3")
How it ran

no invocation recorded.

get_stats Not yet run
unverified (harvested, no recorded run)
HumanCompatibleAI/adversarial-policies/experiments/modelfree/highest_win_rate.py
code served (permissive licence) · get_code("aca06d84ed47ac80")
How it ran

no invocation recorded.

make_env Not yet run
unverified (harvested, no recorded run)
HumanCompatibleAI/adversarial-policies/experiments/planning/common.py
code served (permissive licence) · get_code("821d38fa42efe55c")
How it ran

no invocation recorded.

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, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 5 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.

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

Deep reinforcement learning (RL) policies are known to be vulnerable to adversarial perturbations to their observations, similar to adversarial examples for classifiers. However, an attacker is not usually able to directly modify another agent's observations. This might lead one to wonder: is it possible to attack an RL agent simply by choosing an adversarial policy acting in a multi-agent environment so as to create natural observations that are adversarial? We demonstrate the existence of adversarial policies in zero-sum games between simulated humanoid robots with proprioceptive observations, against state-of-the-art victims trained via self-play to be robust to opponents. The adversarial policies reliably win against the victims but generate seemingly random and uncoordinated behavior. We find that these policies are more successful in high-dimensional environments, and induce substantially different activations in the victim policy network than when the victim plays against a normal opponent. Videos are available at https://adversarialpolicies.github.io/.

For agents

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

get_harvested_code_for_paper("1905.10615")
get_code_for_paper("1905.10615")
have("1905.10615")

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

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

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

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

Connect an agent — have() is free.