Command Palette
Search for a command to run...
CAST: LLM 에이전트를 위한 턴 단위 교사로서의 게임 솔버
CAST: LLM 에이전트를 위한 턴 단위 교사로서의 게임 솔버
초록
대규모 언어 모델(LLM)이 장기적 게임에서 행동하도록 훈련하는 것은 범용 의사 결정을 향한 유망한 단계이지만, 검증 가능한 보상을 이용한 강화 학습(RLVR)은 어떤 결정이 성공을 좌우하는지 거의 알려주지 않는 희소한 최종 보상에 의존한다. 더 조밀한 과정 신호는 이러한 누락된 턴 단위 기여도를 제공할 수 있지만, 기존의 신호원은 저비용과 정확성을 동시에 유지하기 어렵다. 우리는 게임 솔버의 상태 가치 변화가 행동이 성공을 향해 상태를 진전시키는지 여부를 드러낸다는 점에 주목한다. 이러한 통찰을 바탕으로, 우리는 CAST(Credit Assignment from Solver Teachers)를 제안한다. CAST는 이러한 가치 변화를 솔버 어드밴티지로 변환하고 이를 턴 단위 신호로서 RLVR에 주입한다. 나아가 우리는 소프트 최적 솔버 가정 하에서 솔버 어드밴티지를 최대화하는 것이 솔버로부터의 온폴리시 증류와 동등하며, 교사 로짓 대신 스칼라 값만 필요로 함을 보인다. Sokoban, Minesweeper, Rush Hour에 걸친 실험에서 CAST는 도메인 내 평가와 난이도 미확인 평가 모두에서 모든 게임에 대해 훈련된 모든 기준 모델을 능가했으며, ALFWorld와 WebShop에서 가장 높은 평균 제로샷 성능을 달성했다. 우리의 코드는 § github.com/Wloner0809/CAST에서 확인할 수 있다.
One-sentence Summary
University of Science and Technology of China et al. propose CAST (Credit Assignment from Solver Teachers), which derives turn-level credit from game-solver value changes as solver advantages for RLVR, demonstrating that under a soft-optimal solver this scalar-only signal is equivalent to on-policy distillation without teacher logits, and CAST outperforms all trained baselines on Sokoban, Minesweeper, Rush Hour, ALFWorld, and WebShop.
Key Contributions
- CAST converts per-action changes in a game solver’s state value into solver advantages that provide fine-grained, turn-level credit for reinforcement learning with verifiable rewards, without requiring teacher logits.
- Maximizing the solver advantage is theoretically equivalent to on-policy distillation from the solver, and the signal is stabilized through asinh compression and batch-level RMS normalization, yielding an efficient logit-free distillation objective.
- Across Sokoban, Minesweeper, and Rush Hour, CAST outperforms all trained baselines under in-domain and unseen-difficulty settings, reaches DAPO’s peak validation performance in 1.7–2.0× fewer steps, and achieves the highest average zero-shot performance on ALFWorld and WebShop. Exact solver queries add negligible overhead.
Introduction
The authors tackle the challenge of training generalist LLM agents for interactive decision-making in environments like Sokoban, Minesweeper, and Rush Hour, where sparse terminal rewards create a severe credit-assignment problem: it is unclear which actions in a trajectory caused success or failure. Prior methods try to densify the signal via costly search, learned process reward models, or cross-trajectory comparisons, but each involves trade-offs in computation, supervision quality, or reliability. The authors leverage classical game solvers as turn-level teachers, introducing CAST (Credit Assignment from Solver Teachers), which computes a solver advantage by comparing solver-estimated state values before and after each LLM action. This scalar advantage is injected into reinforcement learning with verifiable rewards as fine-grained process supervision, and they prove that under a soft-optimal solver, maximizing it is equivalent to on-policy distillation without needing the solver’s full action distribution. With lightweight signal stabilization, CAST yields state-of-the-art in-domain and generalization performance, while adding negligible training overhead.
Method
The authors address the credit-assignment bottleneck in outcome-supervised reinforcement learning with verifiable rewards (RLVR) by introducing a solver-guided turn-level credit mechanism. Traditional methods like GRPO assign a single trajectory-level advantage to every token, which is insufficient for long-horizon games. To refine this, the authors leverage a game-specific solver as a turn-level teacher that scores each action individually, transforming the sparse terminal reward into a dense per-step process signal.
To score each action, the method utilizes the solver cost-to-go function, N(s), which represents the minimum amount of work required to reach a win from state s. The authors define an auxiliary shortest-path objective and compute the solver advantage as:
AπSolver(st,at)=−1+N(st)−Est+1[N(st+1)].Under the solver optimal policy, the expected next-state cost equals N(st)−1, making the raw advantage non-positive. To map progress to positive credit, the authors shift the advantage by +1, yielding the shifted solver advantage:
AπSolver(st,at)=N(st)−Est+1[N(st+1)].This shifted score directly reflects the drop in cost-to-go caused by a move, assigning +1 for optimal progress, 0 for no progress, and negative values for harmful moves.
Because the raw shifted advantage can be heavy-tailed and vary in scale across different games, the authors apply two lightweight transformations to shape the signal for stable training. First, an asinh compression, g(x)=ln(x+x2+1), is used to preserve small-progress values while logarithmically compressing rare and large dead-state penalties. Second, batch-level RMS normalization rescales the compressed signal by its root-mean-square magnitude over all turns in the batch, ensuring a consistent scale without shifting the zero point that encodes neutral progress.
The overall pipeline combining these signals is illustrated below.
The shaped solver signal is then integrated into the GRPO training pipeline. For a trajectory i at turn t, the final advantage combines the trajectory-level outcome advantage with the turn-level shaped solver advantage:
A^i,t=A^ioutcome+αh(Ai,tπSolver),where α controls the strength of the solver guidance. This combined advantage replaces the standard outcome advantage in the clipped GRPO surrogate objective, allowing the terminal reward to anchor global win-or-loss credit while the solver signal refines it step by step.
Finally, the authors demonstrate that this solver advantage is mathematically equivalent to on-policy distillation (OPD). By treating the solver as a soft-optimal teacher policy, the solver advantage corresponds to the teacher log-preference for an action. Consequently, the policy-gradient update implicitly maximizes the task return while minimizing the cross-entropy from the student policy to the solver policy. This logit-free OPD formulation allows the student policy to use the solver distribution as a prior, tilting it exponentially based on the task advantage, which enables the student to potentially surpass the teacher performance.
Experiment
The evaluation uses three classic games (Sokoban, Minesweeper, Rush Hour) with in-domain and unseen-difficulty settings, plus zero-shot transfer to ALFWorld and WebShop, comparing a Qwen3-4B-Instruct-2507 base policy against training-free ReAct prompts, closed-source models, and outcome-only or process-level RL baselines. The experiments confirm that the solver-derived turn-level signal consistently improves performance, leading to higher success rates on training games, better generalization to harder levels and held-out domains, and faster training convergence. Ablations show that each design component (solver-advantage weight, asinh transformation, batch RMS normalization) contributes to the gain, while analysis reveals that solver queries add negligible training overhead and that replacing the exact solver with a learned value network preserves most of the benefit, demonstrating the method's practical utility.
Among closed-source models using ReAct prompting, Sonnet-4.6 leads overall, achieving the highest average success rates on both in-domain and unseen difficulty levels across the three training games. Gemini 2.5 Pro ranks second, while all models show a clear drop when moving from in-domain to unseen levels, with the gap varying by game. Sonnet-4.6 attains the best average success on both in-domain and unseen splits, followed by Gemini 2.5 Pro. Every model suffers a performance decline from in-domain to unseen difficulty, with especially sharp drops in some games such as Minesweeper.
In zero-shot out-of-distribution transfer, CAST achieves the highest success rates on both domains, outperforming all RL-trained baselines and the training‑free ReAct prompt. On ALFWorld it reaches 37.9% (5.8 points above the best trained baseline), on WebShop 22.7% (4.8 points above the best trained baseline), and an overall average of 30.3%, which is 5.6 points higher than the next best method. CAST attains the top domain averages: 37.9% on ALFWorld and 22.7% on WebShop, exceeding the strongest RL-trained baselines (GSPO at 32.1% and GiGPO at 17.9%) by clear margins. The training‑free ReAct baseline scores 30.2% on ALFWorld and 18.8% on WebShop, while CAST’s overall average of 30.3% is well above ReAct’s 24.5% and all other methods.
Two experiments assess agent performance under different conditions. The first compares closed-source models using ReAct prompting across training games, where Sonnet-4.6 achieves the highest success rates but all models exhibit a clear drop on unseen difficulty levels, with particularly sharp declines in games like Minesweeper. The second evaluates zero-shot out-of-distribution transfer, showing that CAST significantly outperforms both RL-trained baselines and the training-free ReAct prompt on ALFWorld and WebShop.