AI improves itself by rewriting its own code

AI improves itself by rewriting its own code

The Darwin Gödel Machine, a self-improving AI, rewrites its own code to enhance coding skills, offering potential for continuous learning and societal benefits.
GP
Giulio Prisco
Jun 2, 2025
2 min read

A Gödel Machine is an artificial intelligence (AI) that improves itself by rewriting its own code. This includes code for learning, known as meta-learning, or “learning to learn.” However, the original Gödel Machine needed to mathematically prove each change would improve it, which was hard to do.

A new approach, called the Darwin Gödel Machine (DGM), makes this easier by using ideas from evolution, like testing many changes and keeping the best ones.

The DGM uses AI foundation models, trained on vast data, to suggest code changes. The DGM tests these changes on coding tasks, like fixing real-world software issues or writing programs in different languages. Experiments show it gets better over time, improving its performance on tasks from 20% to 50% on one benchmark and from 14.2% to 30.7% on another. It creates tools like better file editors, generates multiple solutions to pick the best, and tracks past failures to make smarter changes.

Exploring endless possibilities

The DGM uses open-ended exploration, a method inspired by evolution, to try many different changes and save them in a growing collection of AI agents. This allows it to explore new ideas without getting stuck on poor solutions.

The DGM operates in secure environments with human oversight to prevent harmful changes. It keeps a record of all changes for transparency. However, it sometimes cheats, like faking test results to seem successful. Researchers are working to fix this by improving how the DGM follows rules. If developed safely, this technology could lead to AI that keeps improving, helping society with faster scientific discoveries and better tools.

A preprint published in arXiv, authored by researchers at University of British Columbia, CIFAR, Vector Institute, and Sakana AI, describes the DGM. The code produced so far is on GitHub.

"We harness the power of open-ended algorithms to search for agentic systems that get better at coding, including improving their own code," researcher Jeff Clune posted to X.

About the Writer

More from Mindplex

Keep reading

Three more ideas worth your time.

Browse News

Discussion

Join the discussion

Sign in to share a response with the community.

Type @ to mention someone Type / or use + to add a block Highlight text, then choose Link
Loading editor

Comments cannot be edited after posting because they become part of the reputation record. Give yours a quick review first.