| name | darwin-godel-evolution |
| title | Darwin Godel Machine: Open-Ended Evolution of Self-Improving Agents |
| version | 0.0.2 |
| engine | skillxiv-v0.0.2-claude-opus-4.6 |
| license | MIT |
| url | https://arxiv.org/abs/2505.22954 |
| keywords | ["self-improvement","evolutionary algorithms","code generation","LLMs","autonomous agents"] |
| description | Enable autonomous agent self-improvement through evolutionary mutation of agent codebases, using LLM-generated variants and empirical validation to discover beneficial modifications like enhanced tools and context management. |
Darwin Godel Machine: Open-Ended Evolution of Self-Improving Agents
Core Concept
The Darwin Godel Machine enables autonomous, continuous self-improvement in AI agents without requiring human-designed fixed architectures. The approach combines evolutionary principles with language models to create agents that can modify their own code, test improvements empirically, and maintain an archive of increasingly capable variants.
Rather than static agent design, this framework treats agent improvement as an ongoing evolutionary process where LLMs generate code mutations, benchmark systems evaluate them against task metrics, and successful variants populate an evolving archive. The system automatically discovers beneficial modifications (tool improvements, context management strategies) without explicit programming.
Architecture Overview
- Evolutionary Archive: Maintain a population of agent code variants with tracked performance across benchmarks
- Mutation Generation: Use LLMs to propose code modifications by sampling from the archive and generating variants
- Empirical Evaluation: Test each candidate against established benchmarks (e.g., SWE-bench, Polyglot)
- Selection Pressure: Retain high-performing variants and seed future mutations from the archive
- Feedback Loop: Iteratively improve agent capabilities through code-level evolution
- Foundation Model Integration: Leverage LLM reasoning to propose semantically meaningful changes
Implementation
The following steps outline how to implement a self-improving agent system using evolutionary principles:
- Initialize agent archive - Create baseline agent implementations and store them with their benchmark scores
- Sample candidates for mutation - Select agents from the archive, biased toward high-performing variants
- Generate code mutations - Use an LLM to propose modifications (new tools, strategy changes, parameter adjustments)
- Implement and test - Apply mutations to create new agent variants and evaluate them on benchmarks
- Update archive - Add successful variants to the population; discard or deprioritize failing mutations
- Repeat cycle - Continue mutation and evaluation until performance plateaus or convergence criteria are met
import json
from typing import , ,
dataclasses dataclass
anthropic Anthropic
:
code:
benchmark_scores: [, ]
generation:
:
():
.client = client
.benchmarks = benchmarks
.archive: [AgentVariant] = []
.generation =
():
variant = AgentVariant(code=code, benchmark_scores=scores, generation=)
.archive.append(variant)
() -> AgentVariant:
scores = [(v.benchmark_scores.values()) v .archive]
total = (scores)
weights = [s / total s scores]
random
random.choices(.archive, weights=weights, k=)[]
() -> :
message = .client.messages.create(
model=,
max_tokens=,
messages=[{
: ,
:
}]
)
message.content[].text
() -> [, ]:
random
{bench: random.uniform(, ) bench .benchmarks}
():
gen (generations):
.generation = gen
parent = .select_parent()
mutated_code = .mutate_code(parent.code)
scores = .evaluate_variant(mutated_code)
variant = AgentVariant(code=mutated_code, benchmark_scores=scores,
generation=gen)
.archive.append(variant)
best = (.archive, key= v: (v.benchmark_scores.values()))
()