Skip to content

Add strategy system to autoloop; ship AlphaEvolve as the first playbook#182

Merged
mrjf merged 2 commits intomainfrom
copilot/add-strategy-system-autoloop
Apr 23, 2026
Merged

Add strategy system to autoloop; ship AlphaEvolve as the first playbook#182
mrjf merged 2 commits intomainfrom
copilot/add-strategy-system-autoloop

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 23, 2026

Programs can now opt into specialized per-iteration playbooks that supersede the default analyze/propose/accept/reject loop. Ships AlphaEvolve (MAP-Elites + islands + four operators) as the first concrete strategy, suited to evolving a self-contained artifact toward a scalar fitness.

Opt-in mechanism (agent-prompt only)

.github/workflows/autoloop.md gets a ### Strategy discovery step at the top of ## Iteration Loop. The agent reads program.md's ## Evolution Strategy section; if it points to a strategy file, the agent follows that file literally (state read, branching, CI gating still apply). If absent, behaviour is unchanged — no regression for coverage-style programs. No scheduler changes.

Reusable template — .autoloop/strategies/alphaevolve/

  • strategy.md — runtime playbook with <CUSTOMIZE: …> markers: 8-step loop (load → pick operator → pick parents → apply → implement → evaluate → update population → fold to default), operator weights with deterministic rut-breaking overrides (3-reject → forced exploration, 5-reject → forced migration), MAP-Elites feature dimensions, population schema with strikethrough-eviction.
  • CUSTOMIZE.md — creator-time guide (when AlphaEvolve fits, copy steps, marker-by-marker guidance, worked example). Not copied into programs.
  • prompts/mutation.md, prompts/crossover.md — operator framing templates.

Proof-of-concept — .autoloop/programs/tsb-perf-evolve/

Targets Series.sortValues in src/core/series.ts. Fitness = tsb_mean_ms / pandas_mean_ms (lower is better; <1.0 means tsb wins).

  • program.md with the resolved ## Evolution Strategy pointer block and explicit validity invariants (tests pass, signature unchanged, strict TS, NaN semantics preserved).
  • code/{config.yaml, benchmark.ts, benchmark.py, README.md} — fixed evaluator: 100k float Series with 5% NaN, 5 warmup + 50 measured iterations on each side, JSON output.
  • strategy/alphaevolve.md + strategy/prompts/{mutation,crossover}.md — fully customized: 5 islands (comparison-pairs, indirect typed-array, packed typed-array, radix/non-comparison, hybrid); feature dimensions = storage × algorithm-class; vocabulary and domain knowledge (Bun JIT monomorphization, typed-array allocation costs, NaN partitioning, pandas/NumPy baseline) written in. grep -R "<CUSTOMIZE" .autoloop/programs/tsb-perf-evolve/ is empty.

Pointer block authors copy into program.md

## Evolution Strategy

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.

Out of scope

Strategy-picker UI/CLI, additional strategies beyond AlphaEvolve, scheduler-level strategy awareness — all explicitly deferred per the issue.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/githubnext/tsessebe/issues/181
    • Triggering command: /usr/bin/curl curl -s REDACTED (http block)
    • Triggering command: /usr/bin/curl curl -sL -H Accept: application/vnd.github.raw&#43;json REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Add strategy system to autoloop and implement AlphaEvolve Add strategy system to autoloop; ship AlphaEvolve as the first playbook Apr 23, 2026
Copilot AI requested a review from mrjf April 23, 2026 03:16
Copilot finished work on behalf of mrjf April 23, 2026 03:16
@mrjf mrjf marked this pull request as ready for review April 23, 2026 03:38
@mrjf mrjf merged commit c39ac73 into main Apr 23, 2026
17 checks passed
@mrjf mrjf deleted the copilot/add-strategy-system-autoloop branch April 23, 2026 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add strategy system to autoloop — ship AlphaEvolve as the first specialized iteration playbook

2 participants