astro-ph.COFeb 17, 2026

MadEvolve: Evolutionary Optimization of Cosmological Algorithms with Large Language Models

Authors: Tianyi Li, Shihui Zang, Moritz Münchmeyer

Organizations: Department of Physics, University of Wisconsin-Madison

Abstract

We develop a general framework to discover scientific algorithms and apply it to three problems in computational cosmology. Our code, MadEvolve, is similar to Google's AlphaEvolve, but places a stronger emphasis on free parameters and their optimization. Our code starts with a baseline human algorithm implementation, and then optimizes its performance metrics by making iterative changes to its code. As a further convenient feature, MadEvolve automatically generates a report that compares the input algorithm with the evolved algorithm, describes the algorithmic innovations and lists the free parameters and their function. Our code supports both auto-differentiable, gradient-based parameter optimization and gradient-free optimization methods. We apply MadEvolve to the reconstruction of cosmological initial conditions, 21cm foreground contamination reconstruction and effective baryonic physics in N-body simulations. In all cases, we find substantial improvements over the base algorithm. We make MadEvolve and our three tasks publicly available at madevolve.org.

Figures & tables

Explore similar work

CardsList
  1. Beyond AI as Assistants: Toward Autonomous Discovery in Cosmology

    May 14, 2026Licong Xu, Thomas BorrettMulti-Agent LLM SystemsAI Agents for Scientific Discovery

  2. MadEvolve: Evolutionary Optimization of Trading Systems with Large Language Models

    May 21, 2026Yurii Kvasiuk, Tianyi Li, Owen Colegrove +1Quantitative FinanceEvolutionary Optimization

  3. ImprovEvolve: Basin-Hopping Meets LLM-Guided Evolutionary Search

    Feb 10, 2026Alexey Kravatskiy, Valentin Khrulkov, Ivan OseledetsLarge Language Model-Guided Scientific DiscoveryEvolutionary Optimization