SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2506.08011 · 2025

Play to Generalize: Learning to Reason Through Game Play

arXiv · PDF · Open in the Atlas

Code that ran

8 of 12 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 1 has no contract verdict; 7 failures of our instrument; 4 no recorded run), measured 2026-11-24; 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/2506.08011.json · badge: /api/ran/2506.08011.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
yunfeixie233/vigal canonical (classifier label)
classifier basis not recorded on the link
8 ran · 4 no recorded run
FunctionStatusWhere it lives
build_mathverse_gpt4_extract_prompt Ran
ran on a synthesized input
yunfeixie233/vigal/eval/mathverse/extract_calculate.py
code served (permissive licence) · get_code("f8a7afabd4d22b07")
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 re
import regex

# Build the question_data dict that will be passed to build_mathverse_gpt4_extract_prompt
question_data = {
    'response': 'The solution to the equation is x = 5. Therefore, the answer is \\boxed{5}.'
}

ARGS = {
    'question_data': question_data
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
regex — 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
build_mathverse_gpt4_score_prompt Ran
ran; our contract draft was wrong, not the code
yunfeixie233/vigal/eval/mathverse/extract_calculate.py
code served (permissive licence) · get_code("566d6789169e7b2c")
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.

# Define the argument for build_mathverse_gpt4_score_prompt function

question_data = {
    'question_for_eval': 'Solve for x: 2x + 3 = 7',
    'extraction': 'x = 2',
    'answer': 'x = 2'
}

ARGS = {
    'question_data': question_data
}
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 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
can_infer_option Ran
ran; our contract draft was wrong, not the code
yunfeixie233/vigal/eval/mathvision/extract_calculate.py
code served (permissive licence) · get_code("e2935c878a3bfb63")
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 os
import copy as cp

def can_infer_option(answer, choices):
    verbose = os.environ.get('VERBOSE', 0)
    reject_to_answer = ["Sorry, I can't help with images of people yet.", "I can't process this file.", "I'm sorry, but without the image provided", 'Cannot determine the answer']
    for err in reject_to_answer:
        if err in answer:
            return 'Z'

    def count_choice(splits, choices, prefix='', suffix=''):
        cnt = 0
        for c in choices:
            if prefix + c + suffix in splits:
                cnt += 1
        return cnt
    answer_mod = cp.copy(answer)
    chars = '.()[],:;!*#{}'
    for c in chars:
        answer_mod = answer_mod.replace(c, ' ')
    splits = [x.strip() for x in answer_mod.split()]
    count = count_choice(splits, choices)
    if count == 1:
        for ch in choices:
            if 'A' in splits and len(splits) > 3 and verbose:
                print(f'A might be a quantifier in the string: {answer}.')
                return False
            if ch in splits:
                return ch
    elif count == 0 and count_choice(splits, {'Z', ''}) == 1:
        return 'Z'
    return False

# Test case 1: answer contains a single choice
answer_1 = "The answer is B and nothing else"
choices_1 = {'A', 'B', 'C', 'D'}

# Test case 2: answer contains no choice, should return 'Z'
answer_2 = "This is a valid answer with no letter choice"
choices_2 = {'A', 'B', 'C', 'D'}

ARGS = {
    'answer': answer_1,
    'choices': choices_1
}
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 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
can_infer_text Ran
ran; our contract draft was wrong, not the code
yunfeixie233/vigal/eval/mathvista/extract_calculate.py
code served (permissive licence) · get_code("59ef20be70813be5")
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 string

def can_infer_text(answer, choices):
    answer = answer.lower()
    assert isinstance(choices, dict)
    for k in choices:
        assert k in string.ascii_uppercase
        choices[k] = str(choices[k]).lower()
    cands = []
    for k in choices:
        if choices[k] in answer:
            cands.append(k)
    if len(cands) == 1:
        return cands[0]
    return False


# Setup code
ARGS = {
    "answer": "The correct answer is APPLE",
    "choices": {
        "A": "apple",
        "B": "orange",
        "C": "banana",
        "D": "grape"
    }
}
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 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
compute_approx_kl Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
yunfeixie233/vigal/openrlhf/models/utils.py
code served (permissive licence) · get_code("95084b4b49902e3d")
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 Tensor, ndim 2, dtype family float, shape (2, 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 torch

torch.manual_seed(0)

# Create small log probability tensors
batch_size = 2
num_actions = 4

log_probs = torch.randn(batch_size, num_actions)
log_probs_base = torch.randn(batch_size, num_actions)

# Create action mask (optional)
action_mask = torch.ones(batch_size, num_actions)

# Set kl_estimator to one of the valid options
kl_estimator = 'k1'

ARGS = {
    'log_probs': log_probs,
    'log_probs_base': log_probs_base,
    'action_mask': action_mask,
    'kl_estimator': kl_estimator
}
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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 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
get_chat_response Ran
ran; our contract draft was wrong, not the code
yunfeixie233/vigal/eval/mathverse/extract_calculate.py
code served (permissive licence) · get_code("2d84175fa37aa178")
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 logging
import openai
from unittest.mock import Mock, patch

# Set up logging
logging.basicConfig(level=logging.ERROR)

# Create a mock OpenAI response object that mimics the real structure
class MockChoice:
    def __init__(self, content):
        self.message = Mock()
        self.message.content = content

class MockCompletion:
    def __init__(self, content):
        self.choices = [MockChoice(content)]

# Patch the openai module to return a mock response
def mock_create(**kwargs):
    return MockCompletion("This is a test response from the model.")

# Apply the patch so openai.chat.completions.create returns our mock
openai.chat.completions = Mock()
openai.chat.completions.create = mock_create

# Define the arguments dictionary
ARGS = {
    'prompt': 'What is the capital of France?',
    'model': 'gpt-4o',
    'max_token': 256,
    'retry': 5,
    'temperature': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai — 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
get_chat_response Ran
ran; our contract draft was wrong, not the code
yunfeixie233/vigal/eval/mathvision/extract_calculate.py
code served (permissive licence) · get_code("7b812ccf830749f3")
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 logging
import openai
from unittest.mock import Mock, MagicMock

logging.basicConfig(level=logging.ERROR)

# Mock the openai module and its chat.completions.create method
mock_completion = Mock()
mock_message = Mock()
mock_message.content = "This is a test response from the mock API."
mock_completion.choices = [Mock()]
mock_completion.choices[0].message = mock_message

openai.chat = Mock()
openai.chat.completions = Mock()
openai.chat.completions.create = Mock(return_value=mock_completion)

ARGS = {
    'prompt': 'What is the capital of France?',
    'model': 'gpt-4o',
    'max_token': 256,
    'retry': 5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai — 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
log_probs_from_logits Ran
ran; our contract draft was wrong, not the code
yunfeixie233/vigal/openrlhf/models/utils.py
code served (permissive licence) · get_code("0612b61574b81472")
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 Tensor, ndim 1, dtype family float, shape (2,) 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.functional as F

torch.manual_seed(0)

# Create small tensors for testing
# logits: shape (batch_size=2, num_classes=4)
logits = torch.randn(2, 4, dtype=torch.float32)

# labels: shape (batch_size=2,) with class indices
labels = torch.tensor([1, 3], dtype=torch.long)

ARGS = {
    "logits": logits,
    "labels": labels,
}
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 Tensor, ndim 1, dtype family float, shape (2,) — shape (2,) 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
compute_reward Not yet run
unverified (harvested, no recorded run)
yunfeixie233/vigal/openrlhf/models/utils.py
code served (permissive licence) · get_code("0d27f3b8c425d79f")
How it ran

no invocation recorded.

convert_ring_attn_params Not yet run
unverified (harvested, no recorded run)
yunfeixie233/vigal/openrlhf/models/ring_attn_utils.py
code served (permissive licence) · get_code("23c006771508ace1")
How it ran

no invocation recorded.

pad_sequences Not yet run
unverified (harvested, no recorded run)
yunfeixie233/vigal/openrlhf/models/ring_attn_utils.py
code served (permissive licence) · get_code("b26627fa753393a8")
How it ran

no invocation recorded.

reset_ring_attn_position_ids Not yet run
unverified (harvested, no recorded run)
yunfeixie233/vigal/openrlhf/models/ring_attn_utils.py
code served (permissive licence) · get_code("e93117d99aa6b210")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 11 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 11 later) and 1 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
reset_ring_attn_position_ids 15 other papers
11 dated earlier, 4 later
2306.00398 (2023-06)
Preference-grounded Token-level Guidance for Language Model Fine-tuning
2402.09345 (2024-02)
InfoRM: Mitigating Reward Hacking in RLHF via Information-Theoretic Reward Modeling
2404.18922 (2024-04)
DPO Meets PPO: Reinforced Token Optimization for RLHF
and 12 more not named here
compute_reward 6 other papers
4 dated earlier, 2 later
2402.09345 (2024-02)
InfoRM: Mitigating Reward Hacking in RLHF via Information-Theoretic Reward Modeling
2504.07912 (2025-04)
Echo Chamber: RL Post-training Amplifies Behaviors Learned in Pretraining
2504.08837 (2025-04)
VL-Rethinker: Incentivizing Self-Reflection of Vision-Language Models with Reinforcement Learning
and 3 more not named here
compute_approx_kl 4 other papers
3 dated earlier, 1 later
2402.09345 (2024-02)
InfoRM: Mitigating Reward Hacking in RLHF via Information-Theoretic Reward Modeling
2504.07912 (2025-04)
Echo Chamber: RL Post-training Amplifies Behaviors Learned in Pretraining
2505.15456 (2025-05)
Teaching Language Models to Evolve with Users: Dynamic Profile Modeling for Personalized Alignment
and 1 more not named here
pad_sequences 4 other papers
3 dated earlier, 1 later
2402.09345 (2024-02)
InfoRM: Mitigating Reward Hacking in RLHF via Information-Theoretic Reward Modeling
2504.07912 (2025-04)
Echo Chamber: RL Post-training Amplifies Behaviors Learned in Pretraining
2505.15456 (2025-05)
Teaching Language Models to Evolve with Users: Dynamic Profile Modeling for Personalized Alignment
and 1 more not named here
log_probs_from_logits 3 other papers
2 dated earlier, 1 later
2402.09345 (2024-02)
InfoRM: Mitigating Reward Hacking in RLHF via Information-Theoretic Reward Modeling
2504.08837 (2025-04)
VL-Rethinker: Incentivizing Self-Reflection of Vision-Language Models with Reinforcement Learning
2601.05073 (2026-01)
Milestones over Outcome: Unlocking Geometric Reasoning with Sub-Goal Verifiable Reward
can_infer_text 2 other papers
1 later, 1 same year, order not determinable
2025.findings-acl.964 (2025 (year only))
Multimodal Inconsistency Reasoning (MMIR): A New Benchmark for Multimodal Reasoning Models
2510.04142 (2025-10)
Turning Drift into Constraint: Robust Reasoning Alignment in Non-Stationary Multi-Stream Environments
build_mathverse_gpt4_score_prompt 1 other paper
1 later
2601.05073 (2026-01)
Milestones over Outcome: Unlocking Geometric Reasoning with Sub-Goal Verifiable Reward
can_infer_option 1 other paper
1 later
2601.05073 (2026-01)
Milestones over Outcome: Unlocking Geometric Reasoning with Sub-Goal Verifiable Reward
convert_ring_attn_params 1 other paper
1 later
2601.05073 (2026-01)
Milestones over Outcome: Unlocking Geometric Reasoning with Sub-Goal Verifiable Reward
get_chat_response 1 other paper
1 later
2601.05073 (2026-01)
Milestones over Outcome: Unlocking Geometric Reasoning with Sub-Goal Verifiable Reward
get_chat_response 1 other paper
1 later
2601.05073 (2026-01)
Milestones over Outcome: Unlocking Geometric Reasoning with Sub-Goal Verifiable Reward

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-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Developing reasoning capabilities in multimodal large language models (MLLMs) remains challenging. Motivated by literature suggesting that gameplay promotes transferable reasoning skills, we propose a novel post-training method, Visual Game Learning (ViGaL), where MLLMs develop generalizable reasoning skills through playing arcade-like games. Specifically, we show that training a 7B-parameter MLLM via reinforcement learning (RL) on simple games like Snake significantly enhances the downstream performance on multimodal math benchmarks like MathVista, on multi-discipline questions like MMMU and on 3D spatial reasoning benchmarks like VSI-Bench, without seeing any worked solutions, equations, or diagrams during RL. Remarkably, our model outperforms specialist models post-trained on benchmark-oriented multimodal reasoning data, while preserving the model's performance on general visual benchmarks, a challenge where specialist models often fall short. Our findings suggest that multimodal reasoning can emerge from gameplay, pointing to a promising strategy of designing surrogate tasks for RL post-training.

For agents

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

get_harvested_code_for_paper("2506.08011")
get_code_for_paper("2506.08011")
have("2506.08011")

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

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

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

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

Connect an agent — have() is free.