SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1910.12154 · 2019

ZPD Teaching Strategies for Deep Reinforcement Learning from Demonstrations

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 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 6 have no contract verdict; 0 failures of our instrument; 1 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/1910.12154.json · badge: /api/ran/1910.12154.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
RevanMacQueen/LearningFromHumans community (classifier label)
classifier basis not recorded on the link
6 ran · 1 no recorded run
FunctionStatusWhere it lives
convert_str_to_type Ran
ran on a synthesized input
RevanMacQueen/LearningFromHumans/lfh/utils/config.py
code served (permissive licence) · get_code("b2fbd25f4df143eb")
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 float, 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 torch.nn as nn

torch.manual_seed(0)

# Test case 1: Converting a string to float
value_1 = "3.14"
type_str_1 = "float"

# Test case 2: Converting a string to int
value_2 = "42"
type_str_2 = "int"

# Test case 3: Converting a string to str
value_3 = "hello"
type_str_3 = "str"

# Test case 4: Converting a string to bool (true case)
value_4 = "true"
type_str_4 = "bool"

# Test case 5: Converting to None type
value_5 = "anything"
type_str_5 = "None"

# Test case 6: Converting to list
value_6 = [1, 2, 3]
type_str_6 = "list"

# Use the first test case for the main ARGS dict
ARGS = {
    "value": "3.14",
    "type_str": "float"
}
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 float, 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
make_atari Ran
ran on a synthesized input
RevanMacQueen/LearningFromHumans/lfh/envs/atari.py
code served (permissive licence) · get_code("cf49e0670274da2b")
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 MaxAndSkipEnv. 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
import gym
from gym import spaces

# Create a minimal mock Atari environment
class MockAtariEnv(gym.Env):
    def __init__(self):
        self.observation_space = spaces.Box(low=0, high=255, shape=(84, 84), dtype=np.uint8)
        self.action_space = spaces.Discrete(4)
        self.spec = type('obj', (object,), {'id': 'PongNoFrameskip-v4'})()
        self._step_count = 0
        
    def get_action_meanings(self):
        return ['NOOP', 'FIRE', 'UP', 'DOWN']
    
    def step(self, action):
        self._step_count += 1
        obs = np.random.randint(0, 256, (84, 84), dtype=np.uint8)
        reward = 1.0
        done = self._step_count > 100
        info = {}
        return obs, reward, done, info
    
    def reset(self, **kwargs):
        self._step_count = 0
        return np.random.randint(0, 256, (84, 84), dtype=np.uint8)
    
    def render(self, mode='human'):
        return False
    
    def close(self):
        pass

# Monkey-patch gym.make to return our mock environment
original_make = gym.make
def mock_make(env_id):
    return MockAtariEnv()

gym.make = mock_make

ARGS = {
    'env_id': 'PongNoFrameskip-v4',
    'skip_frame': 4,
    'render_every_frame': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
gym, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MaxAndSkipEnv — a MaxAndSkipEnv output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MaxAndSkipEnv 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
read_json Ran
ran on a synthesized input
RevanMacQueen/LearningFromHumans/lfh/utils/io.py
code served (permissive licence) · get_code("0c8ce2af5b547951")
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 os
import json
import tempfile

# Create a temporary directory and a test JSON file
temp_dir = tempfile.mkdtemp()
test_data = {"key": "value", "number": 42, "list": [1, 2, 3]}
test_file_path = os.path.join(temp_dir, "test.json")
with open(test_file_path, 'w') as f:
    json.dump(test_data, f)

ARGS = {
    'dir_path': temp_dir,
    'file_name': 'test'
}
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 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
read_pickle Ran
ran on a synthesized input
RevanMacQueen/LearningFromHumans/lfh/utils/io.py
code served (permissive licence) · get_code("7b7ecea431823fff")
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 pickle
import tempfile
import os

# Create a temporary file with pickle data
temp_dir = tempfile.gettempdir()
temp_file = os.path.join(temp_dir, "test_pickle_read.pkl")

# Create some test data and pickle it
test_data = {
    "key1": "value1",
    "key2": [1, 2, 3],
    "key3": {"nested": "dict"}
}

with open(temp_file, 'wb') as handle:
    pickle.dump(test_data, handle)

ARGS = {
    "filename": temp_file
}
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 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
read_trajectory Ran
ran on a synthesized input
RevanMacQueen/LearningFromHumans/lfh/utils/io.py
code served (permissive licence) · get_code("d6463150dc6452b4")
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 os
import pickle
import tempfile

# Create a temporary directory to hold the episode files
temp_dir = tempfile.mkdtemp()

# Create a sample trajectory object (can be any picklable object)
sample_trajectory = {
    'states': [1, 2, 3, 4, 5],
    'actions': [0, 1, 0, 1, 0],
    'rewards': [1.0, 2.0, 3.0, 4.0, 5.0]
}

# Write a test episode file
episode_num = 0
flag = 'train'
lifespan = 'episode_{}_{}.pkl'.format(flag, str(episode_num).zfill(7))
episode_path = os.path.join(temp_dir, lifespan)

with open(episode_path, 'wb') as f:
    pickle.dump(sample_trajectory, f)

# Define the arguments dictionary
ARGS = {
    'dir_episodes': temp_dir,
    'episode': 0,
    'flag': 'train'
}
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 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
wrap_deepmind Ran
ran on a synthesized input
RevanMacQueen/LearningFromHumans/lfh/envs/atari.py
code served (permissive licence) · get_code("bfecf5132a09da6a")
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 ClipRewardEnv. 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
from collections import deque
import gym
from gym import spaces
import cv2

# Create a minimal mock Atari environment
class MockALE:
    def __init__(self):
        self.lives_count = 5
    
    def lives(self):
        return self.lives_count

class MockAtariEnv(gym.Env):
    def __init__(self):
        self.action_space = spaces.Discrete(18)
        self.observation_space = spaces.Box(low=0, high=255, shape=(210, 160, 3), dtype=np.uint8)
        self.ale = MockALE()
        self._step_count = 0
    
    def get_action_meanings(self):
        return ['NOOP', 'FIRE', 'RIGHT', 'LEFT']
    
    def step(self, action):
        self._step_count += 1
        obs = np.random.randint(0, 256, (210, 160, 3), dtype=np.uint8)
        reward = 1.0 if action == 1 else 0.0
        done = self._step_count > 100
        info = {}
        return obs, reward, done, info
    
    def reset(self, **kwargs):
        self._step_count = 0
        self.ale.lives_count = 5
        return np.random.randint(0, 256, (210, 160, 3), dtype=np.uint8)
    
    def render(self, mode='human'):
        pass
    
    @property
    def unwrapped(self):
        return self

# Create the mock environment
env = MockAtariEnv()

# Define all arguments for wrap_deepmind
ARGS = {
    "env": env,
    "episode_life": True,
    "clip_rewards": True,
    "frame_stack": 4
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, gym, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ClipRewardEnv — a ClipRewardEnv output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ClipRewardEnv 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
make_env Not yet run
unverified (harvested, no recorded run)
RevanMacQueen/LearningFromHumans/lfh/envs/atari.py
code served (permissive licence) · get_code("06128276029b84db")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 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 7 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

Learning from demonstrations is a popular tool for accelerating and reducing the exploration requirements of reinforcement learning. When providing expert demonstrations to human students, we know that the demonstrations must fall within a particular range of difficulties called the "Zone of Proximal Development (ZPD)". If they are too easy the student learns nothing, but if they are too difficult the student is unable to follow along. This raises the question: Given a set of potential demonstrators, which among them is best suited for teaching any particular learner? Prior work, such as the popular Deep Q-learning from Demonstrations (DQfD) algorithm has generally focused on single demonstrators. In this work we consider the problem of choosing among multiple demonstrators of varying skill levels. Our results align with intuition from human learners: it is not always the best policy to draw demonstrations from the best performing demonstrator (in terms of reward). We show that careful selection of teaching strategies can result in sample efficiency gains in the learner's environment across nine Atari games

For agents

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

get_harvested_code_for_paper("1910.12154")
get_code_for_paper("1910.12154")
have("1910.12154")

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

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

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

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

Connect an agent — have() is free.