Skip to content

Commit 5aec3dc

Browse files
authored
Merge pull request #195 from githubnext/copilot/rename-alphaevolve-to-openevolve
Rename AlphaEvolve strategy to OpenEvolve and credit the inspiration
2 parents f59fefc + 7dcb974 commit 5aec3dc

12 files changed

Lines changed: 38 additions & 34 deletions

File tree

.autoloop/programs/tsb-perf-evolve/code/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This directory holds the **fixed inputs** for the program: the benchmark scripts
44

55
## Files
66

7-
- `config.yaml` — tunables read by the AlphaEvolve playbook (`exploitation_ratio`, `num_islands`, `population_size`, `archive_size`, dataset size).
7+
- `config.yaml` — tunables read by the OpenEvolve playbook (`exploitation_ratio`, `num_islands`, `population_size`, `archive_size`, dataset size).
88
- `benchmark.ts` — tsb-side benchmark. Builds a Series of `dataset_size` random floats with ~5% NaN, calls `sortValues` in a tight loop, prints `{"function": "Series.sortValues", "mean_ms": …, "iterations": …, "total_ms": …}`.
99
- `benchmark.py` — pandas-side benchmark. Builds an equivalent `pd.Series`, calls `.sort_values()` in the same loop structure, prints the same JSON shape.
1010

.autoloop/programs/tsb-perf-evolve/code/config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# AlphaEvolve tunables — read by strategy/alphaevolve.md every iteration.
1+
# OpenEvolve tunables — read by strategy/openevolve.md every iteration.
22

33
# Operator weights. Must sum to 1.0. Defaults bias toward exploitation.
44
exploitation_ratio: 0.50
@@ -7,7 +7,7 @@ crossover_ratio: 0.15
77
migration_ratio: 0.05
88

99
# Island count. Should match the number of islands enumerated in
10-
# strategy/alphaevolve.md's "Pick parent(s)" section.
10+
# strategy/openevolve.md's "Pick parent(s)" section.
1111
num_islands: 5
1212

1313
# MAP-Elites population caps.

.autoloop/programs/tsb-perf-evolve/program.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Concretely, we minimize the **ratio**
1414

1515
`fitness < 1.0` means tsb is faster than pandas; lower is better. We will keep iterating as long as fitness keeps improving.
1616

17-
This is a **performance-evolution program** — there is one self-contained artifact (`Series.sortValues`), one scalar fitness (the ratio), and many plausible algorithmic families to try (comparison sort, typed-array indirect sort, dtype-dispatched non-comparison sort, batched/SoA, etc.). It is the canonical case for the AlphaEvolve strategy.
17+
This is a **performance-evolution program** — there is one self-contained artifact (`Series.sortValues`), one scalar fitness (the ratio), and many plausible algorithmic families to try (comparison sort, typed-array indirect sort, dtype-dispatched non-comparison sort, batched/SoA, etc.). It is the canonical case for the OpenEvolve strategy.
1818

1919
### Validity invariants
2020

@@ -43,10 +43,10 @@ Do NOT modify:
4343

4444
## Evolution Strategy
4545

46-
This program uses the **AlphaEvolve** strategy. On every iteration, read `strategy/alphaevolve.md` and follow it literally — it supersedes the generic analyze/accept/reject steps in the default autoloop loop.
46+
This program uses the **OpenEvolve** strategy (modeled on [openevolve](https://github.com/algorithmicsuperintelligence/openevolve)). On every iteration, read `strategy/openevolve.md` and follow it literally — it supersedes the generic analyze/accept/reject steps in the default autoloop loop.
4747

4848
Support files:
49-
- `strategy/alphaevolve.md` — the runtime playbook (operators, parent selection, population rules).
49+
- `strategy/openevolve.md` — the runtime playbook (operators, parent selection, population rules).
5050
- `strategy/prompts/mutation.md` — framing for exploitation and exploration operators.
5151
- `strategy/prompts/crossover.md` — framing for crossover and migration operators.
5252

.autoloop/programs/tsb-perf-evolve/strategy/alphaevolve.md renamed to .autoloop/programs/tsb-perf-evolve/strategy/openevolve.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# AlphaEvolve Strategy — tsb-perf-evolve
1+
# OpenEvolve Strategy — tsb-perf-evolve
22

33
This file is the **runtime playbook** for this program. The autoloop agent reads it at the start of every iteration and follows it literally. It supersedes the generic "Analyze and Propose" / "Accept or Reject" steps in the default autoloop iteration loop — all other steps (state read, branch management, state file updates) still apply.
44

@@ -90,7 +90,7 @@ Append a new entry to the `## 🧬 Population` subsection in the state file usin
9090

9191
### Step 8. Fold through to the default loop
9292

93-
Continue with the normal autoloop Step 5 (Accept or Reject → commit / discard, update state file's Machine State, Iteration History, Lessons Learned, etc.) as defined in the workflow. The only additional requirements from AlphaEvolve are:
93+
Continue with the normal autoloop Step 5 (Accept or Reject → commit / discard, update state file's Machine State, Iteration History, Lessons Learned, etc.) as defined in the workflow. The only additional requirements from OpenEvolve are:
9494

9595
- The Iteration History entry must include `operator`, `parent_id(s)`, `island`, and `fitness` fields (in addition to the normal status/change/metric/notes).
9696
- Lessons Learned additions should be phrased as *transferable heuristics* about the problem space, not as reports of what this iteration did. (E.g. "Indirect sort over `Uint32Array` indices beats object-pair sort above n≈10k" — not "Iteration 17 tried indirect sort.")
@@ -113,7 +113,7 @@ The population lives in the state file `tsb-perf-evolve.md` on the `memory/autol
113113
```markdown
114114
## 🧬 Population
115115

116-
> 🤖 *Managed by the AlphaEvolve strategy. One entry per candidate that has been evaluated (accepted or rejected). Newest first.*
116+
> 🤖 *Managed by the OpenEvolve strategy. One entry per candidate that has been evaluated (accepted or rejected). Newest first.*
117117
118118
### Candidate <id> · island <n> · fitness <score> · gen <iter>
119119

.autoloop/programs/tsb-perf-evolve/strategy/prompts/crossover.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Crossover & Migration prompt — tsb-perf-evolve
22

3-
You are about to apply a **two-parent operator** — either crossover (combine ideas from parents on different islands) or migration (graft a technique that works on one island into a solution on another). This file frames how to reason about that change. Use it together with `strategy/alphaevolve.md`.
3+
You are about to apply a **two-parent operator** — either crossover (combine ideas from parents on different islands) or migration (graft a technique that works on one island into a solution on another). This file frames how to reason about that change. Use it together with `strategy/openevolve.md`.
44

55
## What these operators are for
66

.autoloop/programs/tsb-perf-evolve/strategy/prompts/mutation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Mutation prompt — tsb-perf-evolve
22

3-
You are about to apply a **single-parent operator** — either exploitation (refine an elite) or exploration (try something new in an under-represented island). This file frames how to reason about that change. Use it together with `strategy/alphaevolve.md`.
3+
You are about to apply a **single-parent operator** — either exploitation (refine an elite) or exploration (try something new in an under-represented island). This file frames how to reason about that change. Use it together with `strategy/openevolve.md`.
44

55
## What this operator is for
66

.autoloop/strategies/alphaevolve/CUSTOMIZE.md renamed to .autoloop/strategies/openevolve/CUSTOMIZE.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1-
# Adopting the AlphaEvolve strategy for a new program
1+
# Adopting the OpenEvolve strategy for a new program
22

3-
This file is a **creator-time guide**it is read by the maintainer (or a "create program" agent) **once**, when authoring a new program that wants to use AlphaEvolve. It is **not** copied into the program's `strategy/` directory and is **not** read by the iteration agent at runtime.
3+
> **Inspiration.** This strategy is modeled on [OpenEvolve](https://github.com/algorithmicsuperintelligence/openevolve)an open-source implementation of the evolutionary-code-search approach popularized by DeepMind's AlphaEvolve paper. We've adapted the core ideas (MAP-Elites niching, island model, four operators — exploitation / exploration / crossover / migration) into a playbook the autoloop agent follows at iteration time. Consult the OpenEvolve repo for background on the underlying algorithm and worked examples.
44
5-
If you are an iteration agent and have somehow ended up here: stop, go back to `strategy/alphaevolve.md` in the program directory, and follow that.
5+
This file is a **creator-time guide** — it is read by the maintainer (or a "create program" agent) **once**, when authoring a new program that wants to use OpenEvolve. It is **not** copied into the program's `strategy/` directory and is **not** read by the iteration agent at runtime.
66

7-
## When to pick AlphaEvolve
7+
If you are an iteration agent and have somehow ended up here: stop, go back to `strategy/openevolve.md` in the program directory, and follow that.
88

9-
AlphaEvolve is the right strategy when **all** of the following are true:
9+
## When to pick OpenEvolve
10+
11+
OpenEvolve is the right strategy when **all** of the following are true:
1012

1113
- The target is a **self-contained artifact** — a single function, a single file, a config blob — that can be replaced atomically each iteration.
1214
- Fitness is a **scalar metric** the evaluator can produce in a few seconds to a few minutes (lower or higher is better — pick one).
13-
- There are **multiple plausible algorithmic families**, not just one obvious approach with knobs to tune. AlphaEvolve's island model is wasted if everything collapses to one family.
14-
- Iterations are **independent** — a candidate's fitness does not depend on the previous candidate's state. (If you need to *accumulate* changes, use the default loop, not AlphaEvolve.)
15+
- There are **multiple plausible algorithmic families**, not just one obvious approach with knobs to tune. OpenEvolve's island model is wasted if everything collapses to one family.
16+
- Iterations are **independent** — a candidate's fitness does not depend on the previous candidate's state. (If you need to *accumulate* changes, use the default loop, not OpenEvolve.)
1517

16-
If the program is "add another test", "port another feature", or any kind of coverage / accumulation task — **do not use AlphaEvolve**. Use the default loop.
18+
If the program is "add another test", "port another feature", or any kind of coverage / accumulation task — **do not use OpenEvolve**. Use the default loop.
1719

1820
## Steps to adopt
1921

@@ -22,15 +24,15 @@ If the program is "add another test", "port another feature", or any kind of cov
2224

2325
```bash
2426
mkdir -p .autoloop/programs/<program-name>/strategy/prompts
25-
cp .autoloop/strategies/alphaevolve/strategy.md \
26-
.autoloop/programs/<program-name>/strategy/alphaevolve.md
27-
cp .autoloop/strategies/alphaevolve/prompts/mutation.md \
27+
cp .autoloop/strategies/openevolve/strategy.md \
28+
.autoloop/programs/<program-name>/strategy/openevolve.md
29+
cp .autoloop/strategies/openevolve/prompts/mutation.md \
2830
.autoloop/programs/<program-name>/strategy/prompts/mutation.md
29-
cp .autoloop/strategies/alphaevolve/prompts/crossover.md \
31+
cp .autoloop/strategies/openevolve/prompts/crossover.md \
3032
.autoloop/programs/<program-name>/strategy/prompts/crossover.md
3133
```
3234

33-
3. Resolve every `<CUSTOMIZE: …>` marker in `strategy/alphaevolve.md` and the two prompt files. See the marker-by-marker guidance below.
35+
3. Resolve every `<CUSTOMIZE: …>` marker in `strategy/openevolve.md` and the two prompt files. See the marker-by-marker guidance below.
3436
4. Add the `## Evolution Strategy` pointer block to `program.md` (template below).
3537
5. Sanity-check: `grep -R "<CUSTOMIZE" .autoloop/programs/<program-name>/strategy/` should return **nothing**.
3638

@@ -41,10 +43,10 @@ Replace (or add) `program.md`'s `## Evolution Strategy` section with exactly thi
4143
```markdown
4244
## Evolution Strategy
4345

44-
This program uses the **AlphaEvolve** strategy. On every iteration, read `strategy/alphaevolve.md` and follow it literally — it supersedes the generic analyze/accept/reject steps in the default autoloop loop.
46+
This program uses the **OpenEvolve** strategy. On every iteration, read `strategy/openevolve.md` and follow it literally — it supersedes the generic analyze/accept/reject steps in the default autoloop loop.
4547

4648
Support files:
47-
- `strategy/alphaevolve.md` — the runtime playbook (operators, parent selection, population rules).
49+
- `strategy/openevolve.md` — the runtime playbook (operators, parent selection, population rules).
4850
- `strategy/prompts/mutation.md` — framing for exploitation and exploration operators.
4951
- `strategy/prompts/crossover.md` — framing for crossover and migration operators.
5052

@@ -55,7 +57,7 @@ Population state lives in the state file on the `memory/autoloop` branch under t
5557

5658
### `strategy.md` markers
5759

58-
- **`# AlphaEvolve Strategy — <CUSTOMIZE: program-name>`** — the program name as it appears in the file path.
60+
- **`# OpenEvolve Strategy — <CUSTOMIZE: program-name>`** — the program name as it appears in the file path.
5961
- **`## Problem framing`** — 2–4 sentences. State the artifact, the fitness function, and the validity invariants. The agent reads this every iteration; make it dense.
6062
- **Operator weight table** — only change defaults if you have a strong prior. The defaults bias toward exploitation, which is right for most perf problems.
6163
- **Islands** — the most important thing to get right. Pick 3–6 **algorithmic families** that span the design space. Examples:

.autoloop/strategies/alphaevolve/prompts/crossover.md renamed to .autoloop/strategies/openevolve/prompts/crossover.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Crossover & Migration prompt — <CUSTOMIZE: program-name>
22

3-
You are about to apply a **two-parent operator** — either crossover (combine ideas from parents on different islands) or migration (graft a technique that works on one island into a solution on another). This file frames how to reason about that change. Use it together with `strategy/alphaevolve.md`.
3+
You are about to apply a **two-parent operator** — either crossover (combine ideas from parents on different islands) or migration (graft a technique that works on one island into a solution on another). This file frames how to reason about that change. Use it together with `strategy/openevolve.md`.
44

55
## What these operators are for
66

.autoloop/strategies/alphaevolve/prompts/mutation.md renamed to .autoloop/strategies/openevolve/prompts/mutation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Mutation prompt — <CUSTOMIZE: program-name>
22

3-
You are about to apply a **single-parent operator** — either exploitation (refine an elite) or exploration (try something new in an under-represented island). This file frames how to reason about that change. Use it together with `strategy/alphaevolve.md`.
3+
You are about to apply a **single-parent operator** — either exploitation (refine an elite) or exploration (try something new in an under-represented island). This file frames how to reason about that change. Use it together with `strategy/openevolve.md`.
44

55
## What this operator is for
66

.autoloop/strategies/alphaevolve/strategy.md renamed to .autoloop/strategies/openevolve/strategy.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# AlphaEvolve Strategy — <CUSTOMIZE: program-name>
1+
# OpenEvolve Strategy — <CUSTOMIZE: program-name>
2+
3+
> **Inspiration.** This strategy is modeled on [OpenEvolve](https://github.com/algorithmicsuperintelligence/openevolve) — an open-source implementation of the evolutionary-code-search approach popularized by DeepMind's AlphaEvolve paper. We've adapted the core ideas (MAP-Elites niching, island model, four operators — exploitation / exploration / crossover / migration) into a playbook the autoloop agent follows at iteration time. Consult the OpenEvolve repo for background on the underlying algorithm and worked examples.
24
35
This file is the **runtime playbook** for this program. The autoloop agent reads it at the start of every iteration and follows it literally. It supersedes the generic "Analyze and Propose" / "Accept or Reject" steps in the default autoloop iteration loop — all other steps (state read, branch management, state file updates) still apply.
46

@@ -84,7 +86,7 @@ Append a new entry to the `## 🧬 Population` subsection in the state file usin
8486

8587
### Step 8. Fold through to the default loop
8688

87-
Continue with the normal autoloop Step 5 (Accept or Reject → commit / discard, update state file's Machine State, Iteration History, Lessons Learned, etc.) as defined in the workflow. The only additional requirements from AlphaEvolve are:
89+
Continue with the normal autoloop Step 5 (Accept or Reject → commit / discard, update state file's Machine State, Iteration History, Lessons Learned, etc.) as defined in the workflow. The only additional requirements from OpenEvolve are:
8890

8991
- The Iteration History entry must include `operator`, `parent_id(s)`, `island`, and `fitness` fields (in addition to the normal status/change/metric/notes).
9092
- Lessons Learned additions should be phrased as *transferable heuristics* about the problem space, not as reports of what this iteration did. (E.g. "Hex layouts dominate grid layouts above n=20" — not "Iteration 17 tried a hex layout.")
@@ -107,7 +109,7 @@ The population lives in the state file `{program-name}.md` on the `memory/autolo
107109
```markdown
108110
## 🧬 Population
109111

110-
> 🤖 *Managed by the AlphaEvolve strategy. One entry per candidate that has been evaluated (accepted or rejected). Newest first.*
112+
> 🤖 *Managed by the OpenEvolve strategy. One entry per candidate that has been evaluated (accepted or rejected). Newest first.*
111113
112114
### Candidate <id> · island <n> · fitness <score> · gen <iter>
113115

0 commit comments

Comments
 (0)