Examples

Three optimization tasks. In each one we wrote only a scoring function and let EasyEvolve improve the code. Every result below is measured on 50 test cases the run never saw.

Results

TaskStarted fromBeforeAfterChangeRun costRun time
Route planningVisit 60 stops and returnNearest neighbor6.37Avg. distance5.12Avg. distance−19.1%shorter$0.9986 iterations—
Bin packing40 items, one box sizeNext Fit22.8Avg. boxes18.3Avg. boxes−18.0%fewer boxes, equal to First Fit Decreasing$0.9982 iterations16 min
Shipping with rules3 box prices, food apart from cleanersTuned greedy rule$24.92Avg. cost / order$24.66Avg. cost / order−1.5%cheaper on 28/50, never worse$0.4434 iterations7 min

Averages over 50 unseen cases; all answers were valid in every run. Run cost is what the EasyEvolve service charged for that run. Route run time was not recorded. One run per task, so treat these as examples, not benchmarks.

See the difference

The same input, solved by the starting code and by the code EasyEvolve returned.

Case 1 of 12
Before · Nearest neighbor8.38
After · EasyEvolve6.32

24.5% shorter. Same 60 stops in both panels. Every route visits each stop once and returns to the start.

Full experiment →

Why EasyEvolve

AspectTuning by handWith EasyEvolve
What you writeThe algorithmA scoring function (about 20 lines)
Who tries ideasYou, one at a timeEasyEvolve, dozens per run
What it costsEngineering hoursA budget you set ($0.45–$1 here)
Wrong answersCaught by your testsScored zero by your evaluator
What you getYour codeA plain Python file you keep

Start with a score

Two standard-library evaluators you can copy. Keep correctness in the score you optimize.

Correctness: a sorting function

Score the share of test cases passed. Five cases are a demonstration, not a proof.

eval.py
"""Implement solve(values: list[int]) -> sorted list[int]."""
import importlib.util

def evaluate(candidate_path: str) -> dict:
    spec = importlib.util.spec_from_file_location("candidate", candidate_path)
    module = importlib.util.module_from_spec(spec)
    spec.loader.exec_module(module)
    cases = [[], [1], [3, 1, 2], [5, -1, 5, 0], list(range(30, 0, -1))]
    passed = sum(module.solve(x.copy()) == sorted(x) for x in cases)
    return {"score": passed / len(cases)}

Speed: a faster Fibonacci

Return zero for any wrong answer, then reward lower run time. Timing varies; use repeated samples.

eval.py
"""Implement fibonacci(n: int) -> int for n >= 0."""
import importlib.util
import time

def evaluate(candidate_path: str) -> dict:
    spec = importlib.util.spec_from_file_location("candidate", candidate_path)
    module = importlib.util.module_from_spec(spec)
    spec.loader.exec_module(module)
    for n, expected in [(0, 0), (1, 1), (10, 55), (20, 6765)]:
        if module.fibonacci(n) != expected:
            return {"score": 0.0}
    start = time.perf_counter()
    for _ in range(200):
        if module.fibonacci(20) != 6765:
            return {"score": 0.0}
    elapsed = time.perf_counter() - start
    return {"score": 1.0 / (elapsed + 0.001)}
Run your first search