Live data from Hacker News

Using Genetic Algorithms to Break Things

westleyargentum.github.io

21–30 of 45 posts

Re: Using Genetic Algorithms to Break Things

#21
post #9

A long time ago I had huge interest in genetic algorithms and on other soft optimization techniques. It is what inspired me to take up graduate studies in the first place. But very quickly I got thoroughly disillusioned by the community around it. What I am going to say is going to be very unpopular to the audience of this post. What turned me off and left a bad taste is the tendency for the community to push it as m…

I was going to post a comment with similar points, but instead Ill just add to srean's ideas.

If nothing is known about the objective function, no optimization algorithm can possibly be said to be better than any other. This is the no free lunch theorem.

http://en.wikipedia.org/wiki/No_free_lunch_theorem

So there is absolutely no sense in talking about optimization algorithms in isolation from the problems they're meant to solve. An intelligent appraisal of genetic algorithms would talk about the types of objective functions they seem to be able to find good answers for.

Re: Using Genetic Algorithms to Break Things

#22

Thomas Ray, who wrote the A-Life program Tierra found that genetic algorithms were really good at finding bugs in his code and exploiting them. One bug where that happened was a register he forgot to clear between simulated viruses. A virus evolved to exploit the data and use it to attack other viruses.

We should put them to work finding bugs in code. Breed one to click buttons and fill in webforms...and it gets to replicate when it breaks things.

Re: Using Genetic Algorithms to Break Things

#23

"We will not discuss genetic algorithms further, to discourage you from considering them for your applications." Skiena in The Algorithm Design Manual , at the end of the three-paragraph blurb where he talks about them.

If you are considering GAs, you have already given up at that point.

Re: Using Genetic Algorithms to Break Things

#24
post #9

A long time ago I had huge interest in genetic algorithms and on other soft optimization techniques. It is what inspired me to take up graduate studies in the first place. But very quickly I got thoroughly disillusioned by the community around it. What I am going to say is going to be very unpopular to the audience of this post. What turned me off and left a bad taste is the tendency for the community to push it as m…

I was going to post a comment with similar points, but instead Ill just add to srean's ideas. If nothing is known about the objective function, no optimization algorithm can possibly be said to be better than any other. This is the no free lunch theorem. http://en.wikipedia.org/wiki/No_free_lunch_theorem So there is absolutely no sense in talking about optimization algorithms in isolation from the problems they're me…

> If nothing is known about the objective function

What that "nothing is known" means, in the context of NFL theorems, is that values at each point are random, and independent of values at other points.

For example, if our domain is a 100-by-100 grid, and we fill the grid with random numbers, now we have such a function. And indeed, no optimization function is of any help in trying to find the largest of the 10 000 random numbers.

But this kind of totally random functions pretty much do not exist in the real world. So if out objective function came from the real application (and not from a random number generator), we already know enough about it that we can say that the NFL theorems don't apply to it.

Re: Using Genetic Algorithms to Break Things

#25
post #9

A long time ago I had huge interest in genetic algorithms and on other soft optimization techniques. It is what inspired me to take up graduate studies in the first place. But very quickly I got thoroughly disillusioned by the community around it. What I am going to say is going to be very unpopular to the audience of this post. What turned me off and left a bad taste is the tendency for the community to push it as m…

Metaheuristics are blind methods that make very few assumptions about the structure of the solution space. If you already know some of the structure of course you can find a better optimization algorithm. Better yet, you can find a better representation or mutation function that will massively shrink the search space. Or a fitness function more likely to lead evolution through the correct path. Or even seed solutions that give the algorithm a head start.

>On the other hand if you prove a theorem stating that for this types of problems, if you let GA run for this amount of time you are going to be close to the optimum with high probability. That would be phenomenally useful.

>At its basic, GA is a parallelized and randomized exploration of the space. Tell me why is that particular way of randomization and parallelization the right thing to do, or for what classes of problems is it the right thing to do. Without this, they are anecdotes.

That's pretty much impossible. If you already know so much about the problem space to the point of being able to prove theorems about it, then you don't need metaheuristics.

Re: Using Genetic Algorithms to Break Things

#26
post #3

As a researcher studying evolutionary algorithms, one thing these algorithms are quite adept at is finding holes in the objective functions you give to them. They are like automated lawyers seeking loopholes. You want to evolve a controller for a robot that walks far, it will find exploits in the physics engine that defy gravity or somehow catapult the robot through the air (this sort of exploit is the bane of those…

> They are like automated lawyers seeking loopholes.

That means we're getting there. This sounds like any toddler that I've ever met!

Re: Using Genetic Algorithms to Break Things

#27
post #24

Earlier quoted context omitted.

I was going to post a comment with similar points, but instead Ill just add to srean's ideas. If nothing is known about the objective function, no optimization algorithm can possibly be said to be better than any other. This is the no free lunch theorem. http://en.wikipedia.org/wiki/No_free_lunch_theorem So there is absolutely no sense in talking about optimization algorithms in isolation from the problems they're me…

> If nothing is known about the objective function What that "nothing is known" means, in the context of NFL theorems, is that values at each point are random, and independent of values at other points. For example, if our domain is a 100-by-100 grid, and we fill the grid with random numbers, now we have such a function. And indeed, no optimization function is of any help in trying to find the largest of the 10 000 r…

Sure, no particular instance of a function will be so utterly random, but I think you are probably missing the point of the parent comment. All that NFL says is that if you fix an optimization algorithm and average its performance over all possible measurable functions, no algorithm will be better than the other. The average is with respect to the distribution you described. However, if you skew the distribution so that certain class of functions are more likely than others, then an ordering will be imposed over some of the algorithms. Some algorithms will be better than others.

Therefore, trying to design a fully generic optimization algorithm is a fool's errand. On the contrary, a specific objective function will have specific properties and in that case it would be valuable to use specific algorithms suited to its properties. To follow the argument forward, it would be very useful if it was characterized what is exactly the class of objective functions that EA, GA, swarms, ant colon algorithms handle well. Under what assumptions is their specific randomization and parallel evaluation the right thing to do. These are resource intensive procedures, so such a characterization will tell us when is that effort well spent.

One uncharitable but plausible way to read the tail end of your comment is that just because a particular function is not random, it will violate NFL and magically make EA, GA style algorithms appropriate, that is not true. Glad that you were able to reword it before the edit window closed.

Edit: replying here because this thread is becoming nested too deep.

Hi @Dn_Ab I think we may have talked passed each other, so clarifying. Of course a bias / preference will naturally get induced over algorithms when you select objective functions non-uniformly. No magic there. But that is not going to make a particular choice of an algorithm (in this case EA, GA et al) magically appropriate for whatever specific nonuniform distribution over the objective function chosen. The choice either has to be deliberate (in which case we would need to know a measurable description of the class where these algorithms work better) or one has wait to get wildly lucky, the latter is about as productive as playing lottery except that the tickets are pretty expensive when we play EA, GA etc.

@sampo > have very specific mathematically defined meanings here, and those meaning are probably very different than what a casual reader might expect.

Good point, upvoted, now I understand your previous comment better.

@sampo > I also like your "snake oil" metaphor, and I was happy to see your top comment on this topic.

I expected it to be downvoted out of existence given a few snarks that I yielded to.

Re: Using Genetic Algorithms to Break Things

#28
post #3

As a researcher studying evolutionary algorithms, one thing these algorithms are quite adept at is finding holes in the objective functions you give to them. They are like automated lawyers seeking loopholes. You want to evolve a controller for a robot that walks far, it will find exploits in the physics engine that defy gravity or somehow catapult the robot through the air (this sort of exploit is the bane of those…

Very related: Conjuring An Evolution To Serve You: http://lesswrong.com/lw/l8/conjuring_an_evolution_to_serve_y...

Re: Using Genetic Algorithms to Break Things

#29
post #9

A long time ago I had huge interest in genetic algorithms and on other soft optimization techniques. It is what inspired me to take up graduate studies in the first place. But very quickly I got thoroughly disillusioned by the community around it. What I am going to say is going to be very unpopular to the audience of this post. What turned me off and left a bad taste is the tendency for the community to push it as m…

I was going to post a comment with similar points, but instead Ill just add to srean's ideas. If nothing is known about the objective function, no optimization algorithm can possibly be said to be better than any other. This is the no free lunch theorem. http://en.wikipedia.org/wiki/No_free_lunch_theorem So there is absolutely no sense in talking about optimization algorithms in isolation from the problems they're me…

The no free lunch theorem states that, the performance of any two search algorithms are equivalent when averaged across all possible problems. This fails to hold in coevolutionary settings - selecting a champion through self play. In such cases there will be pairs of algorithms where one is demonstrably better than the other for all possible problems; a free lunch by criteria of the NFL theorem [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.100... ; also worth checking out: http://www.santafe.edu/media/workingpapers/12-10-017.pdf].

The No Free Lunch Theorem is also one of those limit statements that rarely impinges on reality. We are not interested in all possible functions - the majority of which will be of such complexity as to be indistinguishable from random - only those with exploitable structure. It's much the same reason for why, although kmeans is NP-hard, failing to find a good clustering is very often suggestive of an ill-posed problem with no interesting structure. If kmeans didn't find a good cluster, very possibly a good one does not exist (e.g. Clustering is difficult only when it does not matter; http://arxiv.org/abs/1205.4891)

Re: Using Genetic Algorithms to Break Things

#30
post #9

A long time ago I had huge interest in genetic algorithms and on other soft optimization techniques. It is what inspired me to take up graduate studies in the first place. But very quickly I got thoroughly disillusioned by the community around it. What I am going to say is going to be very unpopular to the audience of this post. What turned me off and left a bad taste is the tendency for the community to push it as m…

Metaheuristics are blind methods that make very few assumptions about the structure of the solution space. If you already know some of the structure of course you can find a better optimization algorithm. Better yet, you can find a better representation or mutation function that will massively shrink the search space. Or a fitness function more likely to lead evolution through the correct path. Or even seed solutions…

With apologies, if a proponent of an algorithm cannot tell me under what circumstances the proposed algorithm would do better, the proponent is selling me snake oil. There has to be some quantitative statements about their properties, not necessarily proof of convergence to the global optimum. Otherwise it is not science, (yet). Its not an understanding of the space of an arbitrary problem that I desire, it is a measurable or mathematical characterization of the space where these algorithms work well, ideally the process of measurement should be cheaper than applying the algorithm.

EDIT: replaced 'you' with 'proponent' lest it gives the impression that I meant it personally.

Post reply on HN