Some Questions on Genetic Algorithms

vjtorley:

I was very struck by Glenn Williamson’s [vjt meant GlenDavidson] remark that creativity is not the same thing as complexity. Very deep. Glenn seems to think that people are good at the former, but the blind processes can outdo them in the latter. That’s an interesting view, but I’d want to see evidence that blind processes are actually capable of producing systems with a high degree of functional complexity, of the kind Axe described in his book. Even a computer simulation would be something.

What with all the experts in writing GA’s here at TSZ I was hoping VJT would have elicited more of a response.

Which brings me to my second point. Tom English remarked above:

“What’s more important in responding to Axe, I suspect, is the issue of knowledge. Do you get only what you know how to make? The answer to that, coming from evolutionary computation, is a top-of-the-lungs NO!!!. I’ve set up a number of evolutionary systems that ended up knowing, in clear operational terms, how to do what I hadn’t a clue how to do.”

I’d like to ask Tom: in terms of building functional coherence, what’s the best your algorithms are capable of doing? I’m interested in finding out, and if you can point me to a good place to start familiarizing myself with GAs, I’d be grateful.

Why doesn’t someone walk VJT through designing a GA that does what he is asking? Is it because a generic GA doesn’t do anything of the sort of thing he is asking for?

For VJT, do you have any experience at all in any programming language?

268 thoughts on “Some Questions on Genetic Algorithms

  1. Sorry if I haven’t read your code, but this is a simple question. When you say changes accumulate, does that mean that changes cannot revert?

  2. petrushka: Sorry if I haven’t read your code, but this is a simple question. When you say changes accumulate, does that mean that changes cannot revert?

    Well, that’s not what I mean by accumulate, and a change can revert until it actually matches the target character at that specific locus. Then there is no more mutation at that locus so the change at that point remains fixed. That’s what Patrick means by latching. I call it highly conserved. 😉

  3. for each locus in chromosome, randomly mutate the letter at that locus until it matches the desired letter

    Through this process it gradually accumulates the letters needed to match the target phrase.

  4. Allan Miller: Is a GA without selection still a GA?

    It turns out that there is no rigorous definition of “genetic algorithm” accepted by all in the evolutionary-computation community that differentiates GAs from other evolutionary computation methods. However, it can be said that most methods called “GAs” have at least the following elements in common: populations of chromosomes, selection according to fitness, crossover to produce new offspring, and random mutation of new offspring.

    Melanie Mitchell. An Introduction to Genetic Algorithms.

  5. Mung:

    for each locus in chromosome, randomly mutate the letter at that locus [and nowhere else] until it matches the desired letter [, then never mutate that locus again.]

    Through this process it gradually accumulates the letters needed to match the target phrase.

    In other words, your program completely fails as an implementation of Weasel, in which mutation can happen anywhere in the phrase and fitness is a function of the phrase’s proximity to the target.

  6. Tom English: That is an entirely appropriate question to ask. When you recognize that Mung is anything but dumb, you cannot help but wonder, “What the hell is he getting out of this?”

    Still wondering.

  7. Tom English: When you recognize that Mung is anything but dumb, you cannot help but wonder, “What the hell is he getting out of this?”

    He’s a stirrer. That is all. If you can’t create, fuck with those who can.

  8. Mung,

    (quoting Melanie Mitchell) it can be said that most methods called “GAs” have at least the following elements in common: populations of chromosomes, selection according to fitness, crossover to produce new offspring, and random mutation of new offspring.

    ‘Most’. Hard to argue with that. But is it essential? It is certainly not necessary to have crossover to qualify. Nor mutation. Of course most GAs with any utility have those things. Unless, that is, the utility of the GA is as a pedagological tool, in which one can separate out the forces of evolution. Then you can turn them all off except the basic one: you need some form of replication, which inevitably goes hand in hand with elimination where resources are finite.

    All you really need for a bare-bones GA is an array whose members are subject to copying and elimination. The rest can be treated as optional plug-in methods. And even there – as in the M&M example – one can gain insights into evolution, for those interested in such things.

  9. Allan Miller,

    Nonsense. EVERY GA has to have a function which decides what is “fit.” Otherwise it produces nothing other than random bits of pixels with no meaning.

    Unfortunately in evolution, fitness only means survival, so for a computer to model evolution, all it can ask the fitness determination to do is, “be.”

  10. phoodoo:

    Allan Miller,

    Nonsense.EVERY GA has to have a function which decides what is “fit.”Otherwise it produces nothing other than random bits of pixels with no meaning.

    Unfortunately in evolution, fitness only means survival, so for a computer to model evolution, all it can ask the fitness determination to do is, “be.”

    This itself is complete nonsense.

    It is quite possible to have genetic simulations that have no fitness differences among genotypes (for example, when one is studying neutral mutation at multiple loci). We’ve done this ourselves in our lab.

    Fitness includes both viability and fertility. For example, a genotype can have viability 0.86 and fertility 2.3, and thus have fitness 1.978.

    An individual might either survive or not, in a simple discrete-generations model, but it can have various numbers of offspring. And its genotype has fitness which is the expected number of offspring it will contribute to the next generation.

  11. phoodoo:
    Allan Miller,

    Nonsense.EVERY GA has to have a function which decides what is “fit.”Otherwise it produces nothing other than random bits of pixels with no meaning.

    You’ve already been presented with Tierra and Polyworld as examples of EAs that do not have explicit fitness functions.

    Unfortunately in evolution, fitness only means survival, so for a computer to model evolution, all it can ask the fitness determination to do is, “be.”

    You have been presented with numerous references demonstrating that your claim about the definition of biological fitness is wrong.

  12. Allan Miller:
    Mung,

    ‘Most’. Hard to argue with that. But is it essential? It is certainly not necessary to have crossover to qualify.

    Indeed. Crossover is a common optimization but is not essential to a GA.

    All you really need for a bare-bones GA is an array whose members are subject to copying and elimination. The rest can be treated as optional plug-in methods. And even there – as in the M&M example – one can gain insights into evolution, for those interested in such things.

    It’s worth noting, again, that the mechanism for elimination need not be explicit. It can arise from the features of the environment and virtual organisms.

  13. Joe Felsenstein,

    We are talking about computer generated algorithms Joe! What are you talking about you have done this in your lab?

    If you don’t tell a computer which 1s to keep and which O’s to delete, the computer does nothing. THIS is how you tell a computer the fitness.

    Holy cow Joe.

  14. Patrick,

    Of course they do! You have already been told how wrong you are!!

    Just because you don’t call it a fitness function, changes nothing!!

    You tell the computer what is the definition of success and what is the definition of failure. THAT is EXACTLY what Polyworld does.

  15. phoodoo:
    Joe Felsenstein,

    We are talking about computer generated algorithms Joe!What are you talking about you have done this in your lab?

    If you don’t tell a computer which 1s to keep and which O’s to delete, the computer does nothing.THIS is how you tell a computer the fitness.

    Holy cow Joe.

    A Mung vs phoodoo implement-an-ea-from-scratch hackathon might be interesting.

  16. phoodoo:
    Patrick,

    Of course they do! You have already been told how wrong you are!!

    Just because you don’t call it a fitness function, changes nothing!!

    You tell the computer what is the definition of success and what is the definition of failure.THAT is EXACTLY what Polyworld does.

    Look up Tierra and get back to me.

  17. Patrick,

    Look up what computers do and get back to me.

    Are you already running from your claim that Polyworld doesn’t have a fitness function?

  18. phoodoo:
    Patrick,

    Look up what computers do and get back to me.

    Are you already running from your claim that Polyworld doesn’t have a fitness function?

    Polyworld does not have an explicit fitness function. Survival depends on features of the environment and the virtual organisms.

  19. phoodoo:
    Joe Felsenstein,

    We are talking about computer generated algorithms Joe!What are you talking about you have done this in your lab?

    If you don’t tell a computer which 1s to keep and which O’s to delete, the computer does nothing.THIS is how you tell a computer the fitness.

    Holy cow Joe.

    phoodoo, our “lab” is not a “wet lab” but a computational lab. We sit and type on computers.

    I have been writing computer simulations of evolution for 53 years now. That’s 12 years before John Holland supposedly invented genetic algorithms (population geneticists had actually been doing such simulations since the 1950s).

    So stop lecturing me about genetic simulations of evolutionary processes.

  20. Joe Felsenstein,

    Well, gee Joe, then you would think you might be able to name at least ONE GA that doesn’t do a search then, huh? I guess if you can’t what hope is there for anyone else?

    And when you talk about genotypes, are you talking about the fitness of genotypes of computer generated organisms?

  21. phoodoo,

    Nonsense. EVERY GA has to have a function which decides what is “fit.” Otherwise it produces nothing other than random bits of pixels with no meaning.

    Nonsense. Did you learn nothing from the M&M’s threads? Heh heh. The fitness evaluation module can easily be empty or non-existent. Then, all genotypes in the population are subject to the same chances. Something interesting still happens. Selection is not a definitional component of a GA.

  22. Hi everyone,

    I’d like to apologize for my lack of comments during the past couple of days. Currently I’m in the middle of moving house, and I expect to have settled into my new digs by Friday evening.

    In the meantime, I’d like to thank Mung for creating this post, and I’d like to focus on one particular question: is there any evidence that genetic algorithms can create hierarchies of functional complexity – and if so, how many layers deep? That’s what Dr. Douglas Axe means by “functional coherence.”

  23. vjtorley,

    Good luck with the move. I hate moving!

    Hierarchies of functional complexity would require “functional complexity” to be rigorously defined, I think?

    There’s a paper that seems to tie together AIC with “FIC” – ‘Functional Information Content”:

    http://www.sciencedirect.com/science/article/pii/S1476945X12000219

    But it’s behind a paywall and I’ve not read it, If you can be precise / explicit with “Functional complexity” I’m sure we’ll have a go.

  24. Alan Fox,

    Thanks Alan.

    “…In the case of genes, this ‘function’ may be thought of as the
    biochemical activity (for example a digestive enzyme’s cleaving
    rate) of whatever molecule is produced from reading the
    nucleotide sequence. For a practical degree of function at the
    DNA level, the probability of a random sequence producing greater
    function than the observed sequence is approximately zero. This
    implies that if the information content of the genome were
    compressed (removing repetition) we would be left with only the
    functional information content (FIC), but the compressed genome
    is by definition the algorithmic information content (AIC), hence
    for the genome FIC = AIC. We acknowledge that there remains
    considerable debate about redundancy of whole genes within an
    organism, though many have taken the precautionary approach of
    assuming all are potentially functional until proven otherwise”

    Pity the poor onion.

    ETA AIC =/= https://en.wikipedia.org/wiki/Akaike_information_criterion ?

  25. phoodoo: Richard, don’t let that bother you.Its never mattered to you before.

    Oh, I’m quite honest about my having read or not read things, Phoodoo. Check my posts. Then check yours.

  26. Allan Miller,

    Do you even know the definition of a genetic algorithm? Let me help you:

    “The genetic algorithm is a method for solving both constrained and unconstrained optimization problems that is based on natural selection, the process that drives biological evolution. The genetic algorithm repeatedly modifies a population of individual solutions.”

    “Genetic Algorithms are a way of solving problems by mimicking the same processes mother nature uses. They use the same combination of selection, recombination and mutation to evolve a solution to a problem. Neat huh?”

    “The idea with GA is to use this power of evolution to solve optimization problems.”

    “The GENETIC ALGORITHM is a model of machine learning ”

    “Genetic algorithms are one of the best ways to solve a problem for which little is known. They are a very general algorithm and so will work well in any search space. All you need to know is what you need the solution to be able to do well, and a genetic algorithm will be able to create a high quality solution. Genetic algorithms use the principles of selection and evolution to produce several solutions to a given problem.”

    Should I go on?? Taking some M&M’s out of a bag, and put some other colors back in is not solving any problem Allan. Its not learning anything. Its not doing anything. All it is doing is checking statistics. No solution. No problem. No learning. No anything. Except for perhaps to teach you and Richard what the meaning of a generation is.

    Did you learn nothing Allan..hehe…He, he, he, he , ho, ho..OH HO HO HO!!!??

  27. phoodoo:
    Richardthughes,

    I checked.The last post you posted was linking to something you haven’t read.

    Anything else?

    I’m honest about having read or not read things. You are not. Anything else?

  28. keiths: In other words, your program completely fails as an implementation of Weasel, in which mutation can happen anywhere in the phrase and fitness is a function of the phrase’s proximity to the target.

    So?

    It’s intent was to demonstrate the power of cumulative selection, not be just yet another Dawkins Weasel mimic.

  29. Patrick: A Mung vs phoodoo implement-an-ea-from-scratch hackathon might be interesting.

    Well, if we keep chopping off the parts of what it means to code a GA our job will just be that much simpler. 😉

  30. Richardthughes: Hierarchies of functional complexity would require “functional complexity” to be rigorously defined, I think?

    What about a rigorous definition of genetic algorithm? Wouldn’t we need that too?

  31. phoodoo,

    Phoodoo who appears never to have written a line of code in his life finds a bunch of quotes he thinks proves me wrong. HAHAHAH …. At least I can have the satisfaction of thinking of you wasting your time with Google like the petulant point-scorer you are.

    All of your examples are instances where the GA has been used as a tool for optimisation or problem solving. This does not define the entirety of instances of the class ‘GA’. You have actual experts here FFS. But no, Google knows best. HAHAHAHAHAHA.

  32. VJ Torley asked only whether “blind processes” can result in a “high degree of functional complexity”. That doesn’t require that the evolutionary computation satisfy the formal definition of a genetic algorithm, even if we could agree on what that is. It can just be any halfways-reasonable simulation of evolutionary processes.

    The hard part would be figuring out what “a high degree of functional complexity” is.

  33. Allan Miller,

    You mean an expert who is not willing to name even ONE GA that doesn’t do a search? That expert??

    You now are taking the ridiculous stand that ANYTHING a computer does is a GA? Is playing tetris a GA? What about if you use a computer to calculate your taxes?

    You have become more and more of a caricature of a guy who needs to be an atheist Allan. Your entire focus is about trying to look like you are right, not about searching for the truth in the world. Don’t accuse me of being a dick Allan, its quite possible that you are, but just because you post on a site where you are backed by a pack of other fools who also need to be atheists despite any consideration to thinking, it hasn’t been brought up to you.

    What really makes you a dick is that you are at least smart enough to know that your responses are useless. Richard, Omagain, Dazz, these kinds of guys aren’t even capable of thinking about the world. You are, but you much prefer to claim you are right, instead of even acknowledging even the simplest of points-like that all computer algorithms about evolution do is look for what the computer designer tells it to go look for. That is called a search, and the thing that the computer is told to search for is the fitness.

    Even Joe, by virtue of his silence to name one that doesn’t, admits this.

  34. Mung: I just had this image of monkeys banging away on computers flash through my mind.

    Well, of course, we’re all monkeys banging away on computers here, and don’t you forget it. If I recall, you accept common descent, so you must agree that you’re a monkey too.

  35. Allan Miller: you need some form of replication, which inevitably goes hand in hand with elimination where resources are finite.

    All you really need for a bare-bones GA is an array whose members are subject to copying and elimination.

    I think you’re mistaking the software implementation of a model for the model itself.

    For example, there is no need to copy the members of the array, given that you’re not mutating them, the copies would be no different than the original.

    And given that there’s no selection required, it hardly matters at all which of them is eliminated, so let’s eliminate the elimination.

    And since there is no requirement that the initial members of the starting population be generated at random, we can just start them all out the same.

    I am down to a one line GA!

    population = Array.new(100) {“I AM A MONKEY’S UNCLE”}

    Mad skillz, I know. Microsoft so missed out when I bought into IBM OS/2!

    Don’t have a coronary keiths.

  36. Mung:

    for each locus in chromosome, randomly mutate the letter at that locus [and nowhere else] until it matches the desired letter [, then never mutate that locus again.]

    Through this process it gradually accumulates the letters needed to match the target phrase.

    keiths:

    In other words, your program completely fails as an implementation of Weasel, in which mutation can happen anywhere in the phrase and fitness is a function of the phrase’s proximity to the target.

    Mung:

    So?

    So, just another failure on your part. Amusing, but not surprising.

    It’s intent was to demonstrate the power of cumulative selection, not be just yet another Dawkins Weasel mimic.

    You intended it to be a Weasel:

    A few people suggested that I should write my own Weasel program.

    So I did.

    It wasn’t a Weasel. You failed. Again, no surprise. The surprise would have been if you had succeeded.

    It’s intent was to demonstrate the power of cumulative selection…

    That’s not what you told us:

    I never claimed that it was an example of cumulative selection.

    Your incompetence is remarkable, Mung.

  37. keiths: You intended it to be a Weasel:

    Such a mind reader you are!

    I intended it to be an offspring of a weasel. Can’t you read? It’s right there in the code itself.

    baby_weasel = make_baby

    Also, if I intended it to be a Weasel it would have been an instance of the Weasel class or of a sublass of Weasel or it would include the Weasel module (think Interface) so that it would at least behave like a Weasel. It does none of those things.

    Next time please read my code with understanding. You think you understand my code but it’s pretty obvious that you don’t have a clue. Is that why you have to resort to such lame attempts at mind-reading?

  38. keiths: It wasn’t a Weasel.

    Right you are! It was a baby_weasel. So sue me.

    Of course, technically, it was an array. This should have given you a clue:

    Array.new

    Do you know how to tell the difference between an Array and a Weasel?

    Wait for it …

    wait …

  39. keiths: Your incompetence is remarkable, Mung.

    As are your dishonest quote-mining skills!

    Now if you could just learn to understand the code I write. If there’s something about it you don’t understand all you have to do is ask. I’m trying to help you learn, really.

    🙂

  40. Phoodoo: “Joe/Sir Richard/Allan/Dazz/Rummy, that’s your decision node there. See it? It says, decide”

    Joe/Sir Richard/Allan/Dazz/Rummy: “No, its doesn’t.”

    Phoodoo: :But Joe/Sir Richard/Allan/Rummy. Look, its right there. You wrote it.

    Joe/Sir Richard/Allan/Dazz/Rummy: ” Know I didn’t!”

    Phoodoo: ” Oh, come ooooon. Fuck, look man. Shit, do you need reading glasses. It’s right there.

    Joe/Sir Richard/Allan/Dazz/Rummy: ” That could be anything. A smudge. A coffee drop smear, my wife’s mascara.

    Phoodoo: “Whaaaaat? You are not even drinking coffee. And your wife is not here!” Sheesh.

    Joe/Sir Richard/Allan/Dazz/Rummy: “Yes, I am. Yes, she is”

    Phoodoo: ” Where. Show me.”

    Joe/Sir Richard/Allan/Dazz/Rummy: “Well, really I did. And well, she was.” But no matter. There’s nothing there.

    Phoodoo: “Shall we give it another go”.

    Joe/Sir Richard/Allan/Dazz/Rummy: “By all means, I love the conversation. And the cucumber sandwiches are delightful”

    Phoodoo: “Ok, put you reading glass on again. Check that they are clean, OK?. Then look again at what you wrote. See there? That line that tells the program what the next steps should be?”

    Joe/Sir Richard/Allan/Dazz/Rummy: “Where? There?”

    Phoodoo: ” Yes, right there. See that, that line is telling the program what to choose”.

    Joe/Sir Richard/Allan/Dazz/Rummy: “No, its not.!”

    Phoodoo: ” Oh, come on. Not that again?

    Joe/Sir Richard/Allan/Dazz/Rummy: “What?”

    Phoodoo: “You just told the computer what to do!”

    Joe/Sir Richard/Allan/Dazz/Rummy: ” No, I didn’t”

    ……..and this folks went on all afternoon, until Phoodoo decided it was time……slowly takes out a sledgehammer. Checks the head is fastened tightly to the shaft. Checks carefully for wood spurs…..

    then Whack!

  41. Well, look it only took what, 5 years for someone to come on here and finally write something without putting the entire audience here into a beige colored coma (oh how Richard has tried). Lizzie experiment is finally a success. Imagine what is possible in the deep stretches of cosmological time!

    But geez, if we had to wait for the insipid Godless atheists here to do it, after a billion years we would still all be one celled mycoplasma, looking for someone who could at least play a jews harp.

    Steve of Nazareth!, Steve of Nazareth!

    “I did not know that mankind were suffering for want of gold. I have seen a little of it. I know that it is very malleable, but not so malleable as wit. A grain of gold will gild a great surface, but not so much as a grain of wisdom.”
    ― Henry David Thoreau, Life Without Principle

Leave a Reply