Remix.run Logo
pteetor 6 hours ago

In case you are unfamiliar with Karpathy's Loop[1], it is a genetic algorithm[2] where the genetic "mutations" are clever-but-random ideas generated by an LLM agent, aimed at improving a system.

  (1) Let the LLM randomly perturbate the system.
  (2) Measure the system's performance.
  (3a) If the perturbation improved performance, keep the change.
  (3b) Otherwise, don't.
  (4) Repeat
[1] https://github.com/karpathy/autoresearch

[2] https://en.wikipedia.org/wiki/Genetic_algorithm

thald an hour ago | parent | next [-]

I was working some time ago on LLM assisted optimizations and algorithm discovery and this does not look like a novel idea.

AlphaEvolve from google is evolutionary algorithm which uses LLMs for Idea generation following very similar loop:

- https://deepmind.google/blog/alphaevolve-a-gemini-powered-co...

- Open source implementation of the algorithm: https://github.com/algorithmicsuperintelligence/openevolve

yk09123 36 minutes ago | parent | prev | next [-]

This is like idiocracy for Software Devs at this point

faangguyindia 3 hours ago | parent | prev | next [-]

i actually do it differently

> (1) Let the LLM randomly perturbate the system.

instead of this i ask LLM to what's least likely to improve performance and then measure it.

sometimes big gains come from places you thought are least likely.

2001zhaozhao 5 hours ago | parent | prev [-]

Wtf, this has a name now? I thought of this exact idea literally months ago but never had the time to do any experiments on it.

At the time I dismissed it as potentially being incredibly expensive for the improvement you do get, and runs into typical pitfalls of evolutionary algorithms (in the same way evolution doesn't let an organism grow a wheel, your LLM evolution algorithm will never come up with something that requires a far bigger leap than what you allow the LLM to perturb on a single step. Also the genetic algorithm will probably result in a vibecoded mess of short-sighted decisions just like evolution creates a spaghetti genome in real life.)

I'll definitely need to look into how people have improved the idea and whether it is practical now.

beepdyboop 4 hours ago | parent | next [-]

This is not a new idea at all, many many have had it, no one really can claim it

utopiah 2 hours ago | parent | next [-]

Stigler's law of eponymy https://en.wikipedia.org/wiki/Stigler%27s_law_of_eponymy

janalsncm 2 hours ago | parent [-]

Wikipedia has humor:

> The same observation had previously also been made by many others.

wiseowise 21 minutes ago | parent | prev [-]

Don’t worry, Twitter bros already coined it.

stingraycharles 3 hours ago | parent | prev | next [-]

Genetic algorithms have existed since the 60s / 70s, e.g. computers learning to play a game. LLMs aren’t particularly guide at it.

I think hyperparameter tuning may actually be a kind of genetic algorithm.

janalsncm 2 hours ago | parent [-]

Hyperparameter tuning could be done by genetic algorithm. I think it’s a bit of a category error to say that it is a genetic algorithm though.

Hyperparam tuning is usually done by Bayesian Optimization though.

stingraycharles an hour ago | parent [-]

Yeah that’s correct, it could use it, but there are better alternatives for this particular problem.

naveen99 4 hours ago | parent | prev [-]

You know this doesn’t work most of the time…