CaPtain: A Pipeline for Post-Training Code-as-Policy Robot Agents

Yijia Fan, Xilin He, Yilei Jiang, Dongming Wu, Jiaxu Wang, Xiangyu Yue

arXiv:2610.40799 · 2026-11-02 공개 · arXiv · PDF

reinforcement-learning robotics sim-to-real libero vision-language-model qwen policy-training multi-turn-rl

Abstract

Across coding, web, and tool-use tasks, language-model agents are now routinely trained with the same recipe: supervised fine-tuning (SFT) to learn the interface, then multi-turn reinforcement learning (RL) to master it. Code-as-policy (CaP) casts robot manipulation in the same form, as the policy writes code against robot APIs and reads back the results, so the same recipe should apply. Yet existing CaP agents sidestep training: they either prompt closed frontier models or delegate manipulation to pre-trained vision-language-action models (VLAs) and high-level skills, while small open vision-language models (VLMs) fail outright. We present CaPtain, an open post-training pipeline that turns a small open VLM into a capable CaP agent, with no VLA, frontier model, or privileged state at test time. CaPtain trains and deploys the policy inside CaPtain-Harness, which exposes low-level perception, geometry, and guarded-motion primitives across simulation and real hardware. We first align the base model via SFT on synthetic trajectories generated with GPT-6 Astra, then apply multi-turn RL. Multi-turn RL must credit tens of agent requests, whose physical effects often surface turns later, from a single end-of-episode outcome. We therefore introduce a physical critic that reads privileged simulator state, never seen by the policy, and credits each request by how much it changes the predicted chance of success. Starting from Qwen3.5-4B (0% zero-shot), CaPtain-4B reaches 55.4% held-out LIBERO success after SFT and 73.8% after RL. On LIBERO-PRO, it reaches 78.5%, surpassing several frontier-model agents, and its RL gains persist across three perturbation suites (+17.6 to +21.2 points). Without target-domain training, it attains 83.3% on SimplerEnv WidowX, exceeds frontier models on CaP-Bench, and runs on a real robot after simulation-only adaptation. We release all code, data, and model weights.

한국어 요약

한 줄 요약

CaPtain은 Qwen3.5-4B 모델을 기반으로, 코드-정책(CaP) 로봇 에이전트를 학습시키는 오픈 소스 후-트레이닝 파이프라인으로, LIBERO-PRO에서 78.5% 성공률을 달성한다.

핵심 기여도

핵심 아이디어

기존 CaP 에이전트는 SFT 및 RL을 우회하고, 대신 VLA나 고급 스킬에 의존하거나, closed frontier 모델을 사용하여 학습을 완전히 생략한다. 이는 학습된 에이전트가 직접 조작 결정을 내리는 능력을 제한한다. CaPtain은 이 문제를 해결하기 위해, SFT와 멀티턴 RL을 모두 적용하는 파이프라인을 제안한다. 핵심 아이디어는 **저수준 원시 명령(primitive)을 사용한 조작**과 **시뮬레이터 크리틱을 통한 요청별 신용 할당**이다.

CaPtain-Harness는 22개의 감지, 기하학적 측정, 보호된 모션 원시 명령을 제공하며, 이는 스킬(예: 그립, 배치) 없이 직접 조작을 가능하게 한다. 멀티턴 RL에서는 단일 종료 결과만으로 수십 개의 요청에 신용을 할당해야 하는 문제가 발생하지만, CaPtain은 **시뮬레이터 크리틱**을 도입하여, 각 요청이 성공 확률에 미치는 영향을 기반으로 신용을 할당한다. 이 크리틱은 정책이 접근할 수 없는 시뮬레이션 내 물리 상태를 읽어, 요청별로 신용을 계산한다.

기술적 접근법

주요 결과

의의 및 한계

CaPtain은 기존 frontier 모델에 의존하지 않고, 오픈 소스 VLM을 기반으로 CaP 에이전트를 훈련하는 첫 사례이다. 저수준 원시 명령을 사용함으로써, 기존 VLA 기반 시스템보다 더 유연한 조작이 가능하며, 실제 로봇에 직접 적용할 수 있는 실용성을 확보했다. 또한, 시뮬레이터 크리틱을 통해 멀티턴 RL의 신용 할당 문제를 해결함으로써, 정책이 물리적 조작에 집중하도록 유도한다.

그러나, CaPtain은 여전히 **GPT-6 Astra로 생성된 합성 데이터에 의존**하며, 실제 환경에서의 일반화 능력은 추가 실험을 통해 검증이 필요하다. 또한, **이중 팔 조작(bimanual coordination)**이나 **다중 로봇 환경(multi-embodiment)**에 대한 확장은 아직 미비한 상태이다.

실용적 활용

CaPtain은 오픈 소스 VLM을 기반으로 로봇 조작 에이전트를 훈련할 수 있는 파이프라인으로, 연구자들이 저비용으로 CaP 시스템을 개발할 수 있도록 지원한다. 특히, **시뮬레이션 기반 학습 후 실제 로봇에 적용** 가능한 점에서, 로봇 개발 및 테스트 환경에서 유용하게 활용될 수 있다. 또한, **시뮬레이터 크리틱 기반의 신용 할당 방식**은 다른 멀티턴 RL 문제에도 적용 가능하다.