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

5 Sai_Praneeth 0 5/19/2025, 11:28:55 AM
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

Comments (0)

No comments yet