SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2105.13345 · 2021

Adversarial Intrinsic Motivation for Reinforcement Learning

arXiv · PDF · Open in the Atlas

Code that ran

10 of 14 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 0 have no contract verdict; 9 failures of our instrument; 4 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/2105.13345.json · badge: /api/ran/2105.13345.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
iDurugkar/adversarial-intrinsic-motivation canonical (classifier label)
classifier basis: census
10 ran · 4 no recorded run
FunctionStatusWhere it lives
millions Ran
ran; our contract draft was wrong, not the code
iDurugkar/adversarial-intrinsic-motivation/utils/plot.py
code served (permissive licence) · get_code("dcefde30166a3545")
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 torch

torch.manual_seed(0)

ARGS = {
    "x": 5000000.0,
    "pos": 0
}
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 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
moving_average Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
iDurugkar/adversarial-intrinsic-motivation/utils/plot.py
code served (permissive licence) · get_code("3c1cd91be28d7d5b")
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 (8,) 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 array of values to smooth
values = np.array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0])

# Define window size for moving average
window = 3

ARGS = {
    "values": values,
    "window": window
}
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 (8,) — shape (8,) 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
ortho_init Ran
ran; our contract draft was wrong, not the code
iDurugkar/adversarial-intrinsic-motivation/stable_baselines/common/tf_layers.py
code served (permissive licence) · get_code("90935b4a6d887717")
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 function. 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

np.random.seed(0)

ARGS = {
    "scale": 2.5
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
rolling_window Ran
ran; our contract draft was wrong, not the code
iDurugkar/adversarial-intrinsic-motivation/stable_baselines/results_plotter.py
code served (permissive licence) · get_code("a3fd9c3a978a7624")
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 3, dtype family float, shape (4, 3, 3) 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 numpy array for testing
array = np.arange(20, dtype=np.float32).reshape(4, 5)

# Define the window size
window = 3

# Construct the ARGS dictionary
ARGS = {
    "array": array,
    "window": window,
}
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 3, dtype family float, shape (4, 3, 3) — shape (4, 3, 3) 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
sample_a2c_params Ran
ran; our contract draft was wrong, not the code
iDurugkar/adversarial-intrinsic-motivation/utils/hyperparams_opt.py
code served (permissive licence) · get_code("7e5d730cf74c95f1")
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 optuna

class MockTrial:
    """Mock trial object that mimics optuna.trial.Trial behavior"""
    def __init__(self):
        self.params = {}
    
    def suggest_categorical(self, name, options):
        return options[0]
    
    def suggest_loguniform(self, name, low, high):
        return (low + high) / 2
    
    def suggest_uniform(self, name, low, high):
        return (low + high) / 2

trial = MockTrial()

ARGS = {
    'trial': trial
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
optuna — 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
sample_ppo2_params Ran
ran; our contract draft was wrong, not the code
iDurugkar/adversarial-intrinsic-motivation/utils/hyperparams_opt.py
code served (permissive licence) · get_code("5f55ba48a52ae1f2")
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 optuna

class MockTrial:
    """Mock trial object that simulates optuna.trial behavior"""
    def __init__(self):
        self.categorical_index = 0
        self.loguniform_index = 0
    
    def suggest_categorical(self, name, options):
        """Return first option from categorical choices"""
        result = options[self.categorical_index % len(options)]
        self.categorical_index += 1
        return result
    
    def suggest_loguniform(self, name, low, high):
        """Return a value in the loguniform range"""
        import math
        # Return a reasonable middle value in log space
        log_low = math.log(low)
        log_high = math.log(high)
        result = math.exp((log_low + log_high) / 2)
        self.loguniform_index += 1
        return result

ARGS = {
    'trial': MockTrial()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
optuna — 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
smooth Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
iDurugkar/adversarial-intrinsic-motivation/utils/plot.py
code served (permissive licence) · get_code("7bebd2fb30fb4073")
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 2, 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

# Build valid arguments for smooth()
# The function expects xy to be a tuple of (x, y) where:
# - x is a numpy array (used for slicing)
# - y is a numpy array (used for shape[0], copy(), moving_average)
# window is an int (default 50)

# Create x and y arrays where y has enough elements for the window parameter
x = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
              21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
              41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60])
y = np.sin(np.linspace(0, 4*np.pi, 60))

ARGS = {
    'xy': (x, y),
    'window': 5
}
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, ndim 2, 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
ts2xy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
iDurugkar/adversarial-intrinsic-motivation/stable_baselines/results_plotter.py
code served (permissive licence) · get_code("9cc2d7b8e6215c80")
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 2, 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
import pandas as pd

X_TIMESTEPS = 'timesteps'
X_EPISODES = 'episodes'
X_WALLTIME = 'walltime_hrs'

# Create a small pandas DataFrame with the required columns: 'l', 'r', and 't'
# These correspond to: length (timesteps), reward, and time (seconds)
timesteps_data = {
    'l': np.array([10, 20, 15, 25]),
    'r': np.array([0.5, 1.2, 0.8, 1.5]),
    't': np.array([3600.0, 7200.0, 10800.0, 14400.0])  # seconds
}
timesteps_df = pd.DataFrame(timesteps_data)

ARGS = {
    'timesteps': timesteps_df,
    'xaxis': X_TIMESTEPS
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, 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
valid_float_value Ran
ran, violated the contract we drafted
iDurugkar/adversarial-intrinsic-motivation/stable_baselines/logger.py
code served (permissive licence) · get_code("dbdf57c6ccdd4893")
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 bool, ndim 0, dtype family float, shape () 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 valid_float_value takes a single parameter 'value'
# and checks if it can be cast to a float by attempting float(value)
# and catching TypeError. It returns True if successful, False if TypeError occurs.

# Let's create test cases for different types of values that can or cannot be cast to float
ARGS = {
    "value": 3.14  # A float value that can be successfully cast to float
}
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 bool, ndim 0, dtype family float, shape () — shape () 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
window_func Ran
ran; our contract draft was wrong, not the code
iDurugkar/adversarial-intrinsic-motivation/stable_baselines/results_plotter.py
code served (permissive licence) · get_code("0680d6189aa0a2ff")
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 2, 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

# Create simple numpy arrays for testing
var_1 = np.array([1.0, 2.0, 3.0, 4.0, 5.0])
var_2 = np.array([10.0, 20.0, 30.0, 40.0, 50.0])

# Define the window size
window_size = 3

# Define a function to apply (using numpy.mean as the example)
func_to_apply = np.mean

ARGS = {
    "var_1": var_1,
    "var_2": var_2,
    "window": window_size,
    "func": func_to_apply
}
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, ndim 2, 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
conv Not yet run
unverified (harvested, no recorded run)
iDurugkar/adversarial-intrinsic-motivation/stable_baselines/common/tf_layers.py
code served (permissive licence) · get_code("5260262d19bd2712")
How it ran

no invocation recorded.

make_output_format Not yet run
unverified (harvested, no recorded run)
iDurugkar/adversarial-intrinsic-motivation/stable_baselines/logger.py
code served (permissive licence) · get_code("7bbab22bcf0e48c2")
How it ran

no invocation recorded.

mlp Not yet run
unverified (harvested, no recorded run)
iDurugkar/adversarial-intrinsic-motivation/stable_baselines/common/tf_layers.py
code served (permissive licence) · get_code("b1b0b13946e3393b")
How it ran

no invocation recorded.

summary_val Not yet run
unverified (harvested, no recorded run)
iDurugkar/adversarial-intrinsic-motivation/stable_baselines/logger.py
code served (permissive licence) · get_code("75fb406b970614d4")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 10 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 9 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
make_output_format 2 other papers
2 later
2111.03941 (2021-11)
Time Discretization-Invariant Safe Action Repetition for Policy Gradient Methods
2302.04831 (2023-02)
Cooperative Open-ended Learning Framework for Zero-shot Coordination
rolling_window 2 other papers
2 later
2111.03941 (2021-11)
Time Discretization-Invariant Safe Action Repetition for Policy Gradient Methods
2302.04831 (2023-02)
Cooperative Open-ended Learning Framework for Zero-shot Coordination
ts2xy 2 other papers
2 later
2111.03941 (2021-11)
Time Discretization-Invariant Safe Action Repetition for Policy Gradient Methods
2302.04831 (2023-02)
Cooperative Open-ended Learning Framework for Zero-shot Coordination
window_func 2 other papers
2 later
2111.03941 (2021-11)
Time Discretization-Invariant Safe Action Repetition for Policy Gradient Methods
2302.04831 (2023-02)
Cooperative Open-ended Learning Framework for Zero-shot Coordination
conv 1 other paper
1 later
2111.03941 (2021-11)
Time Discretization-Invariant Safe Action Repetition for Policy Gradient Methods
mlp 1 other paper
1 later
2111.03941 (2021-11)
Time Discretization-Invariant Safe Action Repetition for Policy Gradient Methods
moving_average 1 other paper
1 dated earlier
1809.02925 (2018-09)
Discriminator-Actor-Critic: Addressing Sample Inefficiency and Reward Bias in Adversarial Imitation Learning
ortho_init 1 other paper
1 later
2111.03941 (2021-11)
Time Discretization-Invariant Safe Action Repetition for Policy Gradient Methods
summary_val 1 other paper
1 later
2111.03941 (2021-11)
Time Discretization-Invariant Safe Action Repetition for Policy Gradient Methods
valid_float_value 1 other paper
1 later
2111.03941 (2021-11)
Time Discretization-Invariant Safe Action Repetition for Policy Gradient Methods

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

Learning with an objective to minimize the mismatch with a reference distribution has been shown to be useful for generative modeling and imitation learning. In this paper, we investigate whether one such objective, the Wasserstein-1 distance between a policy's state visitation distribution and a target distribution, can be utilized effectively for reinforcement learning (RL) tasks. Specifically, this paper focuses on goal-conditioned reinforcement learning where the idealized (unachievable) target distribution has full measure at the goal. This paper introduces a quasimetric specific to Markov Decision Processes (MDPs) and uses this quasimetric to estimate the above Wasserstein-1 distance. It further shows that the policy that minimizes this Wasserstein-1 distance is the policy that reaches the goal in as few steps as possible. Our approach, termed Adversarial Intrinsic Motivation (AIM), estimates this Wasserstein-1 distance through its dual objective and uses it to compute a supplemental reward function. Our experiments show that this reward function changes smoothly with respect to transitions in the MDP and directs the agent's exploration to find the goal efficiently. Additionally, we combine AIM with Hindsight Experience Replay (HER) and show that the resulting algorithm accelerates learning significantly on several simulated robotics tasks when compared to other rewards that encourage exploration or accelerate learning.

For agents

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

get_harvested_code_for_paper("2105.13345")
get_code_for_paper("2105.13345")
have("2105.13345")

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

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

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

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

Connect an agent — have() is free.