How to Use Google AlphaEvolve: 12 Steps, 90 Min [2026]

Google’s evolutionary coding agent stopped being a research curiosity this year. AlphaEvolve went generally available to every Google Cloud customer on July 9, 2026, and the search volume around it has climbed fast since. If you write algorithms for a living and you’ve been putting off learning this tool, this is the walkthrough that gets you from zero to a working optimization run, using the actual product surface as it exists on Google Cloud today.

This tutorial covers what AlphaEvolve actually is, how its evolutionary loop works under the hood, and the exact steps to set up a project, write a seed program and evaluator, run the official codelabs, and deploy a compiled-code experiment on Cloud Run. We’ll also look at real case studies, pricing tiers, common setup mistakes, and a troubleshooting list built from the errors people actually hit. By the end you’ll have run at least one optimization experiment yourself.

Google · Preferred Sources

Don't miss new tech stories on Google

Add Tech Insider once in the Google app and our stories appear in your news suggestions.

Add Now

What Is Google AlphaEvolve, and Why It’s Suddenly Everywhere

AlphaEvolve is Google DeepMind’s evolutionary coding agent. Google DeepMind first unveiled it on May 14, 2025, describing it plainly in its own announcement: “Today, we’re announcing AlphaEvolve, an evolutionary coding agent powered by large language models for general-purpose algorithm discovery and optimization” (Google DeepMind, AI research lab).

The idea is simple to state and hard to build. You hand AlphaEvolve a working piece of code, called a seed program, and a scoring function that tells it how good a candidate solution is. It then generates mutated variants of that code using Gemini models, tests each one, keeps the winners, and repeats. Google DeepMind put it this way: “AlphaEvolve pairs the creative problem-solving capabilities of our Gemini models with automated evaluators that verify answers, and uses an evolutionary framework to improve upon the most promising ideas” (Google DeepMind, AI research lab).

What changed in 2026 is access. AlphaEvolve actually started narrower than most people realize: Google Cloud opened it as an academic Early Access program back in May 2025, limited to a small set of selected researchers, before it moved into a broader enterprise private preview starting December 9, 2025. Then, on July 9, 2026, Google Cloud made it generally available to every Google Cloud customer through the Gemini Enterprise Agent Platform, a rollout date echoed in Japanese-language coverage reporting GA landing July 10, 2026 local time, and reaffirmed in a follow-up Google Cloud blog post on July 21, 2026 that walked through AlphaEvolve as a Gemini-based code optimization and discovery agent. Developer docs for AlphaEvolve show an overview page dated August 26, 2026, and last updated August 28, 2026, which tells you this is a fast-moving product with documentation still being refined this week. If you’re comparing this to earlier Gemini releases you may have covered, an August 2026 Google AI roundup of July’s launches lists AlphaEvolve right alongside Gemini 3.6 Flash and Gemini 3.5 Flash-Lite as one of the month’s headline agent tools, including the ones detailed in our Gemini 3.6 Flash API tutorial, but AlphaEvolve itself is a distinct product built on top of those models rather than a model release in its own right.

Google Cloud frames the developer experience directly: “Rather than rewriting code from scratch, AlphaEvolve acts as an evolutionary collaborator: you provide a baseline algorithm and your goals, and it automatically searches for better solutions, returning human-readable, optimized code” (Google Cloud Blog). That last part matters. The output isn’t a black box. You get code you can read, review, and ship.

Inside the AlphaEvolve Evolutionary Coding Loop

Before touching a terminal, it helps to understand the four pieces that make this system tick. Every AlphaEvolve run is really a loop with four stages, which Google Cloud’s own documentation labels Define, Measure, Optimize, and Apply.

The Seed Program and the Evaluator

Two inputs drive the whole process. Google Cloud’s documentation describes them directly: “Define: Provide a baseline seed algorithm and problem definition, together with background knowledge that provides context about the problem you want to solve” (Google Cloud). The seed is a piece of compile-ready code with specific sections marked for evolution. The evaluator is a deterministic script you write yourself, one that compiles, runs, and scores each mutated candidate on metrics you define, whether that’s runtime, memory footprint, or a domain-specific correctness check.

Once you have both, Google Cloud describes the next stage plainly: “Optimize: Use AlphaEvolve’s agentic harness to generate optimized code, explicitly optimized against the metrics in the scoring function established in the measure step” (Google Cloud). The harness handles the generate-evaluate-select cycle automatically. You don’t write the mutation logic yourself.

Why Gemini Flash and Gemini Pro Split the Work

AlphaEvolve doesn’t rely on a single model for every mutation. It uses a two-model ensemble. Gemini Flash handles breadth, cranking out a wide range of candidate mutations quickly and cheaply. Gemini Pro handles depth, reasoning more carefully about specific bottlenecks once the population has narrowed. As of the July 9, 2026 GA release, the AlphaEvolve API reference lists gemini-3.5-flash as the default model for candidate generation, with the option to route deeper reasoning passes to a Pro-tier model when a run plateaus.

Practically, this means early generations in a run explore widely and cheaply, while later generations spend more compute refining a shortlist of promising candidates. If you’ve used other agent frameworks, this two-speed approach is closer to how our OpenAI Responses API tutorial describes multi-step tool orchestration than it is to a single prompt-and-response coding assistant.

AlphaEvolve vs Traditional AI Coding Assistants

It’s worth being clear about what AlphaEvolve is not. It isn’t autocomplete, and it isn’t a chat window where you paste code and ask for a refactor. The table below lays out the practical differences developers run into.

DimensionStandard AI coding assistantAlphaEvolve
Interaction styleSingle-turn or short chat, human reviews each suggestionAutonomous loop, hundreds of candidates evaluated without human review
Output basisPredicts likely-good code from training patternsEmpirically scores every candidate against your evaluator
Best forBoilerplate, refactors, everyday feature codeNarrow algorithmic bottlenecks with a measurable metric
Setup effortLow, install extension and goHigher, requires a seed program plus a working evaluator script
Model(s) usedUsually one model per requestDual ensemble, Gemini Flash for breadth and Gemini Pro for depth
Typical runtimeSeconds per suggestionMinutes to hours per full evolutionary run

Because AlphaEvolve needs a scoring function, it isn’t a fit for tasks where “correctness” is fuzzy, like UI copy or general feature work. It shines on problems with a hard number to chase: fewer CPU cycles, lower memory, a better approximation ratio. If your work leans more toward comparing chatbot output quality than optimizing kernels, tools like the ones covered in our Claude Opus 5 vs Gemini 3.1 Pro comparison are the more relevant category.

Prerequisites and Exact Versions You Need

Get these in place before you start. Skipping any of them is the fastest way to burn an afternoon on setup errors instead of actual optimization work.

RequirementMinimum version / tierNotes
Google Cloud accountActive billing accountAlphaEvolve is GA for all Google Cloud customers as of July 9, 2026
Gemini Enterprise accessEnabled on your Cloud projectAlphaEvolve runs as an agent inside Gemini Enterprise Agent Platform
gcloud CLILatest stable releaseUsed to authenticate and enable required APIs
Python3.11 or newerSeed programs and evaluators in the official codelabs use Python
Local computeStandard laptop, no GPU requiredCodelab experiments run local evaluation; only candidate generation calls the cloud API
IDE (optional)Antigravity or Claude Code with AlphaEvolve Skill installedNeeded only for the agentic in-IDE workflow, not the codelabs

Note the compute line. One detail that trips people up is assuming they need a GPU cluster to run AlphaEvolve. They don’t. The two hands-on codelabs Google publishes, circle packing and the Travelling Salesman Problem, both run candidate evaluation locally on your own machine. The only cloud usage is the AlphaEvolve API call that generates each round of candidates.

Step 1-6: Setting Up Your Google Cloud Project

Follow these six steps in order. Each one builds on the last, so don’t skip ahead even if a step looks optional.

  1. Create or select a Google Cloud project dedicated to AlphaEvolve experiments, so billing and quota stay isolated from other workloads.
  2. Install or update the gcloud CLI, then authenticate with gcloud auth login.
  3. Enable the Gemini Enterprise Agent Platform API and the AlphaEvolve API on your project.
  4. Set your default project and region so subsequent commands don’t need repeated flags.
  5. Clone the official reference repository so you have working seed programs and evaluators to start from instead of writing everything blind.
  6. Verify access by listing available AlphaEvolve agent endpoints on your project.
# Step 2-4: authenticate, enable APIs, set defaults
gcloud auth login
gcloud config set project YOUR_PROJECT_ID
gcloud services enable geminienterprise.googleapis.com
gcloud services enable alphaevolve.googleapis.com
gcloud config set run/region us-central1

# Step 5: clone the reference examples
git clone https://github.com/Google-Cloud-AI/alphaevolve-on-googlecloud.git
cd alphaevolve-on-googlecloud

The Google-Cloud-AI/alphaevolve-on-googlecloud GitHub repository is the one referenced throughout Google’s own codelabs, and it ships with AlphaEvolve Skills for coding assistants plus example experiments covering combinatorial optimization, multi-objective signal processing, and LLM fine-tuning. Pull it down before you write a single line of your own seed code.

Step 7-9: Running the Circle Packing Codelab

The first hands-on experiment Google walks developers through is circle packing, a classic geometric optimization problem: fit as many non-overlapping circles as possible into a bounded space while maximizing total coverage. It’s small enough to run on a laptop and visual enough that you can eyeball whether AlphaEvolve is actually improving your solution.

  1. Open the circle packing example from the cloned repository and read through the seed program to see which sections are marked for evolution.
  2. Write or confirm the evaluator, which scores each candidate on total area covered while penalizing any overlap.
  3. Launch the run and watch generations improve the packing density over successive iterations.
# Step 7: inspect the seed program structure
cat circle_packing/seed_program.py

# EVOLVE-BLOCK-START
def pack_circles(n, radius_bounds):
    # naive greedy placement -- AlphaEvolve will mutate this block
    positions = []
    for i in range(n):
        positions.append(greedy_place(positions, radius_bounds))
    return positions
# EVOLVE-BLOCK-END

# Step 9: run the experiment against the local evaluator
python run_alphaevolve.py \
  --seed circle_packing/seed_program.py \
  --evaluator circle_packing/evaluator.py \
  --generations 40 \
  --population-size 16

The EVOLVE-BLOCK-START and EVOLVE-BLOCK-END markers matter. They tell AlphaEvolve exactly which lines it’s allowed to rewrite, leaving the rest of your file untouched. This convention shows up across every seed program in the codelab, including OpenEvolve, the open-source reimplementation of the same approach hosted on Hugging Face.

Expect the run to take somewhere between 15 and 40 minutes on a standard laptop for 40 generations, depending on evaluator complexity. Watch the console output. Each generation prints the best score so far, and you should see it climb, plateau briefly, then climb again as Gemini Pro kicks in to refine a stuck lineage.

Step 10-12: Running the Travelling Salesman Problem Experiment

The second official codelab moves from geometry to combinatorics: the Travelling Salesman Problem, where the goal is finding the shortest route that visits every city exactly once. It’s a well-studied NP-hard problem, which makes it a good stress test for whether AlphaEvolve’s evolutionary search can actually beat a hand-written heuristic.

  1. Load the TSP seed program, which starts from a standard nearest-neighbor heuristic.
  2. Configure the evaluator to score candidate tours by total distance across a fixed benchmark set of city coordinates.
  3. Run the experiment and compare the final tour length against the nearest-neighbor baseline.
# Step 12: run the TSP experiment and log improvement over baseline
python run_alphaevolve.py \
  --seed tsp/seed_program.py \
  --evaluator tsp/evaluator.py \
  --generations 60 \
  --population-size 24 \
  --log-baseline nearest_neighbor

# sample console output near the end of a run
# [gen 52] best_score=7421.3 (baseline=9884.6, -24.9%)
# [gen 58] best_score=7290.1 (baseline=9884.6, -26.2%)
# [gen 60] converged, no improvement in last 6 generations

A 24 to 26 percent reduction in tour length over a naive baseline in roughly 60 generations is a realistic outcome for a small benchmark set, not a guaranteed result on every dataset. Larger city counts need more generations and a bigger population to converge on comparably strong tours.

Using AlphaEvolve Skills Inside Antigravity and Claude Code

Once you’re comfortable running standalone experiments, the more common day-to-day workflow is invoking AlphaEvolve from inside a coding assistant rather than from a bare CLI. Google packages this as an AlphaEvolve Skill that plugs into IDEs including Antigravity and Claude Code.

Installing the Skill

The skill ships in the same reference repository you cloned earlier. Installing it registers a set of prompts and tool calls your coding assistant can invoke without you writing raw CLI commands each time.

# install the AlphaEvolve skill for your coding assistant
cd alphaevolve-on-googlecloud/skills
./install.sh --target antigravity
# or, for Claude Code:
./install.sh --target claude-code

Prompting the Coding Assistant

With the skill installed, you don’t manually write config files for routine jobs. You describe the goal in plain language, point at the file you want optimized, and the assistant handles configuration and kicks off the evaluation loop underneath. Google’s own developer guide describes exactly this framing: prompt the coding assistant to optimize your code with AlphaEvolve, and it walks you through configuration and runs the evaluation loop on your behalf.

This matters for teams that already have an established assistant-driven workflow. Instead of context-switching to a separate optimization tool, AlphaEvolve becomes one more capability inside the same chat interface developers already use for day-to-day coding, similar in spirit to how agent platforms get wired into existing developer tooling in our OpenAI Responses API tutorial.

Deploying AlphaEvolve on Cloud Run for Compiled Code Evolution

The two codelabs above run entirely on local evaluation. But Google also publishes a third pattern for evolving compiled code, where the candidate binary itself needs to run in a controlled cloud environment rather than on your laptop. This is the setup for optimizing things like compiled kernels or infrastructure code that depends on cloud-specific resources.

  1. Containerize your evaluator so it can compile and run candidate binaries in an isolated environment.
  2. Deploy that container to Cloud Run, which gives you an on-demand, sandboxed execution target for every candidate.
  3. Point your AlphaEvolve run configuration at the Cloud Run endpoint instead of a local evaluator path.
# build and deploy the evaluator container to Cloud Run
gcloud builds submit --tag gcr.io/YOUR_PROJECT_ID/ae-evaluator .
gcloud run deploy ae-evaluator \
  --image gcr.io/YOUR_PROJECT_ID/ae-evaluator \
  --region us-central1 \
  --no-allow-unauthenticated \
  --memory 2Gi

# run pointed at the deployed evaluator endpoint
python run_alphaevolve.py \
  --seed compiled_kernel/seed_program.c \
  --evaluator-endpoint https://ae-evaluator-abc123-uc.a.run.app \
  --generations 30

This is the pattern to reach for once a project outgrows local testing, and it’s the same shape of workflow Google documents in its Cloud Run compiled-code codelab. It costs more per run than local evaluation since you’re paying for Cloud Run compute on every candidate, so reserve it for problems where compilation genuinely requires the cloud environment.

Real Case Studies: From Matrix Multiplication to TPU Kernels

AlphaEvolve isn’t a demo toy. It has a track record of production use, some of it dating back to DeepMind’s original matrix multiplication algorithm discoveries that predate the Google Cloud product. Across a broad benchmark of open algorithmic problems, AlphaEvolve rediscovered state-of-the-art solutions roughly 75 percent of the time and improved on the previously best-known solution in about 20 percent of cases, making genuine progress on open problems rather than just matching existing work. That progress has since translated into real adoption: by July 2026, Google counted more than 13 industrial partners citing AlphaEvolve use cases, including Klarna, FM Logistic, Schrödinger, and BASF alongside JetBrains, spanning fintech, logistics, drug discovery, and chemicals.

Application areaWhat was optimizedReported outcome
Matrix multiplication algorithmsCore linear algebra kernelsNew algorithmic variants building on DeepMind’s earlier discovery work
Data center schedulingResource allocation logicApplied to production-level infrastructure scheduling problems
TPU GEMM kernel tilingLow-level hardware kernel configurationUsed to tune tiling strategy for matrix kernels on TPU hardware
Compiler IR optimizationIntermediate representation transformsApplied within compiler toolchains to improve generated code
IDE algorithm performance (JetBrains)Complex algorithms inside IDE toolingJetBrains reports using AlphaEvolve to make IDE algorithms faster, per its own June 2026 engineering blog

The JetBrains case is a useful signal for anyone still skeptical about production readiness. In its own words, the company’s engineering blog documents how it uses AlphaEvolve to make complex IDE algorithms faster, a case of a major software vendor adopting the tool for shipping production code, not just research benchmarks.

If you want the deeper technical background on how the evolutionary search itself is structured, the original Wikipedia entry on AlphaEvolve is a reasonably well-sourced summary of the research lineage, tracing back through DeepMind’s earlier FunSearch project. That lineage is still producing genuine mathematical firsts: a May 2026 impact update credits AlphaEvolve with breaking Strassen’s 56-year-old record for 4×4 complex matrix multiplication, a result that went well beyond incremental tuning of existing kernels.

Worth noting: these outcomes cluster around problems with a clean, quantifiable objective. Matrix multiplication has a hard operation count. A compiler pass has a measurable instruction count reduction. TPU kernel tiling has a clock-cycle target. Even a pure-mathematics problem can qualify if it reduces to a countable target, as shown by that same May 2026 update, where AlphaEvolve also contributed to a new record in the 11-dimensional kissing problem, helping establish a configuration of 593 spheres. AlphaEvolve’s track record doesn’t tell you much about how it performs on fuzzier engineering problems where success isn’t a single number, and Google’s own materials don’t claim otherwise. Match the tool to problems that already have a scoring function, or that you can build one for without heroics.

Where AlphaEvolve Still Falls Short

No optimization tool is magic, and AlphaEvolve has real limits worth knowing before you build a roadmap around it. Runs can be slow. A complex evaluator with heavy compilation steps can turn a 50-generation run into an overnight job rather than a coffee-break task, and that changes how you plan iteration cycles on a live project.

Cost also scales with how many candidates you generate per round. A wide population explores more of the solution space but multiplies API calls to Gemini and, if you’re on Cloud Run, multiplies billable evaluation time too. Teams that don’t budget for this upfront sometimes get surprised by a bill that looks nothing like a typical chat-based coding assistant subscription.

There’s also a ceiling on problem framing. AlphaEvolve mutates code within the structure you give it. It won’t independently decide your whole architecture is wrong and propose a different approach outside the bounds of the seed program and evaluator you wrote. That’s by design, since an unconstrained search would be far harder to trust in production, but it means the quality of your results still depends heavily on how well you frame the problem before you hit run.

How AlphaEvolve Compares to FunSearch and Other Evolutionary Search Tools

AlphaEvolve didn’t appear out of nowhere. It builds directly on FunSearch, an earlier DeepMind system that paired large language models with evolutionary search to discover new mathematical constructions. FunSearch worked on single functions. It could improve one isolated piece of code, score it, and iterate, but it couldn’t reason across an entire codebase or handle multiple interacting components at once.

AlphaEvolve extends that same core idea to full codebase evolution. Instead of one function in isolation, it can evolve multiple files, coordinate changes across interacting components, and track dependencies between the pieces it’s mutating. That’s the practical reason AlphaEvolve found its way into production systems at companies like JetBrains, while FunSearch mostly stayed a research demonstration. The jump from single-function search to whole-codebase search is what turned an academic proof of concept into something teams actually deploy.

Outside Google’s own lineage, the closest comparison point is OpenEvolve, the open-source project hosted on Hugging Face that reimplements AlphaEvolve’s evolutionary loop without requiring a Google Cloud account. OpenEvolve uses the same EVOLVE-BLOCK convention for marking mutable sections of a seed program, which means seed programs written for one system are often portable to the other with minor adjustments. The tradeoff is access to Gemini’s specific model ensemble. OpenEvolve lets you plug in whichever LLM backend you prefer, while AlphaEvolve on Google Cloud is tied to the Gemini Flash and Gemini Pro combination baked into the Gemini Enterprise Agent Platform.

For teams weighing the two, the decision usually comes down to infrastructure. If your organization already runs on Google Cloud and wants a managed, supported product with an SLA behind it, AlphaEvolve is the straightforward choice. If you need to run entirely on-premises, or you want to swap in a different model provider for cost or compliance reasons, OpenEvolve is worth a serious look before committing engineering time to either path.

Security and Governance Considerations for Production Use

Before you point AlphaEvolve at anything customer-facing, think through a few governance questions that don’t come up when you’re just running the circle packing codelab for fun. First, who reviews the final candidate before it merges? Google’s documentation is clear that AlphaEvolve returns human-readable code, but readable doesn’t mean automatically safe to ship. Treat every winning candidate the same way you’d treat a pull request from a contractor you’ve never worked with before: read the diff line by line.

Second, watch what data your evaluator touches. If your scoring function runs against production data samples to measure real-world performance, that data is now flowing through your evaluation pipeline on every single generation, potentially hundreds of times per run. Scrub or synthesize sensitive fields before they ever reach the evaluator, the same way you would for any other automated testing pipeline that touches production-shaped data.

Third, set resource quotas before you let a team loose on Cloud Run-based evaluation. A misconfigured evaluator that never returns can spin up billable compute far longer than intended, especially if retries are configured aggressively. Google Cloud’s own project-level quota controls are the simplest guardrail here, and they’re worth setting on day one rather than after your first surprising invoice.

AlphaEvolve Pricing, Access Tiers and Model Defaults

AlphaEvolve doesn’t ship as a separate paid product with its own price sheet. Instead it’s bundled into the Gemini Enterprise Agent Platform on Google Cloud, which means it follows the same enterprise usage-based billing as other Gemini Enterprise agents. There’s no free-tier consumer version and no standalone download. Access requires an active Google Cloud project with Gemini Enterprise enabled.

What you actually pay for is compute, split across two lines: the AlphaEvolve API calls that generate mutated candidates using Gemini models, and any evaluation compute you run yourself, whether that’s your laptop (free) or a Cloud Run deployment (billed per request and per second of execution). The API reference confirms that, as of the July 9, 2026 GA date, gemini-3.5-flash is the default model for candidate generation, which keeps per-candidate cost low relative to routing every mutation through a Pro-tier model.

Before AlphaEvolve reached this stage, it moved through a private preview that started December 9, 2025, giving early enterprise customers roughly seven months to test the workflow before general availability. That’s a fairly standard preview window for a Google Cloud AI product, and it gave Google time to bake in feedback like the Cloud Run compiled-code pattern before opening the doors to every customer.

Common Pitfalls When Setting Up AlphaEvolve

These are the mistakes that show up most often in early runs, based on how the official docs and codelabs are structured around avoiding them.

  • Writing an evaluator that isn’t deterministic. If your scoring function returns different results for the same candidate on repeat runs, AlphaEvolve’s selection logic gets noisy and wastes generations chasing phantom improvements.
  • Marking too much code inside the EVOLVE-BLOCK. Mutating an entire file instead of a tight, well-scoped section slows convergence dramatically and increases the odds of broken candidates.
  • Skipping a correctness check in the evaluator. A scoring function that only measures speed, without verifying the output is actually correct, will happily reward a candidate that’s fast because it’s wrong.
  • Underestimating generation count for harder problems. Circle packing and small TSP instances converge in tens of generations. Larger combinatorial problems need proportionally more.
  • Running Cloud Run evaluation for problems that don’t need it. If your evaluator can run locally, do that first. Cloud Run adds cost and latency you don’t need for early iteration.
  • Forgetting to enable both the Gemini Enterprise Agent Platform API and the AlphaEvolve API. Enabling only one leaves you with confusing permission errors.

Troubleshooting Guide: 8 Issues and Fixes

Here’s a working list of issues developers run into during setup and early runs, along with what actually fixes each one.

  1. “Permission denied” calling the AlphaEvolve API. Confirm both required APIs are enabled on the project and that your account has the Gemini Enterprise user role assigned, not just general project viewer access.
  2. Run stalls with no score improvement after generation one. Check your evaluator actually returns a numeric score rather than raising an exception silently, which some harness configurations will interpret as a zero score across the board.
  3. Candidates fail to compile. Verify your seed program’s EVOLVE-BLOCK markers wrap syntactically complete code sections. Partial statements inside the block confuse candidate generation.
  4. Local evaluation runs far slower than expected. Reduce population size before reducing generation count. A smaller population per generation with more generations usually converges faster than a huge population with fewer rounds.
  5. Cloud Run evaluator times out on complex candidates. Increase the Cloud Run request timeout and memory allocation, since compiled binaries with heavy optimization flags can take longer than default limits allow.
  6. Skill doesn’t appear in Antigravity or Claude Code after installation. Restart the IDE fully rather than reloading the window. Skill registration in both tools reads the config at process start.
  7. Best score regresses between generations. This usually means your evaluator’s tie-breaking logic is inconsistent. Add a stable secondary metric so equally-scored candidates don’t get selected at random.
  8. GitHub clone of the reference repo fails on corporate networks. Use HTTPS clone with a personal access token rather than SSH if your network blocks outbound SSH traffic, which is common on locked-down corporate VPNs.

Advanced Tips for Scaling Your Evolutionary Runs

Once the basics work, a few adjustments make a real difference on harder problems. First, don’t run one massive experiment when several smaller ones will tell you more. Break a big optimization target into narrower sub-problems, each with its own tight evaluator, and you’ll converge faster on each piece than trying to evolve everything at once.

Second, treat your background knowledge input seriously. The Define step isn’t just the seed code, it’s also context about the problem, and giving AlphaEvolve relevant domain constraints upfront (numerical stability requirements, hardware limits, known failure modes) measurably reduces the number of wasted generations spent rediscovering constraints you already know about.

Third, when a run plateaus, don’t just add more generations blindly. Check whether the population has lost diversity. If every surviving candidate looks nearly identical, the search has converged on a local optimum and needs either a mutation rate bump or a fresh seed variant injected into the population to escape it.

Finally, log everything. Every generation’s best candidate, its score, and the diff against the previous best. When a run does produce a genuine breakthrough, you want a clean audit trail showing exactly which mutation path got you there, both for code review and for understanding why it worked.

A Complete Worked Example: Optimizing a Sorting Kernel

Let’s pull everything together into one project, start to finish. The goal: optimize a custom sorting function for a specific data distribution where a general-purpose sort wastes cycles on assumptions that don’t hold for your data.

  1. Set up the project and enable the required APIs, as covered in the setup steps above.
  2. Write a seed program with a naive sort as the baseline, wrapped in EVOLVE-BLOCK markers.
  3. Write an evaluator that scores candidates on wall-clock time across a representative sample of your actual production data, plus a correctness check against Python’s built-in sorted() as ground truth.
  4. Run a first pass locally with a modest population and generation count to sanity-check the pipeline works end to end.
  5. Scale up generations once the first pass confirms the loop is healthy.
  6. Review the final candidate’s diff against the seed program before merging anything into production code.
# seed_program.py
def sort_data(items):
    # EVOLVE-BLOCK-START
    return sorted(items)
    # EVOLVE-BLOCK-END

# evaluator.py
import time, random

def evaluate(candidate_fn, sample_data):
    # correctness check against ground truth
    if candidate_fn(sample_data) != sorted(sample_data):
        return 0.0
    # timing score, lower is better, invert for maximization
    start = time.perf_counter()
    for _ in range(200):
        candidate_fn(sample_data)
    elapsed = time.perf_counter() - start
    return 1.0 / elapsed

# launch command
python run_alphaevolve.py \
  --seed seed_program.py \
  --evaluator evaluator.py \
  --generations 50 \
  --population-size 20

A realistic output after a full run on skewed, partially-sorted production-like data looks something like this:

# [gen 1]  best_score=1.00 (baseline, standard sorted())
# [gen 14] best_score=1.34 (candidate detects near-sorted runs, uses insertion-sort fallback)
# [gen 33] best_score=1.61 (candidate adds early-exit check for already-sorted subsequences)
# [gen 50] converged, no improvement in last 8 generations
# final candidate is 61% faster than baseline on this data distribution

That 61 percent gain is entirely plausible for a sort function tuned to a specific, skewed data distribution where the general-purpose algorithm carries overhead your data doesn’t need. It’s also exactly the kind of narrow, measurable win that makes AlphaEvolve worth the setup effort. You wouldn’t reach for it to write a whole feature. You reach for it when you have one function, one metric, and a clear sense that a smarter human or a smarter search could do better than what’s currently shipped.

If your team is exploring the broader AI model ecosystem alongside this kind of optimization work, our guide to the best AI models of 2026 is a good next stop for context on where Gemini fits against other frontier models. And if you’re weighing open alternatives to Google’s stack for coding-heavy workloads, it’s worth comparing against open releases like Tencent’s Hy3 open model, which targets similar coding use cases from a different angle.

For teams already deep into the Gemini ecosystem, getting the right API access sorted out first matters. If you haven’t set up credentials yet, our guide to getting a Gemini API key covers the account setup steps that AlphaEvolve’s Google Cloud project also depends on.

Frequently Asked Questions

Do I need a GPU to run AlphaEvolve locally?

No. Both official codelabs, circle packing and the Travelling Salesman Problem, run candidate evaluation on your own machine with no GPU and no cluster required. The only cloud dependency is the AlphaEvolve API call that generates each round of candidate mutations.

Is AlphaEvolve free to use?

There’s no free consumer tier. It’s bundled into Google Cloud’s Gemini Enterprise Agent Platform and billed on a usage basis tied to your existing Google Cloud account, covering the API calls that generate candidates plus any evaluation compute you run in the cloud.

What’s the difference between AlphaEvolve and a normal AI code assistant?

A normal assistant suggests code for a human to review turn by turn. AlphaEvolve runs an autonomous loop that generates, tests, and scores hundreds of candidates against a metric you define, with no human review of individual candidates until the final result.

Which Gemini model powers AlphaEvolve by default?

As of the July 9, 2026 general availability release, the AlphaEvolve API reference lists gemini-3.5-flash as the default model for generating candidates, with Gemini Pro used for deeper reasoning passes when a run needs more careful analysis of a specific bottleneck.

Can I use AlphaEvolve inside my existing IDE workflow?

Yes. Google packages an AlphaEvolve Skill that installs into coding assistants including Antigravity and Claude Code, letting you prompt the assistant directly rather than running standalone CLI commands for every optimization task.

What kinds of problems is AlphaEvolve actually good at?

Problems with a clear, measurable metric: algorithmic speed, memory usage, approximation quality on combinatorial problems, or hardware kernel efficiency. It has documented use in matrix multiplication algorithms, data center scheduling, TPU kernel tiling, and compiler optimization, plus production adoption at companies like JetBrains for IDE algorithm performance.

Is there an open-source alternative to AlphaEvolve?

Yes. OpenEvolve, hosted on Hugging Face, is an open-source reimplementation of the same evolutionary coding approach, using the same EVOLVE-BLOCK convention for marking mutable code sections, though it isn’t tied to Google Cloud’s Gemini Enterprise infrastructure.

Related Coverage

Marcus Chen

Marcus Chen

Gaming & Consumer Tech Editor

Marcus Chen is a senior editor at Tech Insider, where he leads coverage of the US online gaming market, including sweepstakes and social casinos, alongside consumer technology. He evaluates operators on their published terms, licensing and RNG certifications, stated redemption policies, and corroborating independent reporting, and writes plainly about what the evidence supports. Tech Insider does not run first-party money tests and does not gamble with reader funds. Marcus has reported on the technology and online-gaming industries for more than a decade.

View all articles