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.
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.
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.