SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.14879 · EMNLP · 2023

BYTESIZED32: A Corpus and Challenge Task for Generating Task-Specific World Models Expressed as Text Games

Xingdi Yuan, Marc-Alexandre Côté, Ziang Xiao, Peter Jansen, Ruoyao Wang, Graham Todd, Research Montréal

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 6 have no contract verdict; 0 failures of our instrument; 2 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/2305.14879.json · badge: /api/ran/2305.14879.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
cognitiveailab/BYTESIZED32 canonical (classifier label)
classifier basis: census
6 ran · 2 no recorded run
FunctionStatusWhere it lives
build_requirement_text Ran
ran on a synthesized input
cognitiveailab/BYTESIZED32/bytes32/compliance.py
code served (permissive licence) · get_code("01a359166103f27a")
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
import pandas as pd

# Create a small stand-in evaluation form DataFrame
# The function indexes by experiment name (column) and test_id (row)
evaluation_form_df = pd.DataFrame({
    'object': ['cube', 'sphere', 'pyramid'],
    'distractor': ['distractors_spec', 'more_distractors', 'final_distractors'],
    'action': ['rotate', 'move', 'scale']
})

# Define the arguments
ARGS = {
    'evaluation_form_df': evaluation_form_df,
    'experiment': 'object',
    'test_id': '1'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas, 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
check_validity Ran
ran on a synthesized input
cognitiveailab/BYTESIZED32/bytes32/validity.py
code served (permissive licence) · get_code("fc7803997d03e484")
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 sys
import tempfile
import textwrap

# Create a minimal valid TextGame class in a temporary file
temp_dir = tempfile.mkdtemp()
game_file = os.path.join(temp_dir, 'test_game.py')

game_code = textwrap.dedent('''
class TextGame:
    def __init__(self, randomSeed=None):
        self.randomSeed = randomSeed
        self.gameOver = False
        self.score = 0
    
    def getTaskDescription(self):
        return "Complete the task"
    
    def generatePossibleActions(self):
        return ["go north", "go south", "take object", "drop object"]
    
    def step(self, action):
        # Simulate a simple step
        if action == "go north":
            self.score += 1
        if self.score >= 2:
            self.gameOver = True
    
    def calculateScore(self):
        return self.score
''')

with open(game_file, 'w') as f:
    f.write(game_code)

# Create a minimal args object
class Args:
    def __init__(self):
        self.random_seed = 42
        self.max_num_actions = 3
        self.max_steps = 10

args = Args()

ARGS = {
    'gamefile': game_file,
    'args': args
}
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
clean Ran
ran on a synthesized input
cognitiveailab/BYTESIZED32/bytes32/winnability/language_agent.py
code served (permissive licence) · get_code("4fe1ce1ee1520f46")
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

def clean(s):
    clean_toks = ['\n', '\t']
    for tok in clean_toks:
        s = s.replace(tok, '. ')
    while '. .' in s:
        s = s.replace('. .', '. ')
    return s

ARGS = {
    's': 'Hello\nworld\there. This is a test.\n\nMultiple spaces.',
}
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
extract_initial_action_token Ran
ran on a synthesized input
cognitiveailab/BYTESIZED32/bytes32/alignment.py
code served (permissive licence) · get_code("f21824b218425eec")
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

# The function extract_initial_action_token takes a single parameter: action (a string)
# It splits the string by spaces and returns the first token in lowercase
# So we need to provide a valid action string

ARGS = {
    "action": "put apple in fridge"
}
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
parse_game_file_name Ran
ran on a synthesized input
cognitiveailab/BYTESIZED32/bytes32/compliance.py
code served (permissive licence) · get_code("cb994dc33f763671")
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

# The function parse_game_file_name takes a game_file_name string parameter
# and parses it by splitting on underscores, extracting experiment, test_id, and fold

# Construct a valid game file name that satisfies all assertions:
# - experiment (splits[1]) must be in ('object', 'distractor', 'action')
# - test_id (splits[3]) must be in ('1', '2', ..., '16')
# - fold (splits[4]) must be in ('p', 'n')
# The format appears to be: <something>_<experiment>_<something>_<test_id>_<fold>_...

game_file_name = "prefix_object_middle_5_p_suffix"

ARGS = {
    "game_file_name": game_file_name
}
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
sample_actions Ran
ran on a synthesized input
cognitiveailab/BYTESIZED32/bytes32/validity.py
code served (permissive licence) · get_code("49a58281274253aa")
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 list, 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 random

# Construct valid arguments for sample_actions function
possible_actions = [
    "walk north",
    "walk south",
    "walk east",
    "run north",
    "run south",
    "run northwest",
    "jump up",
    "jump down",
    "sit chair",
    "sit ground",
    "sit bench",
    "sit floor",
]

max_num_actions = 2

random_seed = 42

ARGS = {
    "possible_actions": possible_actions,
    "max_num_actions": max_num_actions,
    "random_seed": random_seed,
}
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 list, ndim 1, dtype family float — a list 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
count_tokens Not yet run
unverified (harvested, no recorded run)
cognitiveailab/BYTESIZED32/bytes32/utils.py
code served (permissive licence) · get_code("9e4c4702c63966aa")
How it ran

no invocation recorded.

get_tokenizer Not yet run
unverified (harvested, no recorded run)
cognitiveailab/BYTESIZED32/bytes32/utils.py
code served (permissive licence) · get_code("23ee3a98708a8381")
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, 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 8 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

In this work we investigate the capacity of language models to generate explicit, interpretable, and interactive world models of scientific and common-sense reasoning tasks. We operationalize this as a task of generating text games, expressed as hundreds of lines of PYTHON code. To facilitate this task, we introduce BYTESIZED32 1 , a corpus of 32 reasoning-focused text games totalling 20k lines of PYTHON code. We empirically demonstrate that GPT-4 can use these games as templates for single-shot in-context learning, successfully producing runnable games on unseen topics in 28% of cases. When allowed to selfreflect on program errors, game runnability substantially increases to 57%. While evaluating simulation fidelity is labor intensive, we introduce a suite of automated metrics to assess game fidelity, technical validity, adherence to task specifications, and winnability, showing a high-degree of agreement with expert human ratings. We pose this as a challenge task to spur further development at the juncture of world modeling and code generation.

For agents

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

get_harvested_code_for_paper("2305.14879")
get_code_for_paper("2305.14879")
have("2305.14879")

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

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

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

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

Connect an agent — have() is free.