SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2607.25308 · 2026

CAST: Game Solvers as Turn-Level Teachers for LLM Agents CAST: GAME SOLVERS AS TURN-LEVEL TEACHERS FOR LLM AGENTS

Han-Jia Ye, Yu Wang, Lan-Zhe Guo, Yi-Kai Zhang, Yuchun Miao, Fuli Feng, Xunliang Cai, Wentao Shi, Yueqing Sun, Qi Gu, Ziang Ye

arXiv · PDF · Open in the Atlas

Code that ran

5 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, 1 violated it and 0 have no contract verdict; 4 failures of our instrument; 2 no recorded run), measured 2026-11-23; 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/2607.25308.json · badge: /api/ran/2607.25308.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
Wloner0809/CAST community
Papers with Code archive
5 ran · 2 no recorded run
FunctionStatusWhere it lives
are_similar Ran
ran, violated the contract we drafted
Wloner0809/CAST/rllm/gigpo/core_gigpo.py
code served (permissive licence) · get_code("f4e83ad0230e5934")
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 bool, 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.

from difflib import SequenceMatcher

def are_similar(a: str, b: str, threshold: float=0.95) -> bool:
    """
    Check whether two text observations are similar enough.

    Args:
        a, b (str): Input strings to compare.
        threshold (float): Minimum similarity ratio.

    Returns:
        bool: True if similarity >= threshold.
    """
    if not isinstance(a, str) or not isinstance(b, str):
        raise ValueError('Only text-based observations are supported for similarity-based GiGPO in this version.')
    return SequenceMatcher(None, a, b).ratio() >= threshold


ARGS = {
    "a": "hello world",
    "b": "hello world",
    "threshold": 0.95
}
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 bool, 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
build_step_group Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Wloner0809/CAST/rllm/gigpo/core_gigpo.py
code served (permissive licence) · get_code("7a59c9e0b8598d8c")
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. 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 defaultdict, Counter
import uuid
from difflib import SequenceMatcher

# Create test data for build_step_group

# anchor_obs: array of observation strings
anchor_obs = np.array([
    "observation_A",
    "observation_A",
    "observation_B",
    "observation_C",
    "observation_C",
    "observation_C",
    "observation_D"
], dtype=object)

# index: array of episode_group_uid (can be integers representing group IDs)
index = np.array([1, 1, 1, 2, 2, 2, 3], dtype=int)

# enable_similarity: whether to use similarity-based grouping
enable_similarity = False

# similarity_thresh: threshold for similarity matching (only used if enable_similarity=True)
similarity_thresh = 0.95

# summarize: whether to print summary statistics
summarize = True

# return_group_sizes: whether to return group sizes
return_group_sizes = True

ARGS = {
    'anchor_obs': anchor_obs,
    'index': index,
    'enable_similarity': enable_similarity,
    'similarity_thresh': similarity_thresh,
    'summarize': summarize,
    'return_group_sizes': return_group_sizes
}
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 tuple — a tuple 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
episode_norm_reward Ran
ran; our contract draft was wrong, not the code
Wloner0809/CAST/rllm/gigpo/core_gigpo.py
code served (permissive licence) · get_code("72b9765b0f93350c")
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, 3) 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 numpy as np

torch.manual_seed(0)

# Set up tensor arguments
batch_size = 2
response_length = 3

# token_level_rewards: shape (bs, response_length)
token_level_rewards = torch.randn(batch_size, response_length)

# response_mask: shape (bs, response_length)
response_mask = torch.ones(batch_size, response_length)

# index: shape (bs,) - group/prompt indices
index = np.array([0, 1], dtype=np.int64)

# traj_index: shape (bs,) - trajectory indices
traj_index = np.array([0, 0], dtype=np.int64)

# epsilon: small float for numerical stability
epsilon = 1e-6

# remove_std: whether to remove std from normalization
remove_std = True

# compute_mean_std_cross_steps: whether to compute stats across steps or trajectories
compute_mean_std_cross_steps = True

ARGS = {
    "token_level_rewards": token_level_rewards,
    "response_mask": response_mask,
    "index": index,
    "traj_index": traj_index,
    "epsilon": epsilon,
    "remove_std": remove_std,
    "compute_mean_std_cross_steps": compute_mean_std_cross_steps,
}
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 Tensor, ndim 2, dtype family float, shape (2, 3) — shape (2, 3) 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
step_norm_reward Ran
ran; our contract draft was wrong, not the code
Wloner0809/CAST/rllm/gigpo/core_gigpo.py
code served (permissive licence) · get_code("8fd7ce3513776f5c")
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
import numpy as np

torch.manual_seed(0)

# Set up batch size and response length
batch_size = 2
response_length = 4

# step_rewards: shape (bs,) - scalar reward per batch element
step_rewards = torch.tensor([0.5, 0.8], dtype=torch.float32)

# response_mask: shape (bs, response_length) - binary mask for valid positions
response_mask = torch.tensor([
    [1.0, 1.0, 1.0, 1.0],
    [1.0, 1.0, 0.0, 0.0]
], dtype=torch.float32)

# index: np.array - maps batch elements to prompt indices for grouping
index = np.array([0, 0], dtype=np.int64)

# epsilon: float - small value for numerical stability
epsilon = 1e-06

# remove_std: bool - whether to remove std normalization
remove_std = True

ARGS = {
    "step_rewards": step_rewards,
    "response_mask": response_mask,
    "index": index,
    "epsilon": epsilon,
    "remove_std": remove_std
}
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 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
to_hashable Ran
ran; our contract draft was wrong, not the code
Wloner0809/CAST/rllm/gigpo/core_gigpo.py
code served (permissive licence) · get_code("862de021e4c430ca")
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. 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

ARGS = {
    "x": [
        42,
        3.14,
        "hello",
        True,
        np.int64(10),
        np.float32(2.5),
        np.array([1, 2, 3, 4]),
        [1, 2, "test"],
        (3.14, "tuple", True),
        {"key1": 5, "key2": "value", "nested": [1, 2, 3]},
        np.array([[1, 2], [3, 4]]),
        {"a": np.int32(1), "b": np.array([5, 6, 7])},
        [np.float64(1.5), {"inner": "dict"}, (1, 2, 3)],
    ]
}
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 tuple — a tuple 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
compute_gigpo_outcome_advantage Not yet run
unverified (harvested, no recorded run)
Wloner0809/CAST/rllm/gigpo/core_gigpo.py
code served (permissive licence) · get_code("9a939d57d1c4290d")
How it ran

no invocation recorded.

summarize_group_size Not yet run
unverified (harvested, no recorded run)
Wloner0809/CAST/rllm/gigpo/core_gigpo.py
code served (permissive licence) · get_code("1680eea5fb0667c8")
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, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 5 the same month, 0 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
to_hashable
brick of this paper's assembly: helper
10 other papers
9 dated earlier, 1 the same month · 4 only as an assembly brick
2505.10978 (2025-05)
Group-in-Group Policy Optimization for LLM Agent Training
2509.13347 (2025-09)
OpenHA: A Series of Open-Source Hierarchical Agentic Models in Minecraft
2512.14157 (2025-12)
Ophiuchus: Incentivizing Tool-augmented "Think with Images" for Joint Medical Segmentation, Understanding and Reasoning
and 7 more not named here
are_similar
brick of this paper's assembly: helper
6 other papers
5 dated earlier, 1 the same month · 2 only as an assembly brick
2505.10978 (2025-05)
Group-in-Group Policy Optimization for LLM Agent Training
2512.14157 (2025-12)
Ophiuchus: Incentivizing Tool-augmented "Think with Images" for Joint Medical Segmentation, Understanding and Reasoning
2601.04786 (2026-01)
AgentOCR: Reimagining Agent History via Optical Self-Compression
and 3 more not named here
episode_norm_reward
brick of this paper's assembly: helper
3 other papers
2 dated earlier, 1 the same month · 1 only as an assembly brick
2604.02268 (2026-04)
SKILL0: In-Context Agentic Reinforcement Learning for Skill Internalization
2606.22995 (2026-06)
Group-Graph Policy Optimization for Long-Horizon Agentic Reinforcement Learning
2607.01440 (2026-07)
FaithMed: Training LLMs For Faithful Evidence-Based Medical Reasoning
summarize_group_size
brick of this paper's assembly: helper
3 other papers
2 dated earlier, 1 the same month · 3 only as an assembly brick
2505.10978 (2025-05)
Group-in-Group Policy Optimization for LLM Agent Training
2604.02268 (2026-04)
SKILL0: In-Context Agentic Reinforcement Learning for Skill Internalization
2607.01440 (2026-07)
FaithMed: Training LLMs For Faithful Evidence-Based Medical Reasoning
step_norm_reward
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 the same month · 1 only as an assembly brick
2604.02268 (2026-04)
SKILL0: In-Context Agentic Reinforcement Learning for Skill Internalization
2607.01440 (2026-07)
FaithMed: Training LLMs For Faithful Evidence-Based Medical Reasoning
compute_gigpo_outcome_advantage
brick of this paper's assembly: entry
1 other paper
1 dated earlier
2604.02268 (2026-04)
SKILL0: In-Context Agentic Reinforcement Learning for Skill Internalization

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

Training large language models (LLMs) to act in long-horizon games is a promising step toward generalist decision-making, yet reinforcement learning with verifiable rewards (RLVR) relies on sparse final rewards that reveal little about which decisions determine success. Denser process signals could supply this missing turn-level credit, but existing sources are hard to keep both cheap and accurate. We observe that changes in a game solver's state value reveal whether an action advances the state toward success. Building on this insight, we propose CAST (Credit Assignment from Solver Teachers), which converts these value changes into solver advantages and injects them into RLVR as turn-level signals. We further show that, under a soft-optimal solver assumption, maximizing the solver advantage is equivalent to on-policy distillation from the solver, requiring only scalar values rather than teacher logits. Across Sokoban, Minesweeper, and Rush Hour, CAST outperforms all trained baselines on every game under both in-domain and unseen-difficulty evaluation and achieves the highest average zero-shot performance on ALFWorld and WebShop. Our code is available at github.com/Wloner0809/CAST.

For agents

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

get_harvested_code_for_paper("2607.25308")
get_code_for_paper("2607.25308")
have("2607.25308")

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

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

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

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

Connect an agent — have() is free.