Settings

Theme

Show HN: Open-Source AlphaEvolve Clone Using GPT-4.1 and Genetic Programming

20 points by Sai_Praneeth 8 months ago · 0 comments · 1 min read


Everyone saw the AlphaEvolve hype. I got obsessed with how it might work under the hood and decided to just build it myself.

My setup uses GPT-4.1 to mutate matrix multiplication code, guided by a bunch of hand-crafted mutation strategies (loop reordering, tiling, Strassen, etc.). Each candidate is evaluated on both speed and accuracy. Then I apply Pareto selection with crowding distance to evolve better ones over generations.

I ran into all the usual LLM reward hacks-returning the input, calling np.dot, etc. So I forced primitive-only implementations and tightly constrained the mutation space.

After some struggle (and OpenAI credits vanishing), I ended up with a system that can actually evolve fast, correct implementations starting from a naive baseline.

Full story here (with all the failures and design hacks): https://saipraneeth.in/ml/building-evolve

Code’s public. Roast it, fork it, or try evolving your own. https://github.com/think-a-tron/evolve

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection