SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2006.07409 · 2020

How to Avoid Being Eaten by a Grue: Structured Exploration Strategies for Textual Worlds

arXiv · PDF · Open in the Atlas

Code that ran

6 of 8 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; 4 failures of our instrument; 2 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, 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/2006.07409.json · badge: /api/ran/2006.07409.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
rajammanabrolu/Q-BERT canonical (classifier label)
classifier basis: census
5 ran · 2 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
to_list Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from AI-secure/InfoBERT
pointer only; the stored copy get_code serves, from AI-secure/InfoBERT, is pointer only (licence: NONE) · get_code("9df40357afea56cc")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

call_askbert Ran
ran on a synthesized input
rajammanabrolu/Q-BERT/qbert/extraction_api.py
code served (permissive licence) · get_code("97c11a2be597dab9")
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 requests
import json
from unittest.mock import Mock, patch

# Define ARGS dict with all parameters for call_askbert
ARGS = {
    'sentence': 'The quick brown fox jumps over the lazy dog',
    'threshold': 0.2,
    'attribute': True
}

# Mock the requests.request to avoid actual network calls
# This allows the setup code to be valid without network access
def mock_request(method, url, data=None):
    mock_response = Mock()
    mock_response.text = json.dumps({'result': 'mocked_response', 'success': True})
    return mock_response

# Patch requests.request for testing purposes
requests.request = mock_request
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
requests — 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
load_vocab Ran
ran; our contract draft was wrong, not the code
rajammanabrolu/Q-BERT/qbert/env.py
code served (permissive licence) · get_code("ba9616834d32858b")
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

class MockEnv:
    def get_dictionary(self):
        return ['apple', 'banana', 'cherry', 'date', 'elderberry']

env = MockEnv()

ARGS = {
    'env': env
}
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
make_output_format Ran
ran; our contract draft was wrong, not the code
rajammanabrolu/Q-BERT/qbert/logger.py
code served (permissive licence) · get_code("28dc605330336da2")
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 HumanOutputFormat. 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 sys
import tempfile
import shutil

# Create a temporary directory for output
temp_dir = tempfile.mkdtemp()

# Define arguments for make_output_format function
ARGS = {
    'format': 'log',
    'ev_dir': temp_dir,
    'log_suffix': '_test'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type HumanOutputFormat — a HumanOutputFormat output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a HumanOutputFormat 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
pad_sequences Ran
ran on a synthesized input
rajammanabrolu/Q-BERT/qbert/representations.py
code served (permissive licence) · get_code("7557a77faca89da4")
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 2, dtype family int, shape (3, 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 test sequences - list of lists with varying lengths
sequences = [
    [1, 2, 3, 4],
    [5, 6],
    [7, 8, 9]
]

# Define ARGS dictionary with all parameters
ARGS = {
    'sequences': sequences,
    'maxlen': 4,
    'dtype': 'int32',
    'value': 0.0
}
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 2, dtype family int, shape (3, 4) — shape (3, 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
profile Ran
ran; our contract draft was wrong, not the code
rajammanabrolu/Q-BERT/qbert/logger.py
pointer only (licence: MIT); the stored copy get_code serves, from facebookresearch/gen_dgrl, is pointer only (licence: NOASSERTION) · get_code("98948fae5be7e92e")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from facebookresearch/gen_dgrl, and GitHub could not classify the licence of that repository (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

clean_obs Not yet run
unverified (harvested, no recorded run)
rajammanabrolu/Q-BERT/qbert/env.py
code served (permissive licence) · get_code("d34db14197cc6b97")
How it ran

no invocation recorded.

read_json Not yet run
unverified (harvested, no recorded run)
rajammanabrolu/Q-BERT/qbert/logger.py
code served (permissive licence) · get_code("88ef5a17fc986d9a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 6 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 4 the same month, 5 later) and 2 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 73 other papers
11 dated earlier, 1 the same month, 61 later
1611.05763 (2016-11)
Learning to reinforcement learn
1804.06459 (2018-04)
On Learning Intrinsic Rewards for Policy Gradient Methods
1806.02473 (2018-06)
Graph Convolutional Policy Network for Goal-Directed Molecular Graph Generation
and 70 more not named here
to_list 41 other papers
8 dated earlier, 1 the same month, 32 later
1902.01718 (2019-02)
End-to-End Open-Domain Question Answering with BERTserini
1910.06188 (2019-10)
Q8BERT: Quantized 8Bit BERT
1911.02984 (2019-11)
The TechQA Dataset
and 38 more not named here
read_json 22 other papers
12 dated earlier, 1 the same month, 9 later
1611.05763 (2016-11)
Learning to reinforcement learn
1711.00123 (2017-11)
Backpropagation through the Void: Optimizing control variates for black-box gradient estimation
1804.06459 (2018-04)
On Learning Intrinsic Rewards for Policy Gradient Methods
and 19 more not named here
profile 13 other papers
7 dated earlier, 1 the same month, 5 later
1804.06459 (2018-04)
On Learning Intrinsic Rewards for Policy Gradient Methods
1806.02473 (2018-06)
Graph Convolutional Policy Network for Goal-Directed Molecular Graph Generation
1806.07857 (2018-06)
RUDDER: Return Decomposition for Delayed Rewards
and 10 more not named here
load_vocab 1 other paper
1 later
2010.11655 (2020-10)
Deep Reinforcement Learning with Stacked Hierarchical Attention for Text-based Games
pad_sequences 1 other paper
1 dated earlier
1909.05398 (2019-09)
Interactive Fiction Games: A Colossal Adventure

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

Text-based games are long puzzles or quests, characterized by a sequence of sparse and potentially deceptive rewards. They provide an ideal platform to develop agents that perceive and act upon the world using a combinatorially sized natural language state-action space. Standard Reinforcement Learning agents are poorly equipped to effectively explore such spaces and often struggle to overcome bottlenecks---states that agents are unable to pass through simply because they do not see the right action sequence enough times to be sufficiently reinforced. We introduce Q*BERT, an agent that learns to build a knowledge graph of the world by answering questions, which leads to greater sample efficiency. To overcome bottlenecks, we further introduce MC!Q*BERT an agent that uses an knowledge-graph-based intrinsic motivation to detect bottlenecks and a novel exploration strategy to efficiently learn a chain of policy modules to overcome them. We present an ablation study and results demonstrating how our method outperforms the current state-of-the-art on nine text games, including the popular game, Zork, where, for the first time, a learning agent gets past the bottleneck where the player is eaten by a Grue.

For agents

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

get_harvested_code_for_paper("2006.07409")
get_code_for_paper("2006.07409")
have("2006.07409")

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

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

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

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

Connect an agent — have() is free.