arXiv:2610.31326cs.NEOct 2026

Manuscript Offprint

arXiv:2610.31326

AgenticEvolve: Evolutionary Program Search with Persistent Language Model Agents that Design and Run Experiments

Ze-Yu Peng, Qing-Yu Lan, Zhan-He Wang, Jun Zhang, Yun-Song Piao

Ze-Yu Peng, Qing-Yu Lan, Zhan-He Wang, Jun Zhang, and Yun-Song Piao

Abstract—Evolutionary program search with large language models keeps the structure of an evolutionary algorithm and uses the model as its variation operator. Typically, the model generates each candidate program in a single request from parent programs and their scores. We present AgenticEvolve, an evolutionary program search framework in which each island is run by a persistent large language model agent. Between evaluations, the agent designs and runs experiments on the candidate program. To measure the contribution of experimentation, we compare AgenticEvolve with No-analysis, an otherwise identical configuration with experiments disabled. On two heuristic design tasks with three large language models, AgenticEvolve produces better programs than No-analysis and OpenEvolve on both hidden and unseen instances. It reaches the baselines' final quality with far fewer evaluations and comparable cost. On twelve equation discovery problems, it recovers the ground-truth structure of more equations than No-analysis and existing language-model and genetic programming baselines.

Index Terms—Program evolution, large language models, autonomous experimentation, heuristic design, symbolic regression.

I. INTRODUCTION

Genetic programming searches over programs with variation operators that recombine and mutate code without knowledge of what it computes [1]. Evolutionary program search with large language models (LLMs) retains the structure of the evolutionary algorithm and uses the model as its variation operator [2]. The search maintains a population of programs, prompts the model with one or more parents and their scores, and evaluates each returned program with an automated evaluator. FunSearch uses this approach to find new constructions in extremal combinatorics and a new online bin packing heuristic [3], and AlphaEvolve extends it to algorithm and systems optimization [4]. Evolution of Heuristics and LLaMEA apply it to heuristic and metaheuristic design [5], [6]. LLM-SR uses the same loop to discover scientific equations, represented as programs whose constants are fitted numerically [7].

In these LLM-based systems, however, the model has no execution tools available during candidate generation. It reasons from the parent programs, their scores, and any textual feedback supplied in the prompt, such as reflections on earlier evaluations. Empirical information about program behavior enters the search only through formal evaluation. Each formal evaluation consumes budget, and its instances are often hidden from the model.

Recent advances in LLM agents have enabled models to carry out multi-step tasks by interleaving reasoning with tool calls [8]. Coding agents use tools to edit files, run code, and inspect outputs iteratively to optimize program performance [9], [10]. Within evolutionary search, such an agent can experiment between formal evaluations: it can generate instances, measure program behavior, fit parameters and test changes locally before submitting a candidate. These experiments can support local improvement and surrogate evaluation, both of which have long been combined with global search in evolutionary computation [11], [12]. Recent work has also used persistent agents for program search [13] and ablated diagnostic or data-analysis tools in heuristic design and equation discovery [14], [15]. In this paper, we ask how much self-designed experiments improve program quality when the other evolutionary mechanisms remain fixed, what resources they require, and how their benefits and costs vary across tasks and models.

This work has been submitted to the IEEE for possible publication. Copyright may be transferred without notice, after which this version may no longer be accessible.

The work of J. Zhang was supported by the National Natural Science Foundation of China (NSFC) under Grant E414660101 and Grant 12547104, and by the Fundamental Research Funds for the Central Universities under Grant E4EQ6604X2 and Grant E3ER6601A2. The work of Y.-S. Piao was supported by the National Key Research and Development Program of China under Grant 2021YFC2203004 and by the NSFC under Grant 12475064.

Z.-Y. Peng, Q.-Y. Lan, Z.-H. Wang, and Y.-S. Piao are with the School of Physical Sciences, University of Chinese Academy of Sciences, Beijing 100049, China.

Z.-Y. Peng, J. Zhang, and Y.-S. Piao are with the International Centre for Theoretical Physics Asia-Pacific, University of Chinese Academy of Sciences, Beijing 100190, China.

Z.-Y. Peng and J. Zhang are with the Taiji Laboratory for Gravitational Wave Universe, University of Chinese Academy of Sciences, Beijing 100049, China.

Y.-S. Piao is with the School of Fundamental Physics and Mathematical Sciences, Hangzhou Institute for Advanced Study, University of Chinese Academy of Sciences, Hangzhou 310024, China, and with the Institute of Theoretical Physics, Chinese Academy of Sciences, Beijing 100190, China.

Corresponding author: Ze-Yu Peng (e-mail: pengzeyu23@mails.ucas.ac.cn).

This paper presents AgenticEvolve, an evolutionary program search framework in which each island is run by a persistent LLM agent. Throughout the search, the agent maintains a conversation in which it edits the candidate program, writes and executes custom analysis scripts between commits, and submits candidates for formal evaluation through a commit tool. Committed programs enter a MAP-Elites archive [16], and islands exchange elite programs through periodic migration. A No-analysis configuration removes the analysis tool and leaves everything else unchanged, which isolates the contribution of the agent's experiments. We evaluate this contribution across two regimes: heuristic design on online bin packing and dynamic job shop scheduling, where formal evaluation instances are hidden and the agent must generate its own test instances, and scientific equation discovery on twelve problems from LLM-SRBench [17], where training data are available for direct analysis.

The paper makes three contributions:

• An evolutionary program search framework in which persistent LLM agents conduct island-based search and run self-designed experiments between formal evaluations, paired with a matched No-analysis configuration that isolates the effect of experimentation.

• An empirical evaluation on two heuristic design tasks across three LLMs against No-analysis and OpenEvolve [18]. AgenticEvolve achieves the best mean final quality on both hidden evaluation instances and unseen test instances with every model, reaching the baselines' final quality with a fraction of their formal evaluations, while its cost advantage depends on the model and budget.

  • A cross-task evaluation on scientific equation discovery against No-analysis, LLM-SR [7], SR-Scientist [15], and PySR [19]. Under common criteria for structure recovery, AgenticEvolve recovers more ground-truth equations than all baselines at a cost comparable to that of SR-Scientist. A case study illustrates how experiments help construct expressions and determine difficult constants.

The source code is available at https://github.com/pengzy-cosmo/AgenticEvolve.

References (31)