NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

RoboCoder: Robotic Learning from Basic Skills to General Tasks with Large Language Models

Jingyao Li, Pengguang Chen, Sitong Wu, Chuanyang Zheng, Hong Xu, Jiaya JiaarXiv 2024 · DOI

Abstract

RoboCoder is a novel framework designed to bridge the gap between high-level task planning and low-level robotic control. By leveraging Large Language Models (LLMs) to generate executable Python code and Vision-Language Models (VLMs) for iterative visual feedback, RoboCoder enables robots to autonomously acquire and refine skills. The system utilizes a dynamic "Action Space" to store and retrieve successful behaviors, facilitating generalization across diverse tasks and robotic morphologies. Experimental results in the Isaac Gym simulator demonstrate significant performance gains, including a 36% relative improvement over GPT-4 in humanoid tasks and up to 92% in quadruped scenarios.

Introduction

Despite the remarkable reasoning capabilities of modern Large Language Models (LLMs), their application to physical robotics remains challenging. A primary obstacle is the "implementation gap"—the divide between high-level conceptual instructions (e.g., "walk forward") and the low-level, joint-specific control code required for execution. While Reinforcement Learning (RL) has traditionally addressed this, it is often computationally intensive and struggles to generalize across different environments or robot types.

RoboCoder addresses these challenges by treating robotic learning as an iterative code-generation problem. Instead of training end-to-end policies, it uses LLMs to write control scripts that are refined through a closed-loop system incorporating visual feedback and a library of reusable skills.

The RoboCoder Framework

The RoboCoder architecture consists of three primary components that work together to evolve robotic capabilities:

  1. The Searcher: Utilizing a lightweight MiniLM model, the Searcher scans a vector-based "Action Space" for previously successful code snippets related to the current task. It employs a dual-threshold strategy: near-perfect matches are executed immediately, while "related" actions serve as templates for the Actor.
  2. The Actor: This component (typically a high-capacity LLM like GPT-4) generates Python functions to control the robot's Degrees of Freedom (DoF). It synthesizes new code by combining task descriptions, robot specifications, and templates provided by the Searcher.
  3. The Evaluator: Acting as the system's sensory feedback, the Evaluator uses a Vision-Language Model (VLM) to analyze video frames from the simulator. If a task fails, the Evaluator provides natural language critiques (e.g., "the legs are not moving alternately") and suggests specific physical adjustments for the next iteration.
The RoboCoder framework overview, illustrating the interaction between the Searcher, Actor, Evaluator, and the dynamic Action Space.

Experimental Setup

To evaluate RoboCoder, the researchers introduced a benchmark comprising 80 manually designed tasks across seven distinct robotic entities in the Isaac Gym simulator. These entities include a bipedal Humanoid, an Ant, a Cartpole, a Sektion Cabinet, Franka Panda and Kinova arms, and the Anymal quadruped. Unlike traditional benchmarks that focus on isolated tasks, this suite requires models to build complex behaviors from minimal initial mastery, testing their ability to generalize and combine basic skills.

Results and Discussion

RoboCoder demonstrates significant improvements in task success rates across all tested environments. In humanoid tasks, the framework achieved a 36% relative improvement over a standard GPT-4 few-shot baseline. The benefits were even more pronounced in high-dimensional tasks; for the Anymal quadruped, the improvement reached 92%.

Comparison of pass rates across different LLM backends over multiple feedback iterations. GPT-4 consistently outperforms other models, but all show improvement through the RoboCoder framework.

Key findings from the study include:

  • Visual Feedback is Critical: Ablation studies revealed that removing the natural language reasoning from the Evaluator's feedback (leaving only success/failure signals) resulted in a 20% performance drop. Visual critiques provide the "physical" context that code-level errors cannot.
  • Efficiency through Hybrid Modeling: By using a small 21M parameter model for searching and only invoking large LLMs for generation and evaluation, RoboCoder balances high performance with computational efficiency.
  • Dynamic Skill Acquisition: The "Action Space" allows the robot to "remix" existing skills. As the library of successful actions grows, the system becomes faster and more accurate at solving novel, complex tasks.

Conclusion

RoboCoder presents a scalable approach to robotic learning by combining the code-generation power of LLMs with the perceptual capabilities of VLMs. While currently limited to simulated environments, the framework's ability to autonomously refine skills through visual feedback marks a significant step toward general-purpose robotic intelligence. Future work will focus on bridging the sim-to-real gap and applying the system to more open-ended, real-world scenarios.

Summary updated

BibTeX
@misc{li2024robocoder,
  author = {Jingyao Li and Pengguang Chen and Sitong Wu and Chuanyang Zheng and Hong Xu and Jiaya Jia},
  title = {{RoboCoder: Robotic Learning from Basic Skills to General Tasks with Large Language Models}},
  year = {2024},
  eprint = {2406.03757},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.03757},
}
Figure