Hacker News new | ask | show | jobs
by bun_at_work 1011 days ago
GAs are super cool and I think underutilized in the NN era.

One thing that might improve the algorithms in the linked write-up is not choosing the strict top results. Often, GAs perform better if you choose a random selection from the result set, then choose the top performer from that selection.

So, if your algorithm generates 100 results, pick 10 randomly, then use the top 2 from that selection to generate the next generation. This allows more exploration of the solution space and mitigates landing in local optima. Introducing the new parameters means more playing with the values, but it's been shown to work better, and makes sense in the context of biological evolution, as well.

Anyway - GAs are fun and I'd like to see them used more. Thanks for the article OP!

5 comments

I agree. Personally I had success using randomness on an energy-based system. You start off with energy and compete to earn more. Once you hit 0 then you're out. Then you can generate new ones, with some being completely random, and then others being the combination of random choices from the Top N. Probably not the most theoretically-sound approach, but it worked well enough in the real world.
Evolutionary Computation has, surprisingly, been successfully integrated in many engineering (not software!) problems such as antenna design, aerodynamics and whatever else has to do with shape optimization.
Rather than choosing 10 fully randomly I think you would have more luck with using fitness to guide the selection process, using methods like Roulette Wheel selection (letting the probability to be selected be somewhat influenced by the fitness). This will retain the benefit of a wide exploration of the solution space as you mention, but also retain some of the benefits of evolution - the fittest prevails.

Throughout the generations you can adjust the parameters (selection pressure) from just a slight favoring of fitness to higher favoring fitness, making the GA have a large initial search space that gradually approaches an optima. If you are worried about the solution converging to soon, a high grade of mutation can also be used.

In my experience using tournament selection with a small elitism count works best. You keep the best `n` members of the population and for all other members you group them into random groups of size `m` and select the best value from that group.
Why would that be different from generating 10 results and picking the top 2? I assume any 2 generated results from the same generation would be "within the same distribution", if that makes sense.

Is there a term for that approach?

Larger population = faster state space exploration. Sampling relies on the structure of the population. Most individuals will typically be minor variations on one of the successful genotypes, with some smaller percentage of novel genotypes. Random sampling will usually ensure that the successful genes are broadly represented while occasionally including the others. Since the sampling probably won't include the most optimized individuals, those others can compete in an easier environment and the algorithm has a better chance to escape local minima.