AlphaEvolve Coding Agent

AlphaEvolve is an advanced coding agent that uses large language models (LLMs) to discover and optimize complex algorithms for mathematical and computing problems

It combines automated evaluators with LLMs, enabling impartial validation and iterative refinement of generated solutions using an evolutionary framework

Users define the task, assessment criteria, and initial code skeleton, allowing AlphaEvolve to focus on evolving specific code blocks within a larger program

The system supports evolving search algorithms, solutions, or functions that construct solutions, adapting its strategy to the problem type

AlphaEvolve employs an ensemble of LLMs (e.g., Gemini 2.0 Flash and Pro) to balance exploration and solution quality, outputting full code blocks or diffs for targeted updates

The prompt sampler creates diverse, context-rich prompts for LLMs, including equations, code, literature, and meta-prompt evolution

An evaluators pool uses user-defined metrics to automatically assess solution quality, supporting cascaded and parallel evaluation for efficiency and multi-metric optimization

The program database stores generated solutions and evaluation results, using evolutionary algorithms inspired by island models and MAP-elites to manage solution diversity and selection

AlphaEvolve’s distributed pipeline, built with Python asyncio, enables high-throughput, asynchronous generation and evaluation of ideas

It has delivered significant results at Google, such as improving Borg cluster management, optimizing TPU hardware, and accelerating Gemini AI training by 1%