RoboMorph: Evolving Robot Morphology using Large Language Models

Kevin Qiu, Władysław Pałucki, Krzysztof Ciebiera, Paweł Fijałkowski, Marek Cygan, Łukasz Kuciński

TL;DR

This paper introduces RoboMorph, a novel framework that uses Large Language Models (LLMs) to automatically generate and optimize robot designs. By combining LLMs with evolutionary algorithms and reinforcement learning, RoboMorph can discover diverse and effective robot morphologies tailored to specific terrains, outperforming previous grammar-based methods.

What Problem Does This Paper Address?

Designing robot morphologies (their physical structure) is a fundamental but incredibly challenging task in robotics. Traditional methods rely heavily on human intuition and extensive trial-and-error, making the exploration of the vast design space slow and computationally expensive. Existing automated approaches, like evolutionary algorithms or grammar-based searches, often struggle with scalability, narrow exploration, or computational bottlenecks. This paper aims to overcome these limitations by leveraging the generative power of LLMs to automate and accelerate the discovery of novel and efficient robot designs.

Methods

RoboMorph employs a closed-loop evolutionary process. At its core, it uses a Large Language Model (LLM), specifically GPT-4o, as a sophisticated "mutation operator."

  1. Grammar-Based Design: Robot designs are represented using a structured grammar, adapted from a previous method called Robogrammar. This grammar ensures that generated designs are physically plausible and can be assembled from modular parts.
  2. LLM-Driven Generation: The LLM is prompted with a system prompt (defining grammar rules), a user prompt (task instruction), and "few-shot examples" (top-performing designs from previous generations). The LLM then generates new robot designs in a textual, grammar-compliant format, along with its reasoning.
  3. Compilation and Simulation: The LLM-generated designs are compiled into XML files, which are then used to create simulated robots in MuJoCo (via MJX).
  4. Reinforcement Learning (RL) Control: For each simulated robot, a locomotion controller is trained using the Soft Actor-Critic (SAC) algorithm.
  5. Fitness Evaluation: The trained controller's performance (fitness) is evaluated based on the robot's ability to navigate a specific terrain.
  6. Evolutionary Selection: The top-performing designs are retained and used as few-shot examples for the next LLM prompt, driving iterative improvement. This process is repeated over multiple generations.

Key novelties include using LLMs as generative operators for morphology, employing a "best-shot prompting" strategy to guide the LLM, and integrating this with an RL-based evaluation loop.

Datasets

The paper does not introduce new datasets. Instead, it uses simulated environments representing four distinct terrains: ridged, flat, frozen, and beams. These terrains are adapted from Robogrammar and are used to evaluate the fitness of the generated robot designs.

Key Insights and Ideas

  • LLMs as Creative Designers: LLMs, when guided by a grammar and evolutionary feedback, can act as powerful generative operators, discovering novel robot morphologies that go beyond human intuition or traditional mutation operators.
  • "Best-Shot Prompting" for Diversity and Improvement: Using top-performing designs from previous generations as few-shot examples (best-shot prompting) effectively guides the LLM towards better solutions while maintaining diversity, preventing premature convergence. Crucially, excluding explicit fitness scores in the prompt helps avoid overfitting and encourages unconventional designs.
  • Grammar as a Safety Net: The grammar-based representation is crucial for ensuring that LLM-generated designs are physically plausible and compilable, acting as a constraint that grounds the LLM's creativity.
  • Terrain Specialization: RoboMorph successfully discovers morphologies specifically adapted to different terrains, demonstrating the framework's ability to optimize for environmental challenges. For instance, it found wheeled designs for flat terrain and hexapods for slippery surfaces.
  • LLMs vs. Traditional Search: RoboMorph's LLM-based approach can explore the design space more efficiently and discover more diverse solutions compared to Robogrammar's graph-search method, especially for configurations that are hard to reach through incremental mutations (like wheeled designs).

Key Results

  • Performance Improvement: RoboMorph consistently improves the maximum fitness of the best robot design in the population across evolutionary generations.
  • Competitive or Superior Designs: The top designs generated by RoboMorph match or outperform those produced by Robogrammar's graph-search method on shared terrains (ridged, flat, frozen) when evaluated using RL.
  • Diverse Morphologies: The framework discovered diverse morphologies, including wheeled quadrupeds, hexapods, and low-profile designs, some of which were not found by prior methods.
  • LLM Variant Impact: Larger LLMs (GPT-4o, GPT-4) yield significantly higher-fitness designs than smaller variants.
  • Evolutionary Strategy: Iterative evolution, especially with the best-shot prompting strategy (without explicit fitness in the prompt), is key to achieving high performance and diversity.

Limitations and Future Work

  • Computational Cost: RoboMorph is computationally more expensive than Robogrammar, primarily due to the RL training phase, although its parallelizable nature allows for faster overall convergence (around a day per seed).
  • No Traditional EA Baseline: The paper acknowledges that a direct comparison with a traditional evolutionary algorithm (using random mutation/crossover on the same grammar) is missing, which would better isolate the LLM's specific contribution.
  • Expanding Design Space: Future work could involve relaxing grammar constraints to allow for more diverse materials, component types, and link dimensions, or mapping grammar components directly to hardware modules for real-world assembly.
  • Multi-Environment and Joint Generation: Extending the framework to handle multiple terrains simultaneously or jointly generating robot morphology and its control policy with LLMs are promising future directions.
  • Baselines and Robustness: Further studies on prompt sensitivity and evaluating open-source LLM alternatives are suggested.
  • Sim-to-Real Transfer: While the paper focuses on simulation, bridging the gap to real-world manufacturing and deployment remains an open challenge.

Summary updated

BibTeX
@inproceedings{qiu2024robomorph,
  author = {Kevin Qiu and Władysław Pałucki and Krzysztof Ciebiera and Paweł Fijałkowski and Marek Cygan and Łukasz Kuciński},
  title = {{RoboMorph: Evolving Robot Morphology using Large Language Models}},
  booktitle = {EARL @ RSS},
  year = {2024},
  url = {https://openreview.net/forum?id=pvqj1S08Rd},
}
Figure