CaPtain: A Pipeline for Post-Training Code-as-Policy Robot Agents
AuthorsYijia Fan, Xilin He, Yilei Jiang, Dongming Wu, Jiaxu Wang, Xiangyu Yue
AffiliationsMMLab, The Chinese University of Hong Kong NovaXBot
CaPtain trains a small open vision-language model to control robots by writing code, using reinforcement learning and a physical critic to improve its decisions.
Key results
Perception, measurement, and motion capabilities exposed to the policy.
Held-out LIBERO host success for CaPtain-4B.
CaPtain-4B average across the three short-horizon suites.
Percentage-point gain over SFT across all four suites.
Success without training on the target benchmark.
CaPtain-4B score without target-domain training.
What the paper found
CaPtain turns an open 4B vision-language model into a robot agent that writes Python code against low-level robot controls, rather than relying on a pretrained vision-language-action model or high-level grasp-and-place skills. Its CaPtain-Harness provides 22 low-level capabilities, including perception, geometry measurement, and guarded motion, and returns receipts describing what happened. Starting from Qwen3.5-4B, the pipeline uses synthetic code-and-tool trajectories generated with GPT-6 Astra for supervised fine-tuning, then multi-turn reinforcement learning. The key technical contribution is a simulator critic that sees privileged physical state during training and assigns each request credit according to its change in predicted success; the robot policy itself never receives that hidden state. On held-out LIBERO, Qwen3.5-4B goes from 0% zero-shot success to 55.4% after fine-tuning and 73.8% after reinforcement learning. CaPtain-4B reaches 78.5% on the three-suite LIBERO-PRO average, with a 19.4 percentage-point reinforcement-learning gain across all four suites. It also transfers without target-domain training, achieving 83.3% on SimplerEnv WidowX and a 75.0 score on CaP-Bench, exceeding reported Gemini-3-Pro and Claude Opus 4.5 results there. The policy runs without frontier-model calls at test time and transfers to a physical robot after adaptation using only a coarse simulated twin; its main remaining challenges include bimanual tasks and unfamiliar robot kinematics.
Original 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.
Read the original paperMore in Embodied AI
Browse all 60 papers →RynnVLA-Latent: Scaling Robotic Manipulation Foundation Models with 3D-Grounded Latent Actions
Haoyu Zhao, Xingyue Zhao, Zhian Su, Bohan Hou, Yinzhou Tang, Fengyi Wang, Kehan Li, Yuming Jiang, Siteng Huang, Xin Li, Zhenyu Zeng, Mingxiu Chen, Deli Zhao, Zhongyu Li
RynnVLA-Latent learns robot-manipulation policies from large collections of videos by extracting 3D-grounded latent actions instead of relying only on robot control demonstrations.
TinyAstral: Transferring Self-Evolving Harnesses to Tiny Generalist Manipulation Agents
Kehong Gong, Xiaoxu Zheng, Guanli Hou, Seunghun Lee, Mengqi Guo, Runjia Tan, Zhengyu Wen, Qi Wang, Xiaoyu He, Mingyuan Zhang, Michael Bi Mi
TinyAstral evolves a robot agent’s harness and distills its gains into a smaller model that approaches its teacher’s performance with lower inference cost.
Scaling Online Exploration for Robot Agents
Runhan Huang, Xiangcheng Zhang, Haoyu Chen, Yitong Li, Yen-Jen Wang, Bohan Lyu, Haotian Ye, Chuye Hong, Yixuan Wang, Chloe Su, Haoyu Xiong, Yangzhen Wu, Enze Xie, Travis Manderson, Stefano Ermon, Pieter Abbeel, Antonio Torralba, Dawn Song, Weirui Ye, Yilun Du
RAX lets coding agents explore, learn, and compose robot skills across different embodiments without relying on human demonstrations.