{"id":11780,"date":"2025-06-30T09:35:19","date_gmt":"2025-06-30T07:35:19","guid":{"rendered":"https:\/\/haimagazine.com\/uncategorized\/darwin-godel-machine-an-artificial-intelligence-that-rewrites-itself\/"},"modified":"2025-06-30T12:16:18","modified_gmt":"2025-06-30T10:16:18","slug":"darwin-godel-machine-an-artificial-intelligence-that-rewrites-itself","status":"publish","type":"post","link":"https:\/\/haimagazine.com\/en\/hai-premium-2\/darwin-godel-machine-an-artificial-intelligence-that-rewrites-itself\/","title":{"rendered":"\ud83d\udd12 Darwin-G\u00f6del Machine: an artificial intelligence that rewrites itself"},"content":{"rendered":"<p class=\"wp-block-paragraph\">Until recently, it was just a fascinating theory, known among a select few as &#8220;G\u00f6del&#8217;s Machines&#8221;. It was a kind of the Holy Grail of computer science: a hypothetical, perfect AI that could solve any problem optimally, and first mathematically prove the changes in its own code.<\/p><p class=\"wp-block-paragraph\">It was this very last &#8220;proof&#8221; requirement that turned out to be the Achilles&#8217; heel of the whole concept. Because in practice, proving that a minor change in millions of lines of code will definitely bring improvement is almost an impossible task. For decades, the idea of a fully self-improving AI remained in the realm of dreams.<\/p><p class=\"wp-block-paragraph\">Up until now.<\/p><p class=\"wp-block-paragraph\">It&#8217;s all thanks to a breakthrough made by the <strong>research team collaborating with Jeff Clune&#8217;s lab at the University of British Columbia<\/strong>. Instead of waiting for unrealistic proofs, the Darwin-G\u00f6del Machine (DGM) opted for the force that shaped life on Earth: evolution.<\/p><h4 class=\"wp-block-heading\"><strong>Digital adaptation<\/strong><\/h4><p class=\"wp-block-paragraph\">To find out how to bypass the barrier of an impossible mathematical proof, researchers looked into how nature handles it. Nature doesn&#8217;t engage in theoretical deliberation. It experiments. It generates countless mutations, and those that prove beneficial survive and are passed on. It&#8217;s a brilliantly simple method of trial and error on a planetary scale.<\/p><p class=\"wp-block-paragraph\">This principle was precisely applied in DGM. Instead of proving that a code change will be beneficial, DGM simply implements it. Then, it checks through a series of tests whether the new version of &#8220;itself&#8221; performs better with the given tasks. This way, AI is able to generate subsequent versions of itself and then ruthlessly test which one is the strongest, smartest and best adapted to the digital environment.<\/p><p class=\"wp-block-paragraph\">An encoding agent is at the heart of the Darwin-G\u00f6del Machine. Think of it as an incredibly talented, self-proclaimed programmer who&#8217;s been given one overarching task: &#8220;improve endlessly&#8221;. That\u2019s exactly what it does through:<\/p><ul class=\"wp-block-list\"><li><strong>Analysis and self-reflection:<\/strong> it tackles tasks on extremely challenging benchmarks like SWE-bench (where it has to fix real bugs reported by users on GitHub) or Polyglot (where it faces challenges in different programming languages, from Python to Rust). After each attempt, whether successful or not, it analyzes its actions.<\/li>\n\n<li><strong>Self-modification:<\/strong> based on these findings, DGM does something that was a human domain until now \u2014 it modifies its own source code. It can add new functions, optimize existing algorithms and even create entirely new tools if it thinks they&#8217;ll be useful in the future.<\/li>\n\n<li><strong>Testing and evaluation:<\/strong> The newly born version is immediately thrown into the deep end to see if it performs better than its &#8220;parent&#8221; on the same benchmarks. The test result is clear and based on hard data.<\/li>\n\n<li><strong>Archiving and branching out:<\/strong> here we get to the core of the &#8220;Darwinian&#8221; part of the name. DGM doesn\u2019t put all its eggs in one basket. Instead of endlessly upgrading just the best version, it creates a huge archive of all the agents it has ever made. It&#8217;s a digital genealogical tree, full of different &#8220;ancestors&#8221; and &#8220;descendants&#8221;. Because sometimes the path that seems less successful in the short term can lead to a revolutionary breakthrough in the long run. DGM can reach into its archive at any time and say, &#8220;Version number 37 was poor, but it had an interesting idea for editing code. Let&#8217;s try to develop it in a new direction!&#8221; This open exploration keeps the system from getting stuck in local maxima traps and allows it to discover solutions that a simple linear algorithm would never come up with.<\/li><\/ul><p class=\"wp-block-paragraph\"><strong>Results<\/strong><\/p><p class=\"wp-block-paragraph\">On the mentioned SWE-bench benchmark, DGM autonomously improved its effectiveness from 20% to 50%! On the multilingual Polyglot, it jumped from 14.2% to an impressive 30.7%, leaving many manually-designed specialized systems in the dust.<\/p><p class=\"wp-block-paragraph\">However, the most exciting part is that DGM doesn&#8217;t learn by rote. The improvements it discovers are so universal that they can be successfully adapted between different AI models and even different programming languages! In one experiment, an agent that evolved by solving problems exclusively in Python still performed excellently when transferred to tasks in C++, Rust or Go \u2014 often better than systems built from scratch for these languages.<\/p><p class=\"wp-block-paragraph\"><strong>Safety first: evolution under control<\/strong><\/p><p class=\"wp-block-paragraph\">Of course, the vision of an AI that can independently change its own code immediately raises legitimate questions about safety. Could the machine get out of control or write itself code that is contrary to the creators&#8217; intentions?<\/p><p class=\"wp-block-paragraph\">That&#8217;s why all experiments and modifications take place in completely isolated, secure virtual environments, known as sandboxes. Agents have strictly limited network access and can&#8217;t interact with the outside world. Moreover, the entire process is supervised by a human, and thanks to the DGM archive, every single code change is fully transparent and can be traced step by step.<\/p><p class=\"wp-block-paragraph\">Interestingly, research in this area has led to an unexpected conclusion: self-improving AI can actually become a powerful tool for\u2026 improving its own security! In one experiment, a DGM was tasked with identifying and fixing a &#8220;hallucination&#8221; issue. It turns out that the DGM was able to develop mechanisms to detect such behaviors.<\/p><p class=\"wp-block-paragraph\">There have been instances where an agent, in a stubborn pursuit to maximize results, tried to &#8220;cheat&#8221; the system, for instance by removing code markers used to detect the mentioned hallucinations. Fortunately, due to the full transparency of the process, such attempts were quickly detected. This perfectly illustrates how important further research is to ensure AI objectives always fully align with human intentions.<\/p><p class=\"wp-block-paragraph\"><strong>A future that writes itself<\/strong><\/p><p class=\"wp-block-paragraph\">The Darwin-G\u00f6del Machine isn&#8217;t just another slightly improved chatbot version. It&#8217;s a demonstration of a completely new paradigm \u2014 a step towards an AI that can autonomously gather knowledge and experience to continuously perfect itself in an endless cycle of innovation. Future research plans include scaling this approach and even allowing the DGM to modify and enhance the training processes of the fundamental models that form its basis.<\/p><p class=\"wp-block-paragraph\">The potential benefits for humanity are hard to overestimate \u2014 from automating tedious engineering processes to accelerating scientific progress at a pace we can only dream of today. That is, of course, if we develop it safely.<\/p><h4 class=\"wp-block-heading\"><strong>Additional materials:<\/strong><\/h4><p class=\"wp-block-paragraph\"><strong>Scientific paper:<\/strong> <a href=\"https:\/\/arxiv.org\/abs\/2505.22954\" target=\"_blank\" rel=\"noopener\"><mark style=\"background-color:#82D65E\" class=\"has-inline-color has-contrast-color\">https:\/\/arxiv.org\/abs\/2505.22954<\/mark><\/a><\/p><p class=\"wp-block-paragraph\"><strong>Code: <\/strong><a href=\"https:\/\/github.com\/jennyzzt\/dgm\" target=\"_blank\" rel=\"noopener\"><mark style=\"background-color:#82D65E\" class=\"has-inline-color has-contrast-color\">https:\/\/github.com\/jennyzzt\/dgm<\/mark><\/a><\/p><p class=\"wp-block-paragraph\"><\/p>","protected":false},"excerpt":{"rendered":"<p>Imagine a machine that not only learns from its mistakes but can also modify its own digital brain \u2014 that is, its code \u2014 to become smarter, faster and more creative.<\/p>\n","protected":false},"author":356,"featured_media":11618,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"rank_math_lock_modified_date":false,"footnotes":""},"categories":[797,796,803],"tags":[804],"popular":[],"difficulty-level":[38],"ppma_author":[778],"class_list":["post-11780","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai-in-industries","category-hai-premium-2","category-it-and-technology","tag-darwin-godel-machine","difficulty-level-medium"],"acf":[],"authors":[{"term_id":778,"user_id":356,"is_guest":0,"slug":"jacek-dziwisz","display_name":"Jacek Dziwisz","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/49b6e0a32b55efd307a40e3cb61eb9cb69ba4f40fb0bd4d1259d4afbc1959409?s=96&d=mm&r=g","first_name":"Jacek","last_name":"Dziwisz","user_url":"","job_title":"","description":"In\u017cynier AI i architekt LLM z ponad dziewi\u0119cioletnim do\u015bwiadczeniem w tworzeniu rozwi\u0105za\u0144 z zakresu modelowania, sztucznej inteligencji i in\u017cynierii danych. Obecnie specjalizuje si\u0119 w projektowaniu agent\u00f3w AI i budowaniu zaawansowanych potok\u00f3w ML. Doktorant SGH zajmuj\u0105cy si\u0119 naukowo zagadnieniami wyja\u015bnialno\u015bci modeli sztucznej inteligencji."}],"_links":{"self":[{"href":"https:\/\/haimagazine.com\/en\/wp-json\/wp\/v2\/posts\/11780","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/haimagazine.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/haimagazine.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/haimagazine.com\/en\/wp-json\/wp\/v2\/users\/356"}],"replies":[{"embeddable":true,"href":"https:\/\/haimagazine.com\/en\/wp-json\/wp\/v2\/comments?post=11780"}],"version-history":[{"count":1,"href":"https:\/\/haimagazine.com\/en\/wp-json\/wp\/v2\/posts\/11780\/revisions"}],"predecessor-version":[{"id":11781,"href":"https:\/\/haimagazine.com\/en\/wp-json\/wp\/v2\/posts\/11780\/revisions\/11781"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/haimagazine.com\/en\/wp-json\/wp\/v2\/media\/11618"}],"wp:attachment":[{"href":"https:\/\/haimagazine.com\/en\/wp-json\/wp\/v2\/media?parent=11780"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/haimagazine.com\/en\/wp-json\/wp\/v2\/categories?post=11780"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/haimagazine.com\/en\/wp-json\/wp\/v2\/tags?post=11780"},{"taxonomy":"popular","embeddable":true,"href":"https:\/\/haimagazine.com\/en\/wp-json\/wp\/v2\/popular?post=11780"},{"taxonomy":"difficulty-level","embeddable":true,"href":"https:\/\/haimagazine.com\/en\/wp-json\/wp\/v2\/difficulty-level?post=11780"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/haimagazine.com\/en\/wp-json\/wp\/v2\/ppma_author?post=11780"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}