from Hacker News

A Story to Explain Genetic Algorithms

by jakeburtn on 2/16/13, 1:56 PM with 33 comments

  • by jacques_chester on 2/16/13, 3:26 PM

    If you're interested in the world of "computational intelligence" aka "nature-inspired computation", this book is a good high level survey: http://www.cleveralgorithms.com/

    (You can also find stuff under the heading of "metaheuristics" -- http://cs.gmu.edu/~sean/book/metaheuristics/).

    GAs are one of four (!) different independently developed strands of thought -- Genetic Algorithms, Genetic Programming, Evolutionary Programming and Evolutionary Strategies. Look out for that when you hit the Googletrons.

  • by stcredzero on 2/16/13, 3:51 PM

    > Then our Charles simply had to figure out how Mrs Kipling scored the cakes and he could genetically evolve the best cake!

    "And then a miracle happens." Isn't the fitness function the "key ingredient?" (It's in the source code, but not in the text for a reason.)

    Still a good explanation of the rest.

  • by helloiamdave on 2/16/13, 5:38 PM

    Once upon there was another local search algorithm. It was called GA. The end.
  • by jmduke on 2/16/13, 5:30 PM

    Unrelated: this simvla network thing looks like a pale imitation of Svbtle.
  • by ipince on 2/16/13, 9:58 PM

    I would suggest making the fitness function more complex. I think its a bit confusing to see the optimal result be equal to the fitness function's parameters, and it makes it easier to miss the point.
  • by perone on 2/17/13, 12:30 AM

    I've written something [1] related to this if someone is interested.

    [1] http://pyevolve.sourceforge.net/wordpress/?p=576

  • by jmcdowell on 2/16/13, 8:14 PM

    I don't have much of a knowledge of genetic algorithms so it might be good to explicitly say what part of GA algorithms set them apart from other branches of algorithms.

    Nice story otherwise.

  • by gweinberg on 2/16/13, 8:56 PM

    It's not at all clear from the story why or if having multiple recipes "mate" works better than just using one recipe and fiddling with it.
  • by datz on 2/17/13, 1:12 AM

    This is stupid. The whole is not simply a sum of its parts in cake baking and biology.
  • by zapdrive on 2/16/13, 5:09 PM

    "After thinking long and hard about the problem at hand our Charles came to the conclusion that he knew two things"

    Lol... long and hard.

  • by youngerdryas on 2/16/13, 2:57 PM

    Neat little story, despite the grammar and capitalization. Is it common to use _ as an index variable?

    Edit: for _ in range(4):