SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2002.06038 · ICLR · 2020

Never Give Up: Learning Directed Exploration Strategies

Adrià Puigdomènech Badia, Charles Blundell, Pablo Sprechmann, Alex Vitvitskyi, Daniel Guo, Bilal Piot, Steven Kapturowski, Olivier Tieleman, Martín Arjovsky, Alexander Pritzel, Andew Bolt

arXiv · PDF · Open in the Atlas

Code that ran

7 of 14 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 2 failures of our instrument; 7 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/2002.06038.json · badge: /api/ran/2002.06038.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
YHL04/agent57 community
Papers with Code archive
3 ran · 1 no recorded run
michaelnny/deep_rl_zoo community
Papers with Code archive
2 ran · 6 no recorded run
balloch/rl-exploration-transfer community
Papers with Code archive
1 ran · 0 no recorded run
Coac/never-give-up community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
ConvNet Ran
ran on a synthesized input · constructed an object; no result was computed
YHL04/agent57/curiosity/episodicnovelty.py
code served (permissive licence) · get_code("c31a9de8654051ec")
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 an instance of its own class, ConvNet: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn

torch.manual_seed(0)

# ConvNet's __init__ takes no parameters besides self
# So ARGS should be an empty dict since there are no parameters to pass

ARGS = {}
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 ConvNet — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ConvNet 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
EmbeddingNet Ran
ran on a synthesized input · constructed an object; no result was computed
YHL04/agent57/curiosity/episodicnovelty.py
code served (permissive licence) · get_code("3466861d599c43fe")
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 an instance of its own class, EmbeddingNet: the run constructed the object and did not call it, so no result was computed. 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 torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "action_size": 4,
}
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 EmbeddingNet — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a EmbeddingNet 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
NGU Ran
ran on a synthesized input
balloch/rl-exploration-transfer/rlexplore/ngu/ngu.py
code served (permissive licence) · get_code("90a7ebd6feb166b8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned ndarray, ndim 3, 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
from torch import nn

# Mock environment to satisfy the constructor
class MockSpace:
    def __init__(self, shape, is_discrete=False, n=None):
        self.shape = shape
        self.__class__.__name__ = 'Discrete' if is_discrete else 'Box'
        if is_discrete:
            self.n = n

class MockEnv:
    def __init__(self, obs_shape, action_n):
        self.observation_space = MockSpace(obs_shape)
        self.action_space = MockSpace((action_n,), is_discrete=True, n=action_n)

# Create mock environment with 1D observation space (MLP case)
mock_envs = MockEnv(obs_shape=(6,), action_n=4)

INIT_ARGS = {
    'envs': mock_envs,
    'device': torch.device('cpu'),
    'latent_dim': 8,
    'lr': 0.001,
    'batch_size': 2,
    'beta': 0.5,
    'kappa': 0.0001
}

# Create rollouts dictionary with observations
# Shape: (n_steps, n_envs, *obs_shape)
n_steps = 5
n_envs = 3
obs_shape = (6,)

rollouts = {
    'observations': np.random.randn(n_steps, n_envs, *obs_shape).astype(np.float32)
}

time_steps = 100

ARGS = {
    'rollouts': rollouts,
    'time_steps': time_steps
}

METHOD = 'compute_irs'
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, torch — 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 — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
RunningMeanStd Ran
ran on a synthesized input · constructed an object; no result was computed
YHL04/agent57/curiosity/episodicnovelty.py
code served (permissive licence) · get_code("a78127c40ebe35aa")
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 an instance of its own class, RunningMeanStd: the run constructed the object and did not call it, so no result was computed. 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

# RunningMeanStd is a class with __init__ that takes no parameters
# The class methods are:
# - update(self, x): takes numpy array x with shape (batch_size, ...)
# - update_single(self, x): takes single scalar/array x
# - normalize(self, x): takes numpy array x
# Since __init__ takes no arguments, ARGS should be an empty dict

ARGS = {}
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 RunningMeanStd — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a RunningMeanStd 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
TorchRunningMeanStd Ran
ran on a synthesized input
michaelnny/deep_rl_zoo/deep_rl_zoo/curiosity.py
code served (permissive licence) · get_code("57613320785ab71b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned NoneType. 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

class TorchRunningMeanStd:
    """For RND networks"""

    def __init__(self, shape=(), device='cpu'):
        self.device = device
        self.mean = torch.zeros(shape, dtype=torch.float32, device=self.device)
        self.var = torch.ones(shape, dtype=torch.float32, device=self.device)
        self.count = 0
        self.deltas = []
        self.min_size = 10

    @torch.no_grad()
    def update(self, x):
        x = x.to(self.device)
        batch_mean = torch.mean(x, dim=0)
        batch_var = torch.var(x, dim=0)
        n = x.shape[0]
        self.count += n
        delta = batch_mean - self.mean
        self.mean += delta * n / self.count
        m_a = self.var * (self.count - n)
        m_b = batch_var * n
        M2 = m_a + m_b + torch.square(delta) * self.count * n / self.count
        self.var = M2 / self.count

    @torch.no_grad()
    def update_single(self, x):
        self.deltas.append(x)
        if len(self.deltas) >= self.min_size:
            batched_x = torch.concat(self.deltas, dim=0)
            self.update(batched_x)
            del self.deltas[:]

    @torch.no_grad()
    def normalize(self, x):
        return (x.to(self.device) - self.mean) / torch.sqrt(self.var + 1e-08)


INIT_ARGS = {
    'shape': (4,),
    'device': 'cpu'
}

ARGS = {
    'x': torch.randn(2, 4)
}

METHOD = 'update'

if __name__ == '__main__':
    obj = TorchRunningMeanStd(**INIT_ARGS)
    obj.update(**ARGS)
    print("update() called successfully")
    
    normalized = obj.normalize(torch.randn(3, 4))
    print("normalize() called successfully")
    print(f"Normalized shape: {normalized.shape}")
    
    for i in range(10):
        obj.update_single(torch.randn(1, 4))
    print("update_single() called successfully")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type NoneType — a NoneType output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a NoneType 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
compute_intrinsic_reward Ran
ran; our contract draft was wrong, not the code
Coac/never-give-up/embedding_model.py
code served (permissive licence) · get_code("78ccc2c5216933ad")
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) 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 torch
import numpy as np
from typing import List

torch.manual_seed(0)

# Create a small episodic memory with a few state tensors
# Each state is a tensor of dimension 4
episodic_memory = [
    torch.randn(4),
    torch.randn(4),
    torch.randn(4),
    torch.randn(4),
    torch.randn(4),
]

# Create a current state tensor
current_c_state = torch.randn(4)

ARGS = {
    "episodic_memory": episodic_memory,
    "current_c_state": current_c_state,
    "k": 10,
    "kernel_cluster_distance": 0.008,
    "kernel_epsilon": 0.0001,
    "c": 0.001,
    "sm": 8,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — 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
knn_query Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
michaelnny/deep_rl_zoo/deep_rl_zoo/curiosity.py
code served (permissive licence) · get_code("bf252aa85c786a31")
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 KNNQueryResult. 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 types as _types

torch.manual_seed(0)

# Define the assertion functions and other dependencies
def assert_rank(tensor: torch.Tensor, rank):
    if not isinstance(tensor, torch.Tensor):
        raise ValueError('Error in rank and/or compatibility check. The input tensor should be a valid torch.Tensor.')
    supported_rank = []
    if isinstance(rank, tuple):
        supported_rank = rank
    else:
        supported_rank.append(rank)
    if len(tensor.shape) not in supported_rank:
        raise ValueError(f'Error in rank and/or compatibility check. The input tensor should be rank {rank} torch.Tensor, got {tensor.shape}.')

def assert_dtype(tensor: torch.Tensor, dtype):
    if not isinstance(tensor, torch.Tensor):
        raise ValueError('Error in rank and/or compatibility check. The input tensor should be a valid torch.Tensor.')
    supported_dtype = []
    if isinstance(dtype, tuple):
        supported_dtype = dtype
    else:
        supported_dtype.append(dtype)
    if tensor.dtype not in supported_dtype:
        raise ValueError(f'Error in rank and/or compatibility check. The input tensor should be {dtype}, got {tensor.dtype}.')

def assert_batch_dimension(tensor: torch.Tensor, batch_dize: int, dim: int = 0) -> None:
    if not isinstance(tensor, torch.Tensor):
        raise ValueError('Error in rank and/or compatibility check. The input tensor should be a valid torch.Tensor.')
    if tensor.shape[dim] != batch_dize:
        raise ValueError(f'Error in rank and/or compatibility check. The input tensor should have {batch_dize} entry on batch dimension {dim}, got {tensor.shape}.')

def assert_rank_and_dtype(tensor: torch.Tensor, rank, dtype):
    assert_rank(tensor, rank)
    assert_dtype(tensor, dtype)

# Create the base namespace with required functions
base = _types.SimpleNamespace(**{
    'assert_rank_and_dtype': assert_rank_and_dtype,
    'assert_batch_dimension': assert_batch_dimension,
    'assert_dtype': assert_dtype,
    'assert_rank': assert_rank,
})

# Create test data
# current: shape [embedding_size] - 1D tensor with 4 elements
current = torch.randn(4, dtype=torch.float32)

# memory: shape [m, embedding_size] - 2D tensor with 5 embeddings of size 4
# Must have at least num_neighbors embeddings
memory = torch.randn(5, 4, dtype=torch.float32)

# num_neighbors: must be <= memory.shape[0]
num_neighbors = 3

ARGS = {
    'current': current,
    'memory': memory,
    'num_neighbors': num_neighbors,
}
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 KNNQueryResult — a KNNQueryResult 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
EpisodicBonusModule Not yet run
unverified (harvested, no recorded run)
michaelnny/deep_rl_zoo/deep_rl_zoo/curiosity.py
code served (permissive licence) · get_code("e669d2aa8364df64")
How it ran

no invocation recorded.

EpisodicNovelty Not yet run
unverified (harvested, no recorded run)
YHL04/agent57/curiosity/episodicnovelty.py
code served (permissive licence) · get_code("f9bb89cb56813152")
How it ran

no invocation recorded.

KNNQueryResult Not yet run
unverified (harvested, no recorded run)
michaelnny/deep_rl_zoo/deep_rl_zoo/curiosity.py
code served (permissive licence) · get_code("d4cc04ba549ba4bb")
How it ran

no invocation recorded.

assert_batch_dimension Not yet run
unverified (harvested, no recorded run)
michaelnny/deep_rl_zoo/deep_rl_zoo/curiosity.py
code served (permissive licence) · get_code("6f7df6e9000b00d1")
How it ran

no invocation recorded.

assert_dtype Not yet run
unverified (harvested, no recorded run)
michaelnny/deep_rl_zoo/deep_rl_zoo/curiosity.py
code served (permissive licence) · get_code("3ab420e23d71c69e")
How it ran

no invocation recorded.

assert_rank Not yet run
unverified (harvested, no recorded run)
michaelnny/deep_rl_zoo/deep_rl_zoo/curiosity.py
code served (permissive licence) · get_code("6f88a27da51a4a5d")
How it ran

no invocation recorded.

assert_rank_and_dtype Not yet run
unverified (harvested, no recorded run)
michaelnny/deep_rl_zoo/deep_rl_zoo/curiosity.py
code served (permissive licence) · get_code("f19e3a2b6b73f0ef")
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, 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 14 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-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

We propose a reinforcement learning agent to solve hard exploration games by learning a range of directed exploratory policies. We construct an episodic memorybased intrinsic reward using k-nearest neighbors over the agent's recent experience to train the directed exploratory policies, thereby encouraging the agent to repeatedly revisit all states in its environment. A self-supervised inverse dynamics model is used to train the embeddings of the nearest neighbour lookup, biasing the novelty signal towards what the agent can control. We employ the framework of Universal Value Function Approximators (UVFA) to simultaneously learn many directed exploration policies with the same neural network, with different trade-offs between exploration and exploitation. By using the same neural network for different degrees of exploration/exploitation, transfer is demonstrated from predominantly exploratory policies yielding effective exploitative policies. The proposed method can be incorporated to run with modern distributed RL agents that collect large amounts of experience from many actors running in parallel on separate environment instances. Our method doubles the performance of the base agent in all hard exploration in the Atari-57 suite while maintaining a very high score across the remaining games, obtaining a median human normalised score of 1344.0%. Notably, the proposed method is the first algorithm to achieve non-zero rewards (with a mean score of 8,400) in the game of Pitfall! without using demonstrations or hand-crafted features.

For agents

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

get_harvested_code_for_paper("2002.06038")
get_code_for_paper("2002.06038")
have("2002.06038")

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

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

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

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

Connect an agent — have() is free.