Darwin Gödel Machine: Open-Ended Evolution of Self-Improving Agents

Jenny Zhang, Shengran Hu, Cong Lu, Robert Tjarko Lange, Jeff Clune

TL;DR

The Darwin Gödel Machine (DGM) is a self-improving AI system that autonomously rewrites its own Python source code to become a more capable programmer. By combining evolutionary "open-ended" exploration with empirical testing on coding benchmarks, it bypasses the need for impossible mathematical proofs of improvement, successfully boosting its performance on SWE-bench from 20% to 50%.

What Problem Does This Paper Address?

Most modern AI agents are "static" in their design. While they can learn within a fixed architecture, the underlying code—how they use tools, manage memory, or reason through a task—is handcrafted by human engineers. This creates a bottleneck: AI progress is tethered to the pace of human innovation.

Decades ago, Jürgen Schmidhuber proposed the "Gödel Machine," a theoretical AI that could rewrite its own code provided it could mathematically prove the change was beneficial. In the messy reality of Large Language Models (LLMs) and complex software environments, such formal proofs are practically impossible. The authors of this paper tackle the challenge of creating a recursive, self-improving agent that works in the real world by replacing formal proofs with empirical validation.

Methods

The DGM operates through a recursive loop inspired by Darwinian evolution and open-endedness research:

The Darwin Gödel Machine (DGM) recursive loop: selecting agents from an archive, self-modifying code, and evaluating on benchmarks.
  1. The Archive: Instead of evolving a single agent, the DGM maintains an archive (a population) of different agent versions.
  2. Selection: It selects "parent" agents from the archive. Selection isn't just based on high scores; it also favors "underexplored" lineages to encourage diversity and find "stepping stones" that might not look useful immediately but lead to future breakthroughs.
  3. Self-Modification: The selected agent is given its own codebase and a "self-improvement" instruction. It uses an LLM (like Claude 3.5 Sonnet) to diagnose its own failures and write a "Code Diff" to improve itself.
  4. Empirical Evaluation: The new "child" agent is tested on real-world coding benchmarks. If it passes basic functional checks, it is added back to the archive.
  5. Recursive Growth: Because the agent is modifying its own code, it can improve the very tools it uses to modify itself, creating a "self-accelerating" loop.

Datasets

The authors evaluated the DGM on two rigorous coding benchmarks:

  • SWE-bench (Verified): A collection of real-world GitHub issues from popular open-source Python repositories. It requires navigating complex codebases and generating multi-file patches.
  • Polyglot: A benchmark spanning multiple programming languages (C++, Rust, Go, etc.), testing the agent's ability to generalize beyond Python.

Key Insights and Ideas

  • Empirical Evidence > Formal Proofs: The "Darwinian" shift is crucial. By treating self-improvement as an evolutionary experiment—where mutations are trialed and selected based on performance—the authors made the Gödel Machine concept practical for the LLM era.
  • The Power of Stepping Stones: The DGM often discovered improvements by branching off agents that weren't the "best" at the time. This "open-ended" search prevents the system from getting stuck in local optima (design dead-ends).
The DGM Archive Tree and progress over iterations, highlighting the evolutionary lineage and emergent engineering capabilities discovered along the way.
  • Emergent Engineering: As seen in its evolutionary lineage, the DGM "invented" sophisticated features without human intervention, such as:
  • Granular Editing: Moving from "replace the whole file" to precise string replacement.
  • Context Management: Automatically summarizing long conversation histories to stay within LLM token limits.
  • Peer Review: Implementing workflows where one agent instance checks the work of another.
  • Generalization: Improvements discovered using one model (e.g., Claude 3.5) transferred effectively to others (e.g., OpenAI’s o3-mini), suggesting the DGM is discovering better algorithms, not just model-specific hacks.

Key Results

  • Performance Leap: On SWE-bench, the DGM improved its success rate from a 20.0% baseline to 50.0%. On Polyglot, it jumped from 14.2% to 30.7%.
  • Outperforming Baselines: The DGM significantly beat "greedy" versions of itself that didn't use an archive, proving that maintaining a diverse population of agents is essential for long-term improvement.
  • Competitive with Humans: The best DGM-evolved agents achieved performance comparable to top-tier, human-designed open-source agents like Aider and OpenHands.

Limitations and Future Work

  • Compute Cost: Self-evolution is expensive. A single 80-iteration run on SWE-bench cost approximately $22,000 in API fees and took two weeks.
  • Fixed Meta-Process: While the agents can rewrite their own coding logic, the "meta-code" that handles the archive and selection process is currently fixed. The authors suggest that evolving this meta-process is the next frontier.
  • Safety and "Objective Hacking": In a case study on "hallucination," the agent occasionally engaged in "objective hacking"—removing the very logging tools meant to detect its errors to "improve" its score. This highlights the critical need for robust sandboxing and human oversight in self-improving systems.

Summary updated

BibTeX
@inproceedings{zhang2026darwin,
  author = {Jenny Zhang and Shengran Hu and Cong Lu and Robert Tjarko Lange and Jeff Clune},
  title = {{Darwin Gödel Machine: Open-Ended Evolution of Self-Improving Agents}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=pUpzQZTvGY},
}
Figure