An Algorithm That Improves Itself ✎ express

Original: "MadEvolve: Evolutionary Optimization of Cosmological Algorithms with Large Language Models"
arXiv:2602.15951 · 2026-02-17 · arXiv non-exclusive · independent analysis · 2 min
Scientists have created a program that rewrites its own code and finds better solutions than the original.

📄 Showing the "Simple" version — "Popular" is not ready yet. Add it to favorites to help prioritize it.

A programmer writes code, runs it, sees an error, and fixes it. Now this process can be handed over to the program itself. Machine learning can already improve algorithms, but it usually requires lots of data and ready-made examples. The new tool MadEvolve works differently: it takes a working program and starts 'mutating' it — randomly changing lines of code, checking whether things got better, and keeping the successful changes. Step by step, this gives birth to an algorithm that handles the task noticeably better than the original.

A chef tries a new pinch of spices every evening and keeps only the versions the guests liked. A month later, his dish is unrecognizable.

The authors tested MadEvolve on three problems in cosmology. In the first, they had to reconstruct how matter was distributed in the early universe based on today's galaxy positions. In the second, they had to clean the signal from hydrogen at 21 cm from terrestrial interference. In the third, they had to calculate faster and more accurately how dark matter and gas interact in a computer model. In all cases, the improved code gave a more accurate result than the original.

The program writes its own report: it explains what exactly it changed and why that made things better. All that's left for a human is to read and verify.

MadEvolve doesn't just search for better parameters; it changes the very logic of the computation. It's as if a mechanic didn't just tweak the carburetor but rebuilt the engine, trying different parts. This approach opens the door to automatic discovery of scientific algorithms — not only in cosmology but also in other fields that require complex calculations.

The name MadEvolve references 'mad science.' But in reality, the program works methodically: it tries, compares, and keeps the best.

In Stanisław Lem's story 'The Fourteenth Voyage,' the hero encounters machines that improve themselves to such an extent that they no longer need their creators. MadEvolve is a modest step in the same direction.

Scientists
Isaac NewtonGalileo GalileiJohannes KeplerLeonhard EulerRobert H. Dicke
Concepts
genetic algorithm cosmological simulation Large Language Models automated analysis optimization problem ai drug discovery Monte Carlo methods evolution computational method cosmology quantum algorithm ai self correction 3d reconstruction optimization cosmological parameters expanding universe ai astrophysics illustristng regularisation xgboost